Introduction
FEATURE AVAILABILITY STARTING FROM RELEASE 2.5.6
FEATURE AVAILABILITY STARTING FROM RELEASE 2.6.3
The JITL OrderStateTransitionJob template can be used to perform transitions on orders, see JS7 - Order State Transitions. Examples for state transitions include to
- continue orders from the FAILED state to the IN PROGRESS state and possibly to the RUNNING state in case of a JS7 - Job Instruction,
- continue orders from the SUSPENDED state to the state they had before being suspended.
- continue orders from the PROMPTING state to the IN PROGRESS state and possibly to the RUNNING state.
The job template makes use of the JS7 - REST Web Service API to perform JS7 - Order State Transitions.
- The job template authenticates with the JS7 - REST Web Service API by use of user account/password and/or by use of a certificate, for details see JS7 - Authentication.
- For details about configuration items see JS7 - JITL Common Authentication.
Usage
When defining the job either:
- invoke the Job Wizard that is available from the job properties tab in the Configuration view and select the JITL OrderStateTransitionJob and relevant arguments from the Job Wizard.
or
- specify the
JITL
job class andcom.sos.jitl.jobs.orderstatustransition.OrderStateTransitionJob
Java class name and add arguments specifying what order states to transition..
Example
Download (upload .json): pwdOrderStateTransitionJob.workflow.json
You can use the Job Wizard like this:
Explanation:
- Add an empty job from the instruction panel.
- Specify a name and a label for the job.
- Select an Agent.
In a next step invoke the Job Wizard that you find in the upper right corner of the job property editor. The Job Wizard brings up the following popup window:
Explanation:
- From the list of available Job Templates select the OrderStateTransitionJob.
Then hit the Next button to make the Job Wizard display available arguments:
Explanation:
- Required Arguments
states
: Specifies the semicolon separated list of states on which the transition will be applied for examplefailed;scheduled
transition:
Specifies the transition to be performed. Possible values are one ofcancel, suspend, continue
- Optional Arguments
workflow_folders
: Optionally the identifier of a Controller can be specified to limit results to workflows and jobs executed with the indicated Controller.workflow_search_patterns
: Optionally the identifier of a Controller can be specified to limit results to workflows and jobs executed with the indicated Controller.order_search_patterns
: Optionally the identifier of a Controller can be specified to limit results to workflows and jobs executed with the indicated Controller.persist_duration
: Optionally the identifier of a Controller can be specified to limit results to workflows and jobs executed with the indicated Controller.controller_id
: Optionally the identifier of a Controller can be specified to limit results to orders processed with the indicated Controller.batch_size
: Optionally limit the size of REST API requests.
- Note that the the checkbox provided with each argument has to be selected to add the argument to the OrderStateTransitionJob template.
When hitting the Submit button, the wizard adds the selected arguments to the job which can look like this:
The job arguments can be specified:
- from individual variables as configured using the job wizard,
- by using JS7 - Job Resources.
Documentation
The Job Documentation including the full list of arguments can be found from: https://www.sos-berlin.com/doc/JS7-JITL/OrderStateTransitionJob.xml
Authentication
The Job makes use of the JS7 - REST Web Service API that is available from JOC Cockpit.
- The job is executed with an Agent and requires a network connection to JOC Cockpit.
- The job has to authenticate with JOC Cockpit, for the related configuration see JS7 - JITL Common Authentication.
Arguments
The OrderStateTransitionJob template accepts the following arguments:
Name | Required | Default Value | Purpose |
---|---|---|---|
states | yes | n/a | Possible values: Values can be specified from a semicolon separated list. Each state in the list is handled separately, for example
Example: |
| yes | n/a | Possible values are one of:
|
workflow_folders | no | /* | A list of folders that hold workflows for which orders should be transitioned. If more than one folder is specified then folders are separated by semicolon. When used with the trailing characters Example: |
workflow_search_patterns | no | n/a | A list of search patterns for names of workflow for which orders should be transitioned. The wildcard characters Example: |
order_search_patterns | no | /n/a | A list of search patterns for order names. If more than one search pattern is used then they are separated by semicolon. Examples: |
persist_duration | no | n/a | This argument is available for FAILED orders. It specifies the minimum duration for which the order is in the failed state.
|
controller_id | no | Current Controller ID | The identifier of a Controller can be specified to limit the resulting list of orders to the indicated Controller. |
batch_size | no | 10000 | The maximum number of orders that are processed in a single request. Orders are transitioned in a single transaction. This includes that either all orders in a transaction are transitioned or none. If the number of orders exceeds the batch size then a further transaction is executed. If the value The batch size should not exceed a value of approx. 15000 in order to limit the size of requests to the Controller to approx. 4 MB which is a frequently applied limit of Proxy Servers that might be in place between the Agent running the job and JOC Cockpit. |
Return Variables
The OrderStateTransitionJob template does not return variables: