Versions Compared

Key

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

Introduction

  • The Prompt Instruction halts

Purpose

  • 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 or 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 makes use of the JS7 - REST Web Service API.

Workflow Instruction: Prompt

...

Download Workflow Example (.json upload)pdwPrompt.json



Explanation:

  • The workflow executes an initial job1 and makes use of a Prompt Instruction to request confirmation to continue.
    • The prompt message can be added as a string.
    • In addition, the message can include variables that are available from the workflow, the order or from JS7 - Job Resources like this:
      • 'job completed with return code value: ' ++ $returnCode ++ ', please confirm the order to be continued'
      • When using text and variables then text is put in single quotes and is concatenated by use of the ++ operator, see JS7 - Expressions for Variables.
      • $returnCode is a built-in variable, in addition any variables accessible to workflow instructions can be used.
  • If the confirmation is provided then the order continues and executes job2.

Execution

When the workflow described above workflow is executed, then the order is will be halted with the Prompt Instruction and is put to into the PROMPTING state.

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

...

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

...