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 a transition on orders for example
- continue orders from the FAILED or SUSPENDED state to the IN PROGRESS state.
- continue orders orders from the PROMPTING state to the IN PROGRESS 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 Wizard that is available from the job properties tab in the Configuration view and select the JITL OrderStateTransitionJob and relevant arguments from the 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): pdwCheckHistory.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 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 liste of states on which the transition is to be applied for example failed,scheduledtransition:
Specifies the transition to be performed. Possible values arecancel, 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 workflows and jobs executed with the indicated Controller.batch_size
- Note that the the check box provided with each argument has to be selected the argument is to be added to the arguments of the OrderStateTransitionJob template.
When hitting the Submit button the wizard adds the required arguments to the job which should 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
Arguments
The OrderStateTransitionJob template accepts the following arguments:
Name | Required | Default Value | Purpose |
---|---|---|---|
states | yes | n/a | Possible values: pending,failed, suspended,waiting,inprogress,scheduled,prompting. The values can be a comma seperated list. Each state in the list is handled seperatly as e.g. the continue action for "prompting" is not the same as for "suspended" |
| yes | n/a | Possible values: cancel, suspend, continue.
|
workflow_folders | no | /* | A list of workflow folders that contains the orders. Items sepearated by semicolon. When ending with /* the folder will be searched recursivly. Example: /folder/sub1;/another_folder/sub2/* |
workflow_search_patterns | no | n/a | A list of search patterns for workflow folders that contains the orders. Example: *myWorkflow*, my?orkflow |
order_search_patterns | no | /n/a | A list of search patterns for order names. May contain a folder. Items sepearated by semicolon. Example: *myWorkflow*; /folder/sub1/my?orkflow |
persist_duration | no | n/a | The duration the order persists in the failed state. Available for FAILED orders. Example: 2d an ISO 8601 date format with the time offset and milliseconds being optional, e.g.
A time offset is optional (e.g. 2d+02:00) It can also be specified with the parameter timeZone If timeZone is undefined then UTC is used The value 0 indicates the current time |
controller_id | no | Actual Controller-id | The identifier of a Controller can be specified to limit the order resultset to workflows with the indicated Controller. |
batch_size | no | 10000 | The maximum number of orders for one request. The number of orders that 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 batch_size = 1 is used then each order is transitioned individually with a successful or failed result. 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: