1
0
-1

We have a form bundle that we're working on that closely follows the pattern that Larry mentions here:

How to redirect from a Collaboration Job?

But we have a case, based on IDV service response, where we want the Job to end after the first form finishes, rather than proceed to a next form. The relevant portion of the job controller is shown below.  The default route for the Application Start is to move on to the Onboarding step where there can be a Quiz form shown and/or an Onboarding form for a credit card.  But in the case of an IDV fail with the first form, neither of these should be redirect to.

With what we have below, if the preConditions are such that neither form is redirected to next (equifaxStatus == 'fail' for example), then the Job sits in a Wait state because of the Job Task Wait action at the end of the Onboarding step.

Is it possible to have this type of chaining, selectively not chain to a next form and move to completion; or do we need to rethink the solution?


"steps": [
{
"name": "Application Start",
"type": "start",
"actions": [
{
"name": "Start Processing Application",
"type": "Job Form Start",
"redirectNext": true,
"properties": [
{ "name": "Task Send Email", "value": "false" }
]
}
],
"routes": [
{ "name": "Default", "nextStep": "Onboarding" }
]
},
{
"name": "Onboarding",
"type": "",

"dynamicPreConditions": true,
"shareExtractData" : false,
"shareFormData" : true,
"allFormsEditable" : true,
"showPreviousForms" : true,
"redirectNext" : true,

"actions": [
{
"name": "Onboarding Form",
"type": "Job Task Assign",
"preCondition": "$formDataMap.equifaxStatus == 'pass'",
"redirectNext": false,
"properties": [
{ "name": "Task Form Code" , "value": "ccoonboarding" },
{ "name": "Task Message" , "value": "Please complete the Onboarding form." },
{ "name": "Task Subject" , "value": "Complete CCO Onboarding" },
{ "name": "Task Input XML Prefill", "value": "$func.startSubmissionXml()" },
{ "name": "Task Send Email" , "value": "false" },
{ "name": "Task Assign Email" , "value": "$formDataMap.email" },
{ "name": "Task Type" , "value": "Anonymous" }
]
},
{
"name": "Quiz Form",
"type": "Job Task Assign",
"preCondition": "$formDataMap.equifaxStatus == 'quiz'",
"redirectNext": true,
"properties": [
{ "name": "Task Form Code" , "value": "ccoquiz" },
{ "name": "Task Message" , "value": "Please complete the Quiz form." },
{ "name": "Task Subject" , "value": "Complete CCO Quiz" },
{ "name": "Task Input XML Prefill", "value": "$func.startSubmissionXml()" },
{ "name": "Task Send Email" , "value": "false" },
{ "name": "Task Assign Email" , "value": "$formDataMap.email" },
{ "name": "Task Type" , "value": "Anonymous" }
]
},
{
"name": "Onboarding Form After Quiz",
"type": "Job Task Assign",
"preCondition": "$formDataMap.equifaxStatus == 'quiz' && $formDataMap.equifaxQuizStatus == 'pass'",
"redirectNext": false,
"properties": [
{ "name": "Task Form Code" , "value": "ccoonboarding" },
{ "name": "Task Message" , "value": "Please complete the Onboarding form." },
{ "name": "Task Subject" , "value": "Complete CCO Onboarding" },
{ "name": "Task Input XML Prefill", "value": "$func.startSubmissionXml()" },
{ "name": "Task Send Email" , "value": "false" },
{ "name": "Task Assign Email" , "value": "$formDataMap.email" },
{ "name": "Task Type" , "value": "Anonymous" }
]
},
{
"name": "Applicant Wait",
"type": "Job Task Wait"
}
],

"routes": [
{ "name": "Default", "nextStep": "Route Evaluation" }
]
},


Thanks,

Jamie


    CommentAdd your comment...

    2 answers

    1.  
      2
      1
      0

      Hi Jamie,

      I believe that model should work but only if you know $formDataMap.equifaxStatus after "Application Start" which is not possible because you need "Onboarding Form" in "Onboarding"..

      I have this configuration:

            "dynamicPreConditions": true,

            "shareExtractData": true,

            "shareFormData": false,

            "allFormsEditable": false,

            "showPreviousForms": true,

      And for some actions:

      "preCondition": "$func.invoke('Bundle helper','IsthisFormRequired')

      IsthisFormRequired method is evaluating and returning true or false. But this is something you need to know from the beginning as all tasks are created at the same time.

      I was thinking you can split "Onboarding". So first form alone "Onboarding Form" , evaluate and then redirect to a complete if fails or next action with all the rest of the forms.

      Another solution might be create tasks or actions dynamically, but I believe that can add too much complexity.

      Let me know if this helps.

      Kind regards,

      Julio.

      1. Jamie Kunkel

        Hi ... I was able to make this work by using a "Conditional Route Name" in the "Job Form Start" step/action - this allowed me to select what I had as the Default route before if IDV was OK and to skip the "Onboarding" step entirely if not.

        I didn't make you suggestion work Julio, but it led me to this solution!  So thanks again.

          "steps": [
            {
              "name": "Application Start",
              "type": "start",
              "actions": [
                {
                  "name": "Start Processing Application",
                  "type": "Job Form Start",
                  "redirectNext": true,
                  "properties": [
                    { "name": "Task Send Email", "value": "false" },
                    {
                      "name" : "Conditional Route Name",
                      "value": "#if($formDataMap.equifaxStatus == 'pass' || $formDataMap.equifaxStatus == 'quiz')IDV_OK#{else}IDV_NOT_OK#end"
                    }
                  ]
                }
              ],
              "routes": [
                { "name": "IDV_OK"    ,  "nextStep": "Onboarding" },
                { "name": "IDV_NOT_OK",  "nextStep": "Route Evaluation" }
              ]
            },
        
        
        

        Jamie

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

      Hi Julio ... thx for the suggestion, I'll look into it.  And thanks for educating me a bit - I didn't realize all task are created at the same time!  Collaboration Jobs are still a black art to me, so every bit helps.

      Jamie

        CommentAdd your comment...