CopyPlanningEngine macro

The CopyPlanningEngine macro is used to create a copy of the existing Planning Engine. This macro is executed at system level.

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

CopyPlanningEngine(Source Planning Engine name, Planning Engine Name, [Planning Engine Display Name], [Category],[Stop on End Status]).
Note: The optional parameters are specified in [ ].

This table lists the parameters used to execute the CopyPlanningEngine macro:

Parameter Name Description

Source Planning Engine name

The source Planning Engine based on which the new Planning Engine is to be created.

Planning Engine name

The name of the Planning Engine to be created.

Allows variables such as %source%, %date%, %time%, %datetime%, %PlanningEngineCycle% and application variables. For Example Weekly Supply_%date%, can be used.create Planning Engine "Weekly Supply_20200327".

Note: 
  • The %source% variable must be used in conjunction with a text string or another variable. Else, the Planning Engine cannot be created.
  • %source% refers to the name of the Source Planning Engine.

To view the list of available parameter variables, See Parameter variable.

Planning Engine Display name

The display name of the Planning Engine to be created.

Allows variables such as %source%, %date%, %time%, %datetime%, %PlanningEngineCycle% and application variables. For example Weekly Supply_%date%, can create Planning Engine "Weekly Supply_20200327".

Note: 
  • The %source% variable must be used in conjunction with a text string or another variable to ensure the uniqueness of the display name.
  • %source% refers to the Source Planning Engine Display Name.

To view the list of available parameter variables, See Parameter variable.

Category

The category name of the Planning Engine to be created.

Note: If this value is not specified, the category defined for the source Planning Engine is used.

Stop on End Status

Stop on End Status decides the status of the macro which cause the macro to stop. Stop on End Status can be set as specified:

  • None = Macro step is ignored if any validation fails.
  • Warning = Macro step fails if validation at levels Warning or Error are encountered.
  • Error = Macro step fails only if validation of level Error is encountered.
    Note: If not defined (Null), Stop on End Status is set to Error.

This table lists the examples of the CopyPlanningEngine macro:

Requirement Syntax
Make a copy of "Weekly Supply Plan 2020-03-17" called "Weekly Supply Plan 20200324" (where 20200324 is today's UTC date) with the same category of the source. The display name of the planning engine is set to null. CopyPlanningEngine("Weekly Supply Plan 2020-03-17","Weekly Supply Plan %date%","","")