What ExecuteProcess Does
ExecuteProcess (not ProcessExecute!) calls one process from within another process in TM1. It also allows you to pass parameters to the called process.
The syntax is:
ExecuteProcess ( 'ProcessName' , 'Parameter1name' , Parameter1value , 'Parameter2name' , Parameter2value , 'ParameterNname' , ParameterNvalue );
- ProcessName is the process you want to call
- Parameter1name is the name first parameter you want to pass a value to the called process.
- Parameter1value is the value of the first parameter
- Parameter2name is the name second parameter you want to pass a value to the called process.
- Parameter2value is the value of the second parameter
- ParameterNname is the name Nth parameter you want to pass a value to the called process.
- ParameterNvalue is the value of the Nth parameter
Note that we have listed the ProcessName and ParameterNames in single inverted commas. This is becasue we are assuming that this is how you will code the TI. If you have stored these in variables, then you will probably know to remove them!
Usage of ExecuteProcess
ExecuteProcess is used to call one process from another. There are two primary uses that I can think of here:
- Having a master process that then calls a series of processes in order to rebuild dimensions and then load data into a cube. This would then normally be set up as a chore and assigned a schedule.
- Having a standard process that can be called as required to execute a common task. For example, to clear out a a target view in a cube before loading data into it. We do this extensively with a standard TI that we use to clear out a view prior to loading data.
### Zaps Budget
ExecuteProcess ( 'zInfoCube.CubeViewBuild',
'pCubeName', cCube, 'pViewName', 'zClearOut Budget', 'pAction', 'ClearOut', 'pDestroy', 'Y',
'pDim1', 'Customers', 'pDimElement1', cCustomer,
'pDim2', 'Sales Measures', 'pDimElement2', cMeasure,
'pDim3', 'Warehouse', 'pDimElement3', cWarehouse,
'pDim4', 'Supplier', 'pDimElement4', cSupplier ) ;
Here we are calling a process called zInfoCube.CubeViewBuild and then passing a series of parameters. zInfoCube.CubeViewBuild uses them to zap a section of data in a view defined by the dimensions. Obviously we have set the variable earlier in the process.
ExecuteProcess can only be used in Turbo Integrator processes.