Introduction

JS7 - Notice Boards implement dependencies between a number of workflows.

  • One or more workflows wait for each other based on Notices that they expect and that they post. A posting workflow holds a JS7 - PostNotices Instruction while one or more expecting workflows include the JS7 - ExpectNotices Instruction or JS7 - ConsumeNotices Instruction. Expecting workflows wait until a Notice arrives from a posting workflow.
  • Notice Boards are used to manage the creation of Notices and the desired dependency scheme:
    • Global Notice Boards implement hard dependencies that are applied without exception,
    • JS7 - Schedulable Notice Boards implement soft dependencies based on the JS7 - Daily Plan and consider dependencies for days only for which posting workflows are scheduled by related orders.

The article offers a tutorial to users who wish to implement workflow dependencies.

Global Notice Boards

Notices by default are unlimited in scope and are global in the sense that they exist for any days independently from the Daily Plan.

Notices can be posted and deleted by workflows and by users. Notices are assigned a lifetime for automated expiration.

Notices from Global Notice Boards specify a Notice ID that is used to identify matching orders from the posting and expecting workflows. This offers certain granularity to identify matching orders:

  • The Notice ID can hold a constant value which translates to the fact that orders for posting and expecting workflows will match for any days.
  • The Notice ID can hold a JS7 - Expressions for Variables that specifies for orders of both posting and expecting workflows the match criteria based on their Order IDs. For example, an expression can use the Daily Plan date available from the Order ID to match orders from posting and expecting workflows only that hold the same Daily Plan date.

Notices

  • A Notice is considered an event that the ExpectNotices Instruction is waiting for. One or more corresponding PostNotices Instructions create the Notice from the same or from different workflows.
  • Both PostNotices and ExpectNotices Instructions reference a common Notice Board identified by its name. The Notice Board implements expressions for the PostNotices Instruction and for the ExpectNotices 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 of 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-27-24, and makes this date the Notice ID.
      • An expecting Order ID #2021-07-24#T7142454683-myOrder2 meets an ExpectNotices Instruction in its workflow. The instruction applies the expression from the referenced Notice Board to create a Notice ID. In most situations the rule what to extract from an Order ID is the same for orders in the posting and expecting workflows.
        • If both instructions identify the same Notice ID, i.e. the Daily Plan date 2021-27-24, then the expectation is met and the order proceeds with the next step following the ExpectNotices Instruction.
        • If the expectation is not met, for example if the Notice has not yet been created by an order for the posting workflow or if the Daily Plan date of the Notice ID is not the same for orders of the posting and expecting workflows, then orders for the expecting workflow will wait until a matching Notice becomes available.
    • If no order is announced for the posting workflow for the date when an order in the expecting workflow meets an ExpectNotices Instruction then
      • for use with Global Notice Boards the order in the expecting workflow will wait.
      • for use with Schedulable Notice Boards the order in the expecting workflow can be configured to wait or to ignore the Notice condition.
  • Notices of Global Notice Boards are assigned a lifetime that starts when being posted.
    • If an expecting order starts before expiration of a Notice's lifetime then the order can continue.
    • If an expecting order starts after expiration of a Notice's lifetime then the order will wait for the next Notice.
  • Any number of workflows can implement PostNotices Instructions and ExpectNotices Instructions using the same or different Notice Boards.

Plans

Plans are spaces created internally in JS7 to resolve dependencies from Notices.

Currently, Plans have a fixed duration of 24 hours that corresponds to the Daily Plan date. Future versions of JS7 will offer parallel Plans for an arbitrary duration such as weeky, monthly Plans.

The purpose of a Plan is to specify the begin and end of a period of Daily Plan dates that share Notices. This allows an overlapping Daily Plan, for example with Monday's Notices being considered independently from Tuesday's Notices. Should Monday's Daily Plan be exceeded to a later point in time on Tuesday, Wednesday etc., for example in case of orders not being completed on Monday, then such orders will stick to Monday's Daily Plan date to resolve dependencies.

Tuesday's orders will resolve dependencies within the scope of Tuesday's Plan independently from Monday's Plan. Overlapping allows to run Monday's and Tuesday's Daily Plan in parallel without interfering scope of Notices.

  • Some users wish to complete Monday's Daily Plan before starting orders for Tuesday's Daily Plan. This is possible in JS7, either by manual control of the completion of Monday's orders or by transitioning such orders automatically, for example using the JS7 - JITL OrderStateTransitionJob.
  • Some users wish Monday's Daily Plan to overlap with Tuesday's Daily Plan in case that Monday's orders are late. This is the default behavior of JS7.

Plans can be created/opened, closed and deleted:

Creating Plans

Plans are automatically created when orders are scheduled, for example from the JS7 - Daily Plan Service and when manually adding orders.

  • For Schedulable Notice Boards announcements of Notices will be created by posting Workflows triggered from orders for a given Daily Plan date. In other words: if an order is scheduled for a workflow that holds a PostNotices Instruction, then an announcement is created for the order's Daily Plan date at the point in time when the order is added.
    • If an announcement is available, then orders in expecting workflows will wait for Notices from Schedulable Notice Boards.
    • If no announcement is available, then orders in expecting workflows can be configured to skip or to immediately process subsequent instructions in a workflow.
  • No announcements are used for Global Notice Boards.

