You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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

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 and com.sos.jitl.jobs.orderstatustransition.OrderStateTransitionJob Java class name and add arguments specifying what order states to transition..

Example

Download (upload .json): pdwOrderStateTransitionJob.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,scheduled
    • transition: Specifies the transition to be performed. Possible values are cancel, 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:

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:

NameRequiredDefault ValuePurpose
statesyesn/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"

transition

yesn/a

Possible values: cancel, suspend, continue.

  • cancel: Execute cancel for the orders
  • continue: Execute resume for failed and suspended orders. Execute confirm for prompting orders.
  • suspend: Execute suspend for the orders that are not failed and not finished
workflow_foldersno/*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_patternsnon/a

A list of search patterns for workflow folders that contains the orders.

Example: *myWorkflow*, my?orkflow

order_search_patternsno/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_durationnon/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.

  • YYYY-MM-DDThh:mm:ss[.s][Z (Z means +00)]
  • YYYY-MM-DDThh:mm:ss[.s][+01:00]
  • YYYY-MM-DDThh:mm:ss[.s][+0100]
  • YYYY-MM-DDThh:mm:ss[.s][+01]
  • a format for a period relative to the current time, e.g. 6h, 12h, 1d, 1w that specifies the quantity followed by a qualifier:
  • s (seconds)
  • m (minutes)
  • h (hours)
  • d (days)
  • w (weeks)
  • M (months)
  • y (years)

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_idnoActual Controller-idThe identifier of a Controller can be specified to limit the order resultset to workflows with the indicated Controller.
batch_sizeno10000

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:

 

Further Resources



  • No labels