Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Halts execution of an order in a workflow until the prompt is confirmed. The order is assigned the PROMPTING state.
  • PROMPTING orders remain with their workflow position and require user intervention to transition from this state.
  • Users can confirm, suspend and cancel PROMPTING orders, see JS7 - Order State Transitions
  • This instruction can be used to request confirmation by a user or by an external application that make use of the JS7 - REST Web Service API

Workflow Instruction: Prompt

Configuration

Download Workflow Example: pdwPrompt.json



Explanation:

  • The workflow executes an initial job1 and makes use of an If Instruction to check a previous job's return values. See JS7 - If Instruction for details of how to add expressions to If InstructionsPrompt Instruction to request confirmation to continue.
  • If the If Instruction evaluates to true then the Fail Instruction is executed. The order is then assigned the FAILED state.When an order is failed, a message and a return code that specify the reason for failing the order can be added as an optionconfirmation is provided then the order continues and executes job2.

Execution

When the above workflow is executed then the order is halted with the Prompt Instruction and is put to the PROMPTING state.

The JOC Cockpit Dashboard view displays the currently prompting orders. The JOC Cockpit Workflows view offers the option to confirm execution from the order's action menu:


Image Added


Selecting the "Confirm" option opens a window that displays the message defined with the Prompt Instruction:


Image Added


If the prompt is confirmed then order continues execution of the workflow.