Hey, I'm trying to create in groovy preprocessor service new task and set formStatus to "Completed". I have form, xml to prefill.
After creating and set form status to completed in operations -> transaction operations, form status is displayed as Assigned instead of Completed.
Perhaps I am doing something wrong. Form can be filled only by auth. users so I am able to find user account by email Here is my code, any idea would be appreciate, maybe theres is another function to create task or to update form status?.
Ok, I solved it on my own, after creating task, setting status completed I added
And it's works
Your approach is correct but requires little bit of enhancement to make sure the submission status is recorded correctly with some other metadata. Also, try not to use "Completed"/"Submitted" as a string to assign a status to avoid issues with a future upgrade if we decide to change those status values something else. It's better to use the constant available under Submission object.