Versions Compared

Key

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

...

  • The Cycle Instruction allows repetition of all or some of the jobs and additional instructions in a workflow.
  • The Cycle Instruction can be used:
    • to spawn the complete workflow,
    • to spawn a number of instructions and 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 versatile options for repeated execution and specification of how often this should happen.
    • The JS7 - Break Instruction can be used to make an order prematurely leave a cycle.
      Display feature availability
      StartingFromRelease2.5.3
  • Cyclic workflows are an alternative to use of JS7 - Schedules for cyclic orders.

...

In addition to any cycles included in a Cycle Instruction the rule set specifies:

  • The period for execution of the cycle:
    • The period begin of the cycle considering the Daily Plan's time zone,
    the
    • The maximum duration for which the cycle is repeated, for example for 8 hours.
  • More than one period can be specified.
    • The order will leave the Cycle Instruction having completed the cycles of the period at which it entered the Cycle Instruction.
    • Example:
      • Period 1: start time at 18:00 for 1 hour with a ticking cycle of 2 minutes.
      • Period 2: start time at 20:00 for 1 hour with a ticking cycle of 2 minutes
    • Behavior:
      • The cycle starts when the start time of Period 1 is reached . The order runs in cycles as configured by the Cycle Instruction.
      • The order performs its last cycle at the end of Period 1 and leaves the Cycle Instruction. The order does not wait and enter Period 2 or any later periods.
      • Similar behavior applies to any number of periods of a Cycle Instruction.
    • Users who wish orders to pass all periods of a Cycle Instruction should add one order per period that is scheduled for a start time after the previous period and before the desired period.

Cycles take account of the weekday which an order is scheduled for:

...

  • The cycle is of the 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 midnight00:00:00, i.e. at the start of the day , in the workflowDaily Plan's time zone, with the last cycle being started 23 hours later.
  • If the execution time of cycle takes exceeds the next period then the next cycle will be started immediately once the orders arrives at the Cycle Instruction.

Continuous Execution

This cycle type allows specification of:

...

  • The property editor displays the summary information of the period.
  • The period is configured:
    • using 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 , for example, waits for the begin of the first cycle,
    • using period using period details to specify the start and duration of the period, for example, the start of the day in the Daily Plan's time zone duration for 23 hours,
    • using repeat details to specify, for example:
      • a 15 minutes break between cycles,
      • a limit of 10 repeated executions of the cycle.

When creating/modifying updating a continuous cycle, then the properties can look like:

...

  • The cycle is of the continuous type, i.e. the cycle repeats after a fixed-length pause between executions.
  • 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 midnight00:00:00, i.e. begin of day , in the workflowDaily Plan's time zone, with the last cycle being started 23 hours later or when hitting the limit specified.

...

  • The property editor displays the summary information of the period.
  • The period is configured:
    • using 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, for example, waits for the start of the first cycle,
    • using period using period details to specify the start and duration of the period, for example, at the start of the day in the Daily Plan's time zone for a duration of 23 hours,
    • using repeat details to specify, for example, a 2 minute fixed-length interval between cycles.

...

  • The cycle is of the 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 midnight00:00:00, i.e. at the start of the day , in the workflowDaily Plan's time zone, with the last cycle being started 23 hours later or when hitting the limit specified.
  • if a cycle takes longer than specified by the ticking interval then the next cycle starts immediately after the order will arrive at the Cycle Instruction.

Anchor
daylight_saving_changes
daylight_saving_changes
Use of Cycles with Daylight Saving Changes

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

...

  • Execution
    • A Cycle Instruction spawning a complete workflow is an equivalent to a cyclic order from a Schedule.
    • In addition, a Cycle Instruction can be used to execute parts of a workflow in cycles.
  • Efficiency
    • Schedules create a number of order instances for each period in a cycle, Running a single workflow every 30s counts to 2880 orders per day.
    • Cycle Instructions cause cyclic execution of a workflow from a single order.
    • Processing of cyclic workflows is by far more efficient than the use of cyclic orders.
  • Error Handling
    • Failure
      • If a job in a workflow fails then this will occur for each individual order instance of a cyclic order.
      • If a job within a Cycle Instruction fails then, depending on the error handling in place, any cycles that would occur while an order is in a failed state will be skipped.
    • Notification
      • For each failed order instance of a cyclic order a JS7 - Notification is created.
      • For the single order of a cyclic workflow a single Notification is created.
    •  Intervention
      • Any operations on cyclic orders are applied to all order instances including, for example, resuming execution after failure. This results in parallel execution of orders previously scheduled for execution in intervals.
      • For cyclic workflows there is a single order that waits for user intervention.
  • Logging
    • For each order instance of a cyclic order a separate entry is created in the JS7 - Order History and in the JS7 - Task History.
    • For a cyclic workflow there is a single entry in the Order History. The log output of each cycle is appended to this entry. Individual entries per job execution are added to the Task History.

Further Resources