TCallbackMessage

Version:
Current
Last modified: June 11, 2020

TCallbackMessage AlteryxEngine API callback is used to get status messages and other text responses from the Alteryx Engine.

Returns 1 to cancel running the workflow or application or 0 to continue.

Callback Declaration

long AlteryxApi.CallbackMessage( 
	__int64 userData,
	int nToolId,
	int nStatus,
	const wchar_t* pMessage
)

Properties

nStatus Possible Values
Value Description
1 Information is being passed to the calling application.
2 A warning has been reported. The message will be the warning message.
3 Indicates that an error has occurred. The message will be the error message.
4 The tool has completed its processing.
5 Indicates that a field conversion error has occurred. The message will be the error message.
6 Indicates that the field conversion error limit has been reached.
7 A transient message is being sent from a tool. This is similar to nStatus = 1, with the following differences:

A new message will replace/supercede any old messages from the same tool (i.e., there can only ever be one transient message from a given tool).

The message will always originate from a macro.
10 The message will be the XML that is the updated meta info for this tool.
11 The message will be the XML that is the configuration for this tool.
12 This will cause the config to refresh in the GUI with no user interaction. Typicaly this is done when the tool is already in an error state, but maybe the GUI can fix it with no user interaction.
13 Usually a browse tool. The message will be the path of the temporary file.
20 This will tell the calling application that the free disk space is running low and pause the workflow until action is taken.
30 Indicates that the message will be a '\n' delimited list of choices that the calling application must make a selection from. The callback handler should return one of the following values to indicate the choice that is made. Valid values are: -1 for cancel -2 for 1st to all -3 for none to all 0 for none 1...N for a specific value from the list of choices
40 The field names for this SRCT output tool in a comma-quote delimited string.
41 The data record for this SRCT output tool in a comma-quote delimited string.
50 Indicates the number and size of records output by the tool so far. The string will be in the format: "OutputName|RecordCount\nTotalSize"

The nStatus parameter indicates what type of message is being delivered from the running workflow or application.

If the calling application determines the workflow or application should stop processing based on the contents of the callback, the nStatus parameter should return 1. In order to allow processing to continue, the nStatus parameter should return 0. The only exception is when nStatus is 30, the callback handler should return one of the following values to indicate the choice that is made: -1 for cancel, -2 for 1st to all, -3 for none to all, 0 for none, 1....N for a specific value from the list of choices.

Example

long CallbackMessage(__int64 userData,
	int nToolId,
	int nStatus,
	const wchar_t* pMessage)
{
	switch (nStatus)
{
	case 3:
		//there is an error so return 1 to cancel processing
		return 1;
}
	return 0;
}
Was This Helpful?

Running into problems or issues with your Alteryx product? Visit the Alteryx Community or contact support.