Steps

   Journey Manager (JM) The transaction engine for the platform.  |    System Manager / DevOps  |  All versions This feature is related to all versions.

A collaboration job consists of individual steps executed by Journey Manager to complete the collaboration job. The definition of what steps are used and how they are linked together resides in the job definition of the job controller service, which processes collaboration jobs. The order of steps within the job definition is not important because they are linked with each other using the nextStep instruction of the routes element. Each step contains one or more actions. Each action completes a part of the workflow, usually by calling a service that does the work. Actions are sequential within each step.

Note

The order of steps are not important, but the order of actions is.

A step has several pre-defined statuses depending on the completion of actions.

A job step status can be one of the following:

  • In Progress- the step is in progress now.
  • Completed - the step is completed.
  • Expired - the step is expired.
  • Cancelled - the step has been manually cancelled by an administrator.

A step is completed when all its actions have executed in specified order without any exceptions, so the next step can be run. The next step is defined by either:

  • The last action that returns a route name, which, in many cases, is selected by a user while completing a form.
  • A step's routes element pointing to the next step.

A step can be a standard or a start step. A standard step consists of:

  • A list of actions which are executed in the specified order.
  • An optional expiry action.
  • One or more routes.
Note

Once a step reaches the Completed status, it can't be reverted back to any particular step in the flow, for example, In Progress.

A start step is a first standard step that is executed during a collaboration job processing. The start step has the same elements as the standard step, with an extra start type assigned to it. You must define one of the steps in the collaboration job as the start step. Usually, a collaboration job is started by a form submission, so the first action in the start step is a Job Form Start action.

A collaboration job can have one or more endpoint steps. Each endpoint can execute none, one or more actions, such as update a status or send an email. When all actions complete, this makes this step complete, so the collaboration job can complete as well. For example, the Application Approved and Application Rejected steps are the two endpoints that make the collaboration job complete.

A step definition for the One Step Review is shown below.


{
 "$schema": "http://json-schema.org/draft-07/schema#",
 "$id": "http://example.com/product.schema.json",
 "jobDetails": {
  "name": "1 Step Review",
  "processSubmitImmediate": false,
  "version": "4.1.0"
 },
 "jobGroups": {},
 "properties": {},
 "steps": {
  "Application Start": {
   "type": "start",
   "actions": {
    "Accept Quote": {
     "name": "Accept Quote",
     "type": "Job Form Start",
     "properties": {
	  "Process Message Send Email": {
	   "value": "true",
	   "template": false
	  },
	  "Process Message Text": {
	   "value": "Thank you ${formDataMap.firstName} ${formDataMap.lastName} your ${submission.formName} is being processed.",
	   "template": false
	  }
	 }
    }
  },
  "routes": {
   "Default": {
    "nextStep": "Application Review"
   }
  },
  "properties": {}
  },
  "Application Review": {
   "type": "",
   "actions": {
    "Assign Review": {
	 "name": "Assign Review",
	 "type": "Job Task Assign",
	 "properties": {
	  "Task Assign Groups": {
	   "value": "Job Reviewers, Job Managers",
	   "template": false
	  },
	  "Task Form Code": {
	   "value": "$func.startFormCode()",
	   "template": false
	  },
	  "Task Message": {
	   "value": "Please review the ${submission.formName} by ${formDataMap.firstName} ${formDataMap.lastName}.",
	   "template": false
	  },
	  "Task Review Previous Step": {
	   "value": "true",
	   "template": false
	  },
	  "Task Subject": {
	   "value": "Review ${submission.formName} by ${submission.contactEmailAddress}.",
	   "template": false
	  },
	  "Task Type": {
	   "value": "Review",
	   "template": false
	  }
	 }
	},
	"Review Wait": {
	 "name": "Review Wait",
	 "type": "Job Task Wait",
	 "properties": {}
	}
   },
   "routes": {
    "Approve": {
	"nextStep": "Application Delivery"
   },
   "Reject": {
    "nextStep": "Application Rejected"
   }
  },
  "properties": {}
 },
 "Application Delivery": {
		"type": "",
		"actions": {
			"Application Delivery": {
				"name": "Application Delivery",
				"type": "Job Delivery",
				"properties": {}
			},
			"Application Delivery Wait": {
				"name": "Application Delivery Wait",
				"type": "Job Delivery Wait",
				"properties": {}
			}
		},
		"routes": {
			"Default": {
				"nextStep": "Application Completed"
			}
		},
		"properties": {}
	},
	"Application Completed": {
		"type": "endpoint",
		"actions": {
			"Process Message": {
				"name": "Process Message",
				"type": "Job Process Message",
				"properties": {
					"Process Message Send Email": {
						"value": "true",
						"template": false
					},
					"Process Message Submission": {
						"value": "$func.startSubmission()",
						"template": false
					},
					"Process Message Text": {
						"value": "Thank you ${formDataMap.firstName} ${formDataMap.lastName} your ${submission.formName} has been Approved.",
						"template": false
					}
				}
			}
		},
		"properties": {}
	},
	"Application Rejected": {
		"type": "endpoint",
		"actions": {
			"Process Message": {
				"name": "Process Message",
				"type": "Job Process Message",
				"properties": {
					"Process Message Send Email": {
						"value": "true",
						"template": false
					},
					"Process Message Submission": {
						"value": "$func.startSubmission()",
						"template": false
					},
					"Process Message Text": {
						"value": "Sorry ${formDataMap.firstName} ${formDataMap.lastName} your ${submission.formName} has been declined.",
						"template": false
					}
				}
			}
		},
		"properties": {}
		}
	}
}

The Application Review step has two possible next steps: Application Approved and Application Rejected. The first action of the Application Review step creates and assigns a Group Task. A user who is a member of that group can open the form associated with the task as shown below.

The user has an option of approving or rejecting the form by selecting a corresponding route from the Route Name dropdown list before submitting the form. If the user selects Approve, the step is routed to the Application Approved step. If the user selects Reject , it is routed to the Application Rejected step.

You can view the list of all steps for each collaboration job.

Next, learn about collaboration job actions.