1
0
-1

I'm developing a workflow with two approval steps, using $func.startSubmissionXml() to retrieve the form XML Data from the first submission as showing in the script below:

{
"name": "Approver Review",
"type": "",
"shareFormData": "false",
"actions": [
{
"name": "Update application status",
"type": "Job Action",
"serviceName": "Update Service Request Status",
"properties": [
{ "name": "Application Status", "value": "Pending Approval" },
{ "name": "Application SubStatus", "value": "" },
{ "name": "Initialize SLA", "value": "false" }
]
},
{
"name": "Approver Assignment",
"type": "Job Task Assign",
"properties": [
{ "name": "Task Assign Email", "value": "${formDataMap.approverEmail}" },
{ "name": "Task Send Email", "value": "true" },
{ "name": "Task Assign Repeating", "value": "false" },
{ "name": "Task Form Code", "value": "$func.startFormCode()" },
{ "name": "Task Form XML Data", "value": "$func.startSubmissionXml()" },
{ "name": "Task Assign Portal", "value": "${submission.portal.name}" },
{ "name": "Task Email Subject", "value": "For your approval" },
{ "name": "Task Email Message", "value": "A request is pending your approval.<a href='${formUrl}'> Click here</a> to view the ${submission.formName}, submitted by ${formDataMap.name}" },
{ "name": "Task Type", "value": "Anonymous" }
]
},
{
"name": "Approver Review Wait",
"type": "Job Task Wait"
}
],
"routes": [
{ "name": "Approve", "nextStep": "Fulfiller Review" },
{ "name": "Decline", "nextStep": "Approver Decline" },
{ "name": "RequestMoreInformation", "nextStep": "Approver Request More Info" }
]
}

 

If the approver click on Request More Information and the submitter resubmit his form with additional data added to it. the approval still recieves the form with the same old data from the first submission. is there a way we can update the submissionXML() in the "approver review" step above ? 

For example: instead of using $func.startSubmissionXml() that will always retrieve the XML Data from the first submission, I need to retrieve the form XML Data from the previous submission ? either it was the first, second or third submission ? 

 

Thank you.

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Hi Jesse,
      It is a link inside Transaction Manager, where the JavaDoc is available to developers.
      Depending on the version of TM, it is either in the Services or System menus under Transact Javadoc API.

      Then on the left side, under all classes find the "Job Functions".

      If you were to right click and open in a new window, the URL would look something like this:
      https://servername/manager/admin/help/javadoc/com/avoka/fc/core/service/job/impl/JobFunctions.html

      Cheers,
      Angie 

      1. Jesse Belsches

        Hello Angie, I was able to find it thank you for your guidance. I'm running Transaction Manager 4.1.12 so I guess it's just not an option for me that's why "stepOrPreviousSubmissionXml" is not there.

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

      Hello Ahmed, 

      Please check the TM JavaDoc topic "JobFunctions".
      Some new functions were introduced in later TM versions to handle this scenario.

      stepOrPreviousSubmissionXml

      The stepOrPreviousSubmissionXml function returns the submission XML (String) for another submission in the same step, or the previous submission, or null if not found.

      This function should be used where the steps dynamicPreConditions flag and shareFormData flag are enabled.
      Cheers,

      Angie 

       

      1. Jesse Belsches

        Hello Angie, Could you provide the link to this page and thread I am unable to locate? Thank you

      CommentAdd your comment...