AlteryxRunModule
AlteryxRunModule is used to run a workflow in the same process and memory space as the calling application to increase performance over using AlteryxRunModule_Pipe.
Returns 0 if an error occurs; non-zero when successful.
Reason: The AlteryxRunModule and AlteryxRunModule_Pipe methods are identical except the AlteryxRunModule runs the workflow in the same process as the calling application. In general, this provides better performance than the AlteryxRunModule_Pipe method because the AlteryxEngine is only instantiated one time.
Risks: If Alteryx encounters a problem it may cause the calling application to fail.
Method declaration
int AlteryxRunModule(
const wchar_t* strXmlModule,
TCallbackToolProgress pCallbackToolProgress,
TCallbackMessage pCallbackMessage,
__int64 userData
)
strXmlModule: A path to the workflow, or a string containing the full XML of the workflow to be run.
pCallbackToolProgress: A callback method for progress of individual tools. Optional - can be NULL
. See TCallbackToolProgress for more information.
pCallbackMessage: A callback method for status messages. Optional - can be NULL
. See TCallbackMessage for more information.
userData: User data that will be passed to the callback methods. Optional. Can be 0
if Callbacks are either NULL or do not access userData. See Alteryx Engine API Example for more detail on how to define a custom userData structure.
Example
AlteryxRunModule(strModule, NULL, pCallbackMessage, 0);