DeletePlanningEngine macro

The DeletePlanningEngine macro deletes the Planning Engine and clears the data from the specified planning engine. You can delete specific planning engines or multiple planning engines based on the Category, Cycle, or Status parameter. When deleting Planning Engines by Cycle, only those with the Master status are considered. This macro is executed at a system level.

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

DeletePlanningEngine([Planning Engine name], [Category],[Stop on End Status], [Cycle], [Status])
Note: The optional parameters are specified in [ ].

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

Parameter Name Description
Planning Engine name

The name of the Planning Engine to be deleted.

Note: 
  • If this value is specified, the Cycle parameter is not considered.
  • If this value is not specified (Null), all the planning engines are deleted.
Category

If specified, the Planning Engine with specified Category is deleted.

Note: If no category is defined (Null), Category is ignored.
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.
Cycle The name of the Planning Engine Cycle from which the planning engines are to be deleted.
Note: 
  • If this value is specified, all planning engines within the specified Cycle are considered except the Planning Engine with the Master status.
  • If this value is not specified, the Cycle parameter is not considered.
  • If the Planning Engine name parameter is specified, the Cycle parameter is not considered.
  • When planning engines are deleted based on the Cycle parameter, the Planning Engine with the Master status is not considered.
Status The status of the Planning Engine to be considered. Possible values:
  • Running
  • Completed
  • Published
Note: 
  • The Master status is not a valid value as the deletion of planning engines based on the Master status must not be automated.
  • If the Status parameter is not specified:
    • All Planning Engine statuses are considered, except Master when the Cycle parameter is specified.
    • All Planning Engine statuses are considered including Master when the Cycle parameter is not specified.

This table lists the examples of the DeletePlanningEngine macro:

Requirement Syntax
Delete all planning engines DeletePlanningEngine("","","")
Delete the planning engine "Weekly Supply Plan FY19 W29" DeletePlanningEngine("Weekly Supply Plan FY19 W29","","")
Delete all planning engines with the Category "Weekly Supply" DeletePlanningEngine("","Weekly Supply","")
Delete all planning engines in the SCO cycle excluding the Planning Engine with the Master status. DeletePlanningEngine("","","","SCO","")
Delete all planning engines with the Completed status in the SCO cycle. DeletePlanningEngine("","","","SCO","Completed")