Introduction

The ConsumeNotices Instruction is used to wait for a number of Notices from JS7 - Notice Boards that have been added by a JS7 - PostNotices Instruction. The ConsumeNotices Instruction is a block instruction that can include any other instructions and that will delete the Notices that have been waited for when an order reaches the end of the instruction block.

  • A workflow can include any number of ConsumeNotices Instructions to wait for Notices from the same or from different Notice Boards.
  • Behavior with JS7 - Global Notice Boards
    • Consuming a Notice blocks further execution in a workflow until the Notice becomes available. The order in the expecting workflow will continue after it successfully found the Notice.
    • Behavior with JS7 - Schedulable Notice Boards
      • Consuming a Notice is configurable
        • to block further execution in an expecting workflow until the Notice becomes available. The order in the expecting workflow will continue after it successfully found the Notice.
        • to immediately process the instructions included in the ConsumeNotices Instruction block in the expecting workflow if no Notice is announced for the related day.
        • to skip the condition and to immediately proceed with instructions following the ConsumeNotices Instruction in the expecting workflow if no Notice is announced for the related day.
      • FEATURE AVAILABILITY STARTING FROM RELEASE 2.7.4

FEATURE AVAILABILITY STARTING FROM RELEASE 2.5.0

Notice

  • A Notice is considered an event that the ConsumeNotices Instruction is waiting for. One or more corresponding PostNotices Instructions create the Notice from the same or from different workflows.
  • Both PostNotices and ConsumeNotices Instructions reference a common Notice Board identified by its name. The Notice Board implements expressions for the PostNotices Instruction and for the ConsumeNotices Instruction to identify a common Notice ID. The Notice ID typically is identified from a common part of each Order ID of the posting order and the expecting order, for example, from the daily plan date.
    • Example
      • An Order ID #2021-07-24#T7142453954-myOrder1 is running in a workflow and meets a PostNotices Instruction. The Notice Board referenced by this instruction includes an expression for the posting order to create a Notice ID based on the daily plan date included with the Order ID. The expression extracts the date from the Order ID, i.e. 2021-07-24, and makes this date the Notice ID.
      • An expecting Order ID #2021-07-24#T7142454683-myOrder2 meets a ConsumeNotices Instruction in its workflow. The instruction similarly applies the expression from the referenced Notice Board to create a Notice ID. In most situations the rule specifying what is to be extracted from an Order ID is the same for the posting order and for the expecting order.
        • If both instructions identify the same Notice ID, i.e. the daily plan date 2021-07-24, then the expectation is met and the order proceeds with the next step following the ConsumeNotices Instruction.
        • If the expectation is not met, for example, if the Notice has not yet been created by a posting order, or if the Daily Plan date of the Notice ID is not the same for the posting order and for the expecting order, then the expecting order will wait until a matching Notice becomes available.
      • If the last instruction in a ConsumeNotices Instruction block is completed then the Notices that have been waited for will be deleted.
    • Users can manually add and delete Notices to/from a Notice Board to force ConsumeNotices Instructions to be triggered.
  • Any number of workflows can implement PostNotices Instructions and ConsumeNotices Instructions referencing the same or different Notice Boards.
  • Consider that the JS7 - ExpectNotices Instruction works similarly to ConsumeNotices except for the fact that it will not remove related Notices.

Workflow Instruction: ConsumeNotices

  • The instruction can be placed at any position in a workflow including nested instructions such as the JS7 - If InstructionJS7 - Try-Catch Instruction etc.
  • The instruction holds an expression to specify the Notice Boards from which Notices will be expected and deleted.
  • The instruction can include any number of other instructions. At the same time, it can be used without any instructions included to wait for a number of Notices and to delete them.

The ConsumeNotices Instruction is managed from a workflow in the Configuration view of JOC Cockpit:

Notice Boards

Users can select one or more Notice Boards from which Notices are expected. As a result, the ConsumeNotices Expression holds the names of the Notice Boards:

Alternatively, users can type an expression to specify a number of Notice Boards and respective conditions. Hitting the Ctrl+Space keys will display the list of Notice Board names.


Explanations:

  • Expressions include use of
    • && as an "and" condition
    • || as an "or" condition
    • Parantheses, specify the precedence by which conditions will be evaluated.
  • Notice Board names in expressions must be quoted.

Processing Instructions

The following processing instructions are offered:

Explanations:

  • Wait: block further execution in the workflow until the Notice becomes available. The order will continue after it successfully found the Notice
  • The following Processing Instructions are available for use with JS7 - Schedulable Notice Boards.
    • Process: immediately process the instructions included in the ConsumeNotices Instruction block if no Notice is announced for the related day.
    • Skip: skip the condition and proceed with instructions following the ConsumeNotices Instruction if no Notice is announced for the related day.

Error Handling

If a job within a Consume Instruction fails, then the order is considered to be failed. In this situation the following applies:

  • If error handling is applied inside a ConsumeNotices Instruction, for example by use of a Try/Catch Instruction or Retry Instruction then a temporarily failed order can continue.
  • If no error handling is applied inside a ConsumeNotices Instruction, then the order is moved to the begin of the outmost ConsumeNotices Instruction and is put to the failed state to prevent the order form permanently blocking Notices from being deleted.
  • Users who wish orders to remain with a failing job or other instruction and to continue blocking Notices from being deleted can apply the JS7 - Options Instruction.

Further Resources


  • No labels