1
0
-1

I am using the above service as part of form processing.

My intention is to add some content to the form xml; specifically I want to add any error message.

Log statements show that the xml is correct as it contains the error message. However, checking the formXml in the submitted transaction the error is not present.

I have used this approach in other services and it works fine, but not in this case.

I have tried these options:

submissionDataService.commitChanges()

DaoFactory.submissionDao.dataContext.commitChanges()

but neither seem to work.

The code is in a 'Submission Preprocessor' service. This is a core service as this has not been migrated to Fluent SDK as yet.


Thanks

Mark

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Hi Julio,

      thanks for the follow up, but I have note solved this yet.

      I add the error message to the xml, and have used logs to show that it is present.

      Then I have tried this code, but it does not commit.

      SubmissionDataService submissionDataService = new SubmissionDataService()
      
      submissionDataService.setSubmissionXmlData(submission, xmlDoc.toString(), request)
      //submissionDataService.commitChanges()
      
      SubmissionService submissionService = new SubmissionService()
      submissionService.commitChanges()
      
      
      

      I have tried a few variations of Dao, submission, submissionData, but cannot seem to get the xml to commit.

      Any further options that I should try?


      Thanks

      Mark

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi Mark,


        Not sure whether you alreday solved this or not. I think you need to get the data context from the object you are managing in that moment, the submission itself, and commit it.


        Kind regards,

        Julio.

          CommentAdd your comment...