Automation Engine Script Guide > Ordered by Function > Read or Modify Objects > :REPLACE_STRUCTURE

:REPLACE_STRUCTURE

Script statement: Replaces the structure of a workflow with the structure of another workflow at activation

Syntax

:REPLACE_STRUCTURE OBJ[ECT]=Workflow

Syntax

Description/Format

Workflow 

Name of the workflow whose structure should be used
Format: script literal or script variable
 

Comments

With this script statement, the structure of one workflow can be replaced with the structure of another workflow during its activation. That means the content of the Workflow tab is replaced. A runtime error occurs if the specified workflow cannot be found.

Modifications to the workflow structure only apply for the particular execution and do not change the Workflow object.

Call the monitor in the statistics of a workflow execution to have the workflow displayed whose structure was used.

Automic recommends that you do not use this script statement if modifications can also be made through defining calendar dependencies, time-dependent conditions in scripts, etc.

Example

In the following example, the workflow "MM.DAY" should run with a modified workflow structure on 12/31/2001. The workflow has been copied and the copy has been changed. In the original workflow, the modified workflow is called with the following script lines.

:IF "051231" = SYS_LDATE()
:   
REPLACE_STRUCTURE OBJECT="MM.DAY.MOD.051231"
:
ENDIF

 

See also:

About Scripts
Script Elements - Alphabetical listing

Script Elements - Ordered by Function