Closing Plans

When a Plan is closed, then no orders can be added. The Plan still can hold Notices and unfinished orders that can continue for any duration.

A closed Plan can be opened, allowing to add orders for the related/past Daily Plan date.

By default Plans are automatically closed 1 day after Daily Plan date. The value can be changed from the age_of_plans_to_be_closed_automatically setting in the JS7 - Settings page. For details see JS7 - Daily Plan Service.

Users have the option to manually close a Plan from the Daily Plan -> Dependencies view.

Deleting Plans

Plans are automatically deleted if they previously have been closed and if no orders are present. On deletion all Notices related to a Plan will be dropped.

No operations are applicable to a deleted Plan.

Configuration

Examples

Download

Examples for configuration of Notice Boards, workflows and schedules are available for download: global_notice_boards.zip

Import

For import of examples see JS7 - Inventory Export and Import.

Examples by default will be imported to the /GlobalNoticeBoards/Examples folder. Users can prepend an existing folder on import.

Notice Boards

The SYN-ExNoticeGlobalAny Notice Board is specified of type global like this:

  • Notice IDs for posting and expecting orders hold the same, quoted arbitrary string, in the example: 'any'
  • The Notice Board will match any Notices created for the board.
  • The lifetime of the Notice is limited to 24 hours in case that it will not be deleted by a JS7 - ConsumeNotices Instruction of by the user.


The SYN-ExNoticeGlobalOrderDate Notice Board is specified of type global like this:

  • Notice IDs for posting and expecting orders hold the same expression that is respectively copied from the select button "Matching Daily Plan Date". 
  • The Notice Board will match Notices created from orders for the same Daily Plan date.
  • The lifetime of the Notice is limited to 24 hours in case that it will not be deleted by a JS7 - ConsumeNotices Instruction of by the user.


The SYN-ExNoticeGlobalOrderDateName Notice Board is specified of type global like this:

  • Notice IDs for posting and expecting orders hold the same expression that is respectively copied from the "Matching Daily Plan Date and Name" select button.
  • The Notice Board will match Notices only created from orders for the same Daily Plan date holding the same value in their Order Name attribute.
  • The lifetime of the Notice is limited to 24 hours in case that it will not be deleted by a JS7 - ConsumeNotices Instruction of by the user.


The SYN-ExNoticeGlobalUsersOK Notice Board is specified of type global like this:

  • Notice IDs for posting and expecting orders hold the same, quoted arbitrary string, in the example: 'ok'
  • The Notice Board will match any Notices created for the board.
  • The lifetime of the Notice is limited to 24 hours in case that it will not be deleted by a JS7 - ConsumeNotices Instruction of by the user.

Workflows

Expecting Workflows

The SYN-ExNoticeGlobalExpectAny workflow makes use of the JS7 - ExpectNotices Instruction to wait for Notices of the SYN-ExNoticeGlobalAny Notice Board:

  • The ExpectNotices Instruction holds the quoted name of the Notice Board in its expression:
    'SYN-ExNoticeGlobalAny'
  • The ExpectNotices Instruction is configured to Wait for Notices from posting workflows or from users for the related day.


The SYN-ExNoticeGlobalExpectOrderDate workflow makes use of the JS7 - ExpectNotices Instruction to wait for Notices of the SYN-ExNoticeGlobalOrderDate Notice Board:

  • The ExpectNotices Instruction holds the quoted name of the Notice Board in its expression:
    'SYN-ExNoticeGlobalOrderDate'
  • The ExpectNotices Instruction is configured to Wait for Notices from posting workflows or from users for the related day. Orders will pass the instruction if they meet a matching order from a posting workflow for the same Daily Plan date.


The SYN-ExNoticeGlobalExpectOrderDateName workflow makes use of the JS7 - ExpectNotices Instruction to wait for Notices of the SYN-ExNoticeGlobalOrderDateName Notice Board:

  • The workflow includes two ExpectNotices Instructions each holding the quoted name of a Notice Board in its expression:
    'SYN-ExNoticeGlobalOrderDate'
    'SYN-ExNoticeGlobalOrderDateName'
  • The workflow's business logic includes to proceed with job1 when the SYN-ExNoticeGlobalExpectOrderDate Notice is found. When job1 is completed then the SYN-ExNoticeGlobalExpectOrderDateName Notice is expected. See next example for an alternantive implementation using a single ExpectNotices Instruction.
  • The ExpectNotices Instruction is configured to Wait for Notices from posting workflows or from users for the related day. Orders will pass the instruction if they meet a matching order from a posting workflow for the same Daily Plan date holding the same value in their Order Name attribute.


The SYN-ExNoticeGlobalOrderDateExpectAndOr workflow makes use of the JS7 - ExpectNotices Instruction to wait for Notices from both the SYN-ExNoticeGlobalOrderDate and SYN-ExNoticeGlobalOrderName Notice Boards and alternatively to accept a Notice from user intervention:

  • The ExpectNotices Instruction holds the quoted names of Notice Boards in its expression:
    ('SYN-ExNoticeGlobalOrderDate' && 'SYN-ExNoticeGlobalOrderName' ) || 'SYN-ExNoticeGlobalUsersOK'
    • The && operator specifies a logical and.
    • The || operater specifies a logical or.
    • Parantheses are used to specify the order of evaluation.
  • The ExpectNotices Instruction is configured to Wait for Notices from posting workflows or from users for the related day.


The SYN-ExNoticeGlobalOrderDateNameConsumeAndOr workflow makes use of the JS7 - ConsumeNotices Instruction to wait for Notices from both the SYN-ExNoticeGlobalOrderDate and SYN-ExNoticeGlobalOrderName Notice Boards and alternatively to accept a Notice from user intervention:

  • The workflow acts similar to the previous example, except for the fact that it will delete referenced Notices if they are present.
  • The ConsumeNotices Instruction holds the quoted names of Notice Boards in its expression:
    ('SYN-ExNoticeGlobalOrderDate' && 'SYN-ExNoticeGlobalOrderName') || 'SYN-ExNoticeGlobalUsersOK'
    • The && operator specifies a logical and.
    • The || operater specifies a logical or.
    • Parantheses are used to express the order of evaluation.
  • The example boils down to the fact that the condition will be resolved if Notices for both SYN-ExNoticeGlobalOrderDate and SYN-ExNoticeGlobalOrderName Notice Boards are present or if the user or some other workflow posts a Notice from the global SYN-ExNoticeGlobalUsersOK Notice Board.
  • The ConsumeNotices Instruction is configured to Wait for Notices from posting workflows or from users for the related day.

Posting Workflows

The SYN-ExNoticeGlobalPostAny workflow makes use of the JS7 - PostNotices Instruction to post a Notice to the SYN-ExNoticeGlobalAny Notice Board:

  • The PostNotices Instruction specifies the Notice Board: SYN-ExNoticeGlobalAny


The SYN-ExNoticeGlobalOrderDatePost workflow makes use of the JS7 - PostNotices Instruction to post a Notice to the SYN-ExNoticeGlobalOrderDate Notice Board:

  • The PostNotices Instruction specifies the Notice Board: SYN-ExNoticeGlobalOrderDate


The SYN-ExNoticeGlobalOrderDateNamePost workflow makes use of the JS7 - PostNotices Instruction to post Notices to both the SYN-ExNoticeGlobalOrderDate and SYN-ExNoticeGlobalOrderDateName Notice Boards:

  • A PostNotices Instruction can hold references to one or more Notice Boards.
  • Instead of posting both Notices from a single PostNotices Instruction, the example makes use of separate PostNotices Instructions to implement the condition that the second Notice is posted only if some later job was successfully completed.

Schedules

Orders for Expecting Workflows

Schedules are created to add Orders to expecting workflows:

  • Orders are scheduled for Monday to Sunday.
  • Examples make use of 4am start time in the UTC time zone.

Further schedules for expecting workflows look similar to the above example.

Orders for Posting Workflows

Schedules are created to add Orders to posting Workflows:

  • Orders are scheduled for Monday to Friday or Monday to Sunday.
  • The example makes use of 9am start time in the UTC time zone.
     

Visualization

Daily Plan Dependencies

Users can check dependencies from the Daily Plan -> Dependencies sub-view.

Display of Dependencies

When switching to a day in the calendar widget to which orders have been added that are already started, for example for the current day, then the picture can look like this:

  • The blue color of posting workflows indicates normal operation.
  • The blue color of expecting workflows indicates that no Notices are expected, for example on weekends for which no orders are scheduled.
  • The yellow/green color of expecting workflows indicates that orders are in the waiting state with ExpectNotices or ConsumeNotices Instructions.
    • The numeric indicator in expecting workflows specifies the number of waiting orders. Clicking the numeric indicator invokes a popup window that will display the orders.
  • The yellow/green color to and from Notice Boards indicates that orders are in the waiting state in expecting workflows and that orders for posting workflows have not been started or did not yet reach the related PostNotices Instruction in the workflow.


When switching to a day in the calendar widget for which orders for posting workflows and for expecting workflows have been completed, then the picture can look like this:

  • The blue color of posting workflows and expecting workflows indicates normal operation.
  • The blue color to and from Notice Boards indicates that orders have previously been executed and that and all dependencies have been resolved.


When switching to a future day in the calendar widget for which no orders have started, then the picture can look like this:

  • The blue color of posting workflows and expecting workflows indicates normal operation.
  • The grey color to and from Notice Boards indicates that no orders are available and no dependencies are open.


Workflows View

Users can check and can manage dependencies from the Workflows view.

  • For posting and expecting workflows orders are displayed. Consider the "Order Filter" button that limits the future period for which orders will be visible. A yellow/green color indicator specifies the waiting state of orders.
  • Users can identify the Notice Boards used for each PostNotices, ExpectNotices and ConsumeNotices Instruction. For Notice Boards checkboxes are offered that can be checked to perform the bulk operation of posting Notices to related orders.

Further Resources


  • No labels