Versions Compared

Key

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

The following function is useful when you need to run several tasks (DL, CFS, CFData Loads, Calculated Field Sets, Calculation Flows,...) in a sequence (so and ensure that they wait for each other).

Control Table

SequenceNameOrderTypeTaskNameStateLastRun
DM X load1DLSalesDFtoDS<no value> / RUNNING / DONE / ERROR
DM X load2DLSalesDStoDM

DM X load3DLSalesDMCalculation

  • SequenceName - you – You can have more sequences. All tasks which should run in one sequence must have the same SequenceName.
  • Order - this is used to execute the tasks in correct order. When 2  – Sets the order in which the tasks should be executed. When two or more tasks in the sequence have the same OrderOfTask number, then they will be run in parallel.
  • Type -  – Determines what should be executed.
  • TaskName -  – Defines the name of the DL / , CFS / .etc..
  • State - what is happening with  – Informs about the task.
    • <nothing> - should be executed
    • RUNNING - is running now
    • DONE - finished successfully
    • ERROR - finished with ERROR (is the task ends with ERROR, it stops the sequence)
    LastRun - datetime of the end of
    • <no value> – Execution pending.
    • RUNNING – Execution in progress.
    • DONE – Execution finished successfully.
    •  ERROR – Execution finished with an error (if a task ends with an error, the sequence stops).
  • LastRun – Shows when the last run of the task ended.

Scheduler

Scheduler is a simple CFF, Calculation Flow Formula which is executed every minute and starts the tasks according to the Control Table

Installation

  1. In Groovy Library

...

  1. , add a new element called "Sequencer"

...

  1. with the following code: Sequencer Library Code.groovy

...

  1. Create a new Calculation Flow Formula, scheduled for every minute, with one element with this code: 

    Code Block
    languagegroovy
    lib.Sequencer.processAllSequences(actionBuilder)


  2. Import the Price Parameter

...

  1. called "SequenceControlTable". The import ZIP file is attached

...

  1. PP_SequenceControlTable_for_Import.zip

...

Running Your Own Sequence

from From your code (usually from a CFF , but generally from any code , which is allowed to modify Price Parameters) call the following:

Code Block
languagegroovy
lib.Sequencer.startSequence("<your sequence name>")

...