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:
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 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)
SubmissionService submissionService = new SubmissionService()
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?
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.