Skip to main content

AlteryxRunModule2

AlteryxRunModule2 AlteryxEngine API method is used to run a workflow in the same process and memory space as the calling application to increase performance over AlteryxRunModule_Pipe2. Returns 0 if an error occurs; non-zero when successful.

Importante

In server-side applications, use AlteryxRunModule_Pipe2 instead of AlteryxRunModule2 unless performance is a critical concern.

The AlteryxRunModule2 and AlteryxRunModule_Pipe2 methods are identical except the AlteryxRunModule2 runs the workflow in the same process as the calling application. In general, this provides better performance than the AlteryxRunModule_Pipe2 method because the AlteryxEngine2 is only instantiated one time.

Risks: If Alteryx encounters a problem it may cause the calling application to fail.

Method Declaration

int AlteryxRunModule2( 
        const wchar_t* strXmlModule,
        const wchar_t* strPathContext,
        TCallbackToolProgress pCallbackToolProgress,
        TCallbackMessage pCallbackMessage,
        __int64 userData
) 

Properties

  • strXmlModule: A path to the workflow, or a string containing the full XML of the workflow to be run.

  • strPathContext: The default path for resolving relative paths in the workflow. If strXmlModule was set to a file, this is optional and will default to the path of the file.

  • pCallbackToolProgress: A callback function for progress of individual tools. Optional - can be NULL. See TCallbackToolProgress for more information.

  • pCallbackMessage: A callback function 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

AlteryxRunModule2(strModule, NULL, NULL, pCallbackMessage, 0);