Versions Compared

Key

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

Table of Contents

Introduction

The

...

ExpectNotices Instruction is used to

...

wait for a number of Notices from JS7 - Notice Boards

...

that have been added by

...

a JS7 -

...

PostNotices Instruction.

  • A workflow can include any number of ExpectNotice ExpectNotices Instructions to await notices wait for Notices from the same or from different Notice Boards.
  • Reading Expecting a Notice blocks further execution in a workflow until the Notice becomes available. The expecting order continues having successfully accessed a Noticeafter it has successfully found the Notice.

Starting from release 2.4.0 the ExpectNotice Instruction is replaced by the ExpectNotices Instruction allowing any number of Notices to be waited for from a single instruction. JS7 handles compatibility and automatically converts existing ExpectNotice Instructions to ExpectNotices Instructions.

Notice

  • A Notice is considered an event that the ExpectNotice ExpectNotices Instruction is waiting for. One or more corresponding PostNotice PostNotices Instructions create  create the Notice from the same or from different workflows.
  • Both PostNotice PostNotices and ExpectNotice ExpectNotices Instructions reference a common Notice Board identified by its name. The Notice Board implements expressions for the PostNotice PostNotices Instruction and for the ExpectNotice ExpectNotices Instruction to identify a common Notice ID. The Notice ID typically is identified from a common part of the 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 PostNotice 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-2707-24, and makes this date the Notice ID.
      • An expecting Order ID #2021-07-24#T7142454683-myOrder2 meets an ExpectNotice ExpectNotices 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 extract 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-
        27
        • 07-24, then the expectation is met and the order proceeds with the next step following the
        ExpectNotice
        • ExpectNotices 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
        the
        • a matching Notice becomes available.
    • Users can manually add and delete Notices to/from a Notice Board to force ExpectNotices Instructions to be triggered.
  • Any number of workflows can implement PostNotice PostNotices Instructions and ExpectNotice ExpectNotices Instructions referencing referencing the same or different Notice Boards.

ExpectNotice Instruction

Workflow Instruction: ExpectNotices

  • This instruction can be placed at any position in a workflow including nested instructions such as the JS7 - If InstructionJS7 - Try-Catch Instruction etc.
  • This instruction has a single property: the expression to specify the Notice Boards that the instruction is waiting for.

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

Image Added


Users can select a single Notice Board from which a Notice is expected. As a result the ExpectNotices Expression holds the name of the Notice Board:

Image Added


In addition users can specify an expression to specify a number of Notice Boards and respective conditions:

Image Added


Expressions include use of

  • && as an "and" condition
  • || as an "or" condition
  • brackets specify precedence by which conditions are evaluated.

Further Resources