CompleteCyclePeriod macro

The CompleteCyclePeriod macro is used to complete a running Cycle Period for the selected Cycle and set the status of the related scenarios to Published. This macro is executed at the System level.

For executing the macro, the value in the Command field must be specified in this format:

CompleteCyclePeriod(Cycle, [Cycle Period], [Scenario to Publish], [Time out])
Note: The optional parameters are specified in [ ].

This table lists the parameters that are used in the macro to determine the Cycle Period to be completed:

Parameter Name Description
Cycle The name of the Cycle that includes the Cycle Period to be completed.
Cycle Period The Cycle Period to be completed.
Note: 
  • If this value is not specified, the currently running Cycle Period for the specified Cycle is considered.
  • If this value is not specified and the Cycle Period with Running status is not available, an error occurs.
Scenario to Publish The scenario to publish the completed cycle period.
Note: 
  • If this value is specified, defines the published scenario.
    • The scenario can have any status.
  • If this value is not specified, the scenario to be published is obtained from the Publish Module.
    • The Publish Module is the latest module in a sequence (Finance, Demand, Supply, Integrated) with location hierarchy and scenario defined for the Cycle.
    • If the number of scenarios within the Publish module is greater than 1, the first Scenario with Approved status is published.
    • If the number of scenarios within the Publish module is 1, the status of the scenario is set to Published regardless of the current status.
Time out The time, in seconds, to wait for the Cycle Period to become available if currently processing (unavailable).
Note: If this value is not specified, the waiting period is indefinite.

This table lists the examples of the CompleteCyclePeriod macro:

Requirement Syntax
Complete the running cycle period for the Normal cycle, setting the first Approved scenario in Integrated module to Published.

Assume that Integrated is the Publish Module and contains a scenario with status = Approved. The Wait period is indefinite if the cycle period or scenario is currently unavailable.

CompleteCyclePeriod("Normal","","","")
Complete the cycle period “Normal-Dec 12”, setting the only scenario in Integrated module to Published.

This assumes that Integrated is the Publish Module and contains a single scenario with any status. The Wait period is indefinite if the cycle period or scenario is currently unavailable.

CompleteCyclePeriod("Normal","Dec 12","","")
Complete the cycle period “Tactical-Y12 W44”, setting the "Supply-Upside" scenario to Published.

Assume that Supply is the "publish module" and contains Supply-Upside scenario. The time-out duration of the macro step is 600 seconds, if the cycle period or scenario is not available at the time of execution.

CompleteCyclePeriod("Tactical","Y12 W44","Supply-Upside","600")