Introduction
JS7 - Workflows implement jobs and dependencies for workload automation. Orders are triggers that cause the execution of workflows.
- The Configuration View provides a graphical design view from the JS7 - Workflow Editor.
- The Workflows View provides a tactical execution view that can be used to monitor the processing of orders with workflows in near real-time and to perform interventions if required.
- The Dashboard View provides a summary of current order states and navigation to the Orders Overview, which offers bulk operations. For details see JS7 - Orders - Bulk Operations.
Orders can be cancelled and can be suspended to prevent execution of instructions such as jobs. Suspended orders can be resumed.
The below mentioned "suspend/reset" operation is available from current JS7 releases:
FEATURE AVAILABILITY STARTING FROM RELEASE 2.7.2
Status Operations on Orders
Status operations are available individually per order and as bulk operations when a number of orders are selected in the Workflows view.
The following sample workflow is available which implements a number of jobs and passes variables between jobs:
- Download (upload .json): pdwOrderOperations.workflow.json
Cancel Order
Orders in PENDING, SCHEDULED, IN PROGRESS, RUNNING, SUSPENDED, PROMPTING, WAITING, BLOCKED and FAILED state can be cancelled: for details see the JS7 - Order State Transitions article:
- Cancel/softly: The operation allows an order to complete the current instruction, for example, executing a job. After completion of the instruction the order will leave the workflow with a failed history outcome.
- Cancel/terminate task: The operation forcibly terminates a current job instruction for a running task and makes the order leave the workflow with a failed history outcome.
Explanation:
- Cancelling an order is performed as an asynchronous operation which includes the JOC Cockpit, Controller and Agent.
- In a first step the order is displayed with a green/red bullet icon indicating that the order still is running and that the cancel operation is in progress.
- If the Controller or Agent cannot be accessed then display of the order will remain unchanged.
- Note that "inaccessible" can mean that the network connection was lost and that the Controller or Agent in fact is up and running. In this situation the order will continue to be processed by the Agent until the cancel operation is successfully transmitted to the Agent.
- In a second step the order will leave the workflow.
- In a first step the order is displayed with a green/red bullet icon indicating that the order still is running and that the cancel operation is in progress.
Deep Cancel Order
Child orders in IN PROGRESS, RUNNING, SUSPENDED, PROMPTING, WAITING, BLOCKED and FAILED state in a JS7 - Fork-Join Instruction or JS7 - ForkList-Join Instruction can be cancelled by applying the "Deep Cancel" operation to the parent order.
- Deep Cancel/softly: The operation allows child orders to complete the current instruction, for example, executing jobs. After completion of the instruction child orders will leave their branches and the parent order will leave the workflow with a failed history outcome.
- Deep Cancel/terminate tasks: The operation cancels child orders by forcibly terminating current job instructions for running tasks. Cancelled child orders will leave their branches and the parent order will leave the workflow.
Explanation:
- Deep Cancelling child orders is performed as an asynchronous operation which includes the JOC Cockpit, Controller and Agent.
- In a first step each child order is displayed with a green/red bullet icon indicating that the child order still is running and that the cancel operation is in progress.
- In a second step child orders will leave their branches and the parent order will leave the workflow with a failed history outcome.
Suspend Order
Orders in PENDING, SCHEDULED, IN PROGRESS, RUNNING, PROMPTING, WAITING, BLOCKED states can be suspended:
- Suspend/softly: The operation allows an order to complete the current instruction, for example, executing a job, and after completion of the instruction the order will be put to the SUSPENDED state. The JS7 - Retry Instruction and JS7 - Cycle Instruction when resumed will use the retry/cycle counter with which orders have been suspended.
- Suspend/terminate task: The operation will forcibly terminate a current job instruction for a running task, and will put the order to the SUSPENDED state.
- Suspend/reset: The operation will suspend the order and will reset the current instruction. The JS7 - Retry Instruction and JS7 - Cycle Instruction when resumed will use the initial retry/cycle counter. Without reset option an order can be resumed from the retry/cycle counter with which it has been suspended.
- Suspend/reset/terminate task: The operation combines resetting an order and forcibly terminating a running task.
Explanation:
- Suspending an order is performed as an asynchronous operation which includes the JOC Cockpit, Controller and Agent.
- In a first step the order is displayed with a green/orange bullet icon, indicating that the order still is running and that the suspend operation is in progress.
- In a second step the order will be displayed with an orange bullet icon indicating that the order has been suspended.
Deep Suspend Order
Child orders in IN PROGRESS, RUNNING, SUSPENDED, PROMPTING, WAITING, BLOCKED and FAILED state in a JS7 - Fork-Join Instruction or JS7 - ForkList-Join Instruction can be suspended by applying the "Deep Suspend" operation to the parent order.
- Deep Suspend/softly: The operation allows child orders to complete current instructions, for example, executing jobs. After completion of the instruction child orders will be put to the SUSPENDED state. The JS7 - Retry Instruction and JS7 - Cycle Instruction when resumed will use the retry/cycle counter with which they have been suspended.
- Deep Suspend/terminate tasks: The operation will forcibly terminate current job instructions for running tasks of child orders and will put child orders to the SUSPENDED state.
- Deep Suspend/reset: The operation will suspend child orders and will reset current instructions. The JS7 - Retry Instruction and JS7 - Cycle Instruction when resumed will use the initial retry/cycle counter. Without reset option child orders can be resumed from the retry/cycle counter with which they have been suspended.
- Deep Suspend/reset/terminate tasks: The operation combines resetting child orders and forcibly terminating running tasks.
Explanation:
- Deep Suspending child orders is performed as an asynchronous operation which includes the JOC Cockpit, Controller and Agent.
- In a first step child orders are displayed with a green/red bullet icon indicating that child orders still are running and that the suspend operation is in progress.
- In a second step child orders will be displayed with an orange bullet icon indicating that child orders have been suspended.
Resume Order
FAILED and SUSPENDED orders can be resumed from the Workflows view as follows:
- The order can be resumed from its current position in the workflow.
- The order can be resumed from a previous or later position in the workflow that matches the same instruction level.
- Order variables that are dynamically created and updated in a workflow can be modified.
- Consider that for failed orders the History status remains In Progress as long as the order did not complete the workflow.
Resuming an Order from a specific Job or Instruction
If the Resume operation is used for an order, then a tabular view of the workflow will be displayed:
- Users can click the Submit button to resume the order from its current position.
- Users can resume the order from a different position before or after the current position: clicking the order with the mouse and moving the order to the desired position makes the order resume from this position.
- This operation is available for instructions located at the same level in a workflow.
- This operation is denied for nested instructions:
- For example, an order can be resumed from a position inside a JS7 - Fork-Join Instruction branch. Similarly the order can be resumed from the end of the branch. However, an order cannot be resumed from a different branch or outside of the Fork-Join Instruction.
- For example, an order can be resumed from other positions inside a JS7 - Lock Instruction. However, it cannot be resumed outside of the Lock Instruction.
Dragging & dropping an order with the mouse to a different position in the workflow looks like this:
Resuming an Order and modifying Workflow Variables
The above example shows a workflow variable that can be modified:
- Variables are displayed with values that are historically specific before starting the failed job.
- Variables with modifiable values can be selected from a checkbox:
- If a variable is selected then its current value will be used when resuming from the selected position in the workflow.
- Consider that this will overwrite the historic value of the variable for the targeted workflow position.
- Users are free to modify the values of variables.
- If a variable is not selected then it will use the historic value associated with the position in the workflow from which the order will be continued.
- If a variable is selected then its current value will be used when resuming from the selected position in the workflow.
- Variables with constant values cannot be modified. This includes order variables that are added when planning the order and this includes variables that are declared with a workflow. Other variables that are created dynamically during workflow execution can be modified.
Resuming an Order and specifying the Cycle End Time
If an order is suspended or failed in a JS7 - Cycle Instruction then users can modify the cycle end time:
- A period shorter than configured with the Cycle Instruction can be specified.
- Periods are specified by relative dates, for example
1h
(1 hour),10m
(10 minutes),01:30:00
(1 hour, 30 minutes). - Specifying a value
0
for the period will cause the order to continue from the resumed position in the workflow, to execute subsequent jobs and to leave the cycle next time it meets the Cycle Instruction.
- Periods are specified by relative dates, for example
- A period that is specified longer than configured with the Cycle Instruction will be ignored
Let Run Order
Orders in a PENDING, SCHEDULED or WAITING state for a JS7 - Cycle Instruction or JS7 - Retry Instruction can be forced to run immediately from the Workflows view as follows:
- Orders will be running from their current position in the workflow.
- Orders in the WAITING state ignore the wait time for a next cycle or a next retry and will run immediately.
- Orders in the PENDING or SCHEDULED state will start immediately.
FEATURE AVAILABILITY STARTING FROM RELEASE 2.7.0
- JS-2111Getting issue details... STATUS
- JOC-1763Getting issue details... STATUS
Let Run Order from Workflows View
The functionality is available from the Workflows view like this:
Let Run Order from Daily Plan View
When used with the JS7 - Daily Plan view the operation brings the following behavior:
- The order remains assigned its original Daily Plan date though it is executed at an earlier date/time. This means that the order will not consider Notices from JS7 - Notice Boards of an earlier Daily Plan date but Notices of its original Daily Plan date if the “let run” operation causes the order to start before begin of the assigned Daily Plan.
- Users who wish to modify an order's assignment to the Daily Plan and to Notices matching the order's effective start date can use the operation "Modify start time" with option "Now" from the Daily Plan view.
- The "let run" operation is available for non-cyclic orders in the submitted state. For bulk operations users have to apply the One-time Orders filter.
FEATURE AVAILABILITY STARTING FROM RELEASE 2.7.1
- JOC-1779Getting issue details... STATUS
Transfer Orders
The operation is available with the Workflows view and can be applied in a situation when users find more than one version of the same workflow:
- When deploying workflows then a new version of the workflow is created.
- Orders that did not yet start and that hold the PENDING or SCHEDULED state make use of the new workflow version.
- Orders that have started and that hold any other state will remain with the previous workflow version. The reason being that changes to the workflow can disrupt orders that have been added to a previous version of the workflow. For example, if certain jobs or instructions have been added before the order's current position in the workflow, then this will break execution of an existing order.
The operation to transfer orders is available for previous workflow versions and includes to transfer all orders to the latest version of the workflow.
Explanation:
- The previous version of the workflow holds 2 orders in the SCHEDULED and in the SUSPENDED state. This version of the workflow will not accept new orders but will continue to run orders previously assigned.
- The latest version of the workflow currently is not assigned any orders.
The previous version of the workflow offers the "Transfer Orders to latest Version" action menu item like this:
As a result of the transfer operation users find all orders assigned the latest workflow version. The previous workflow version disappears as it is no longer needed with all orders being transferred.
Transfer is possible within limits of the order state:
- If orders are in the PENDING, SCHEDULED, FAILED, SUSPENDED, PROMPTING state then transfer is possible without limits.
- If orders are in the IN PROGRESS, RUNNING or BLOCKED state then transfer is not possible. ,
- If orders are in the WAITING state then it depends on what orders are waiting for:
- Orders waiting for Notices from JS7 - Notice Boards can be transferred. If the definition of Notice Boards changes between workflow versions then users can apply the "suspend/reset" operation, can transfer orders and can resume orders from the latest workflow version.
- Orders waiting for JS7 - Admission Times for Jobs can be suspended, transferred and resumed from the latest workflow version.
- Orders waiting for a JS7 - Cycle Instruction require to apply the "suspend/reset" operation to transfer orders and to resume orders from the latest workflow version.
Generally, users can suspend WAITING orders. When orders are in the SUSPENDED state then they can be transferred to the latest workflow version and can be resumed.
- Use of the "suspend/reset" operation will suspend orders and will reset the current instruction. The JS7 - Retry Instruction and JS7 - Cycle Instruction when resumed will use the initial retry/cycle counter.
- Use of the "suspend/softly" operation allows to resume orders from the retry/cycle counter with which they have been suspended.
Bulk Operations
The Workflows view displays a maximum of three orders for each workflow. The overall number of orders available for the workflow is displayed by the grey order indicator:
When clicking the order indicator, a popup window with the list of orders will be displayed as follows:
Explanation:
- Clicking the Order ID of an order will cause the order log to be displayed.
- Selecting one or more orders will allow the cancel, suspend or resume bulk operations to be carried out for the selected orders, according to the order state.
- When an order is resumed from a bulk operation then:
- the position from which the order will be resumed will always be the current position,
- the order variables cannot be modified.
Resources
- JS7 - Order State Transitions
- JS7 - Orders - Bulk Operations
- JS7 - Workflows - Start Positions and End Positions of Orders
- JS7 - Workflows - Status Operations on Workflows
- JS7 - Workflows - Status Operations on Jobs