You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Introduction

  • The Cycle Instruction allows to repeat all jobs or a number of jobs and additional instructions in a workflow.
  • The Cycle Instruction can be used
    • to spawn the complete workflow,
    • to spawn a number of jobs in a workflow,
    • in a sequential way by using a number of Cycle Instructions within the same workflow,
    • in a nested way by embedding Cycle Instructions within the same workflow.
  • The Cycle Instruction offers some versatile options when to repeat execution and how often this should happen.
  • Consider that a Cycle Instruction spawning a complete workflow is an alternative to using JS7 - Schedules for cyclic orders.
    • The difference being that JS7 - Schedules create cyclic orders whereas the Cycle Instruction causes cyclic execution of a workflow for a single order.
    • For each cyclic order a separate log entry is created while cyclic workflows report to the same log.
    • Processing of cyclic workflows is by far more efficient than use of cyclic workflows.
  • FEATURE AVAILABILITY STARTING FROM RELEASE 2.1.0

Elements of the Cycle Instruction

The Cycle Instruction allows to specify any number of cycles that define different rule sets when to repeat job nodes and other instructions.

Each cycle allows to use one the following cycle types:

  • periodical execution: allows to specify periodic points in time, as e.g. for the 10th, 15th, 40th minute of each hour.
  • continuous execution: allows to specify a fixed-length pause between cyclic executions.
  • ticking execution: allows to specify a fixed-length interval between each start of a cycle.

In addition for any cycles included with a Cycle Instruction a rule set specifies

  • the begin of first cycle considering the workflow's time zone
  • the maximum duration for which cycles are repeated, for example for 8 hours.

Cycles consider the weekday an order is scheduled for:

  • if the Cycle Instruction includes a rule set for the weekday of the order's scheduled date then this is considered by the order and makes the order wait for the first cycle to start.
  • if the Cycle Instruction does not includes a rule set for the weekday of the order's scheduled date then the order skips the cycle.

Periodical Execution

This cycle type allows to specify both

  • the period by which the cycle repeats: this can be for example 1 hour, 4 hours, 1 day etc.
  • the point in time within the repeat period when cycles start.

Download Workflow Example: pdwCyclicSimpleWorkflowPeriodical.json


Explanation:

  • The property editor displays the summary information of the period.
  • The period is configured
    • by use of a frequency, for example every day:
      • if an order's scheduled date (Daily Plan date) is not matched by a frequency then the order skips the Cycle Instruction,
      • otherwise the order considers the Cycle Instruction and e.g. waits for the begin of the first cycle,
    • by period details specifying the begin and duration of the period, e.g. begin of day for 23 hours,
    • by repeat details specifying for example
      • the repeat period of 1 hour,
      • the minutes for which the cycle is started in each repeat period..

When creating/modifying a periodical cycle then this can look like this:


Explanation:

  • The cycle is of periodical type, i.e. the cycle repeats within the given period at fixed points in time.
  • The period duration is 1h. 
  • The offsets when to start the cycle within the given period are specified by minutes: at each full hour, at each 15th, 30th and 45th minute of each hour.
  • The first cycle is specified to start at midnight, i.e. begin of day, in the workflow's time zone, with the last cycle being started 23 hours later.


Continuous Execution

This cycle type allows to specify

  • a fixed-length pause between cycle executions - consider that the execution time of jobs spawned by a Cycle Instruction might vary between cycles,
  • a limit specifying the max. number of cycles to be executed.

Download Workflow Example: pdwCyclicSimpleWorkflowContinuous.json


Explanation:

  • The property editor displays the summary information of the period.
  • The period is configured
    • by use of a frequency, for example every day,
      • if an order's scheduled date (Daily Plan date) is not matched by a frequency then the order skips the Cycle Instruction,
      • otherwise the order considers the Cycle Instruction and e.g. waits for the begin of the first cycle,
    • by period details specifying the begin and duration of the period, e.g. begin of day for 23 hours,
    • by repeat details specifying for example
      • a 15 minutes break between cycles,
      • a limit of 10 repeated executions of the cycle.

When creating/modifying a continuous cycle then this can look like this:


Explanation:

  • The cycle is of continuous type, i.e. the cycle repeats after a fixed-length pause between executions.
  • The period duration is 1h. 
  • The pause between execution of cycles within the given period is specified to be 15 minutes.
  • The cycle is repeated for a maximum of 10 times.
  • The first cycle is specified to start at midnight, i.e. begin of day, in the workflow's time zone, with the last cycle being started 23 hours later or when hitting the limit specified.

Ticking Execution

This cycle type allows to specify

  • a fixed-length interval between cycle executions - consider that the execution time of jobs spawned by a Cycle Instruction might vary between cycles,

Download Workflow Example: pdwCyclicSimpleWorkflowTicking.json


Explanation:

  • The property editor displays the summary information of the period.
  • The period is configured
    • by use of a frequency, for example every day,
      • if an order's scheduled date (Daily Plan date) is not matched by a frequency then the order skips the Cycle Instruction,
      • otherwise the order considers the Cycle Instruction and e.g. waits for the begin of the first cycle,
    • by period details specifying the begin and duration of the period, e.g. begin of day for 23 hours,
    • by repeat details specifying for example a 2 minutes fixed-length interval between cycles.

When creating/modifying a ticking cycle then this can look like this:


Explanation:

  • The cycle is of ticking type, i.e. the cycle repeats after a fixed-length interval between executions.
  • The interval between execution of cycles is specified to be 2 minutes.
  • The first cycle is specified to start at midnight, i.e. begin of day, in the workflow's time zone, with the last cycle being started 23 hours later or when hitting the limit specified.

Use of Cycles with Daylight Saving Changes

The workflow's time zone determines if and when daylight saving changes occur.

Basically any cycles are configured by the begin and duration of a period.

If the start time of a period matches a daylight saving change

  • for which the clock is forwarded by one hour then the cycle will start immediately. Assuming the clock to be forwarded from 2am to 3am then the cycle starts at 2am with the order history indicating 3am as the start time. The duration of the cycle's period is unaffected by daylight saving changes. For example if the duration is specified to be 3 hours then on a day for which the clock at 2am is forwarded to 3am the cycle is executed until 6am.
  • for which the clock is set back by one hour then the cycle will start according to its repeat interval. Assume the clock to be set back from 3am to 2am then the cycle starts at 2am with the order history indicating 2am as the start time. The duration of the cycle's period is unaffected by daylight saving changes. For example if the duration is specified to be 3 hours then on a day for which the clock at 3am is set back to 2am the cycle is executed until 4am.





  • No labels