NME Task Executor

In this section:

This optional configuration file consists of two different sub-configurations. The first part allows you to stabilize the operational plan (set the order of consolidation operations). The second part allows you to configure task listeners that can perform actions (for example, call an external application) when the NME executor starts or finishes some task (load, export, or processDelta call).

The following syntax shows the executor.xml file.

<executorConfig>
	<executionPlans>
		<plan taskId="MasterDataConsolidation">
			...
		</plan>
	</executionPlans>
	<taskListeners>
		...
	</taskListeners>
</executorConfig>

Top of page

x
Stored Execution Plans

In the <executionPlans> element, you can store fixed plans for operation execution (currently only MasterDataConsolidation). The best way is to download one from the web console and adjust the operation ordering. NME will reject the plan (but not fail) if the plan does not match the dependencies. In such a case, the default approach will be used. The plan itself consists of taskId and a number of steps.

<plan taskId="MasterDataConsolidation">
	<steps>
		<step id="Cleanse(Address)" />
		<step id="CopyColumns(Address -(addresses)-&amp;gt; Party, COPY_CLEAN)"/>
		<step id="Cleanse(Party)" />
		<step id="Match(Party)" />
	</steps>
</plan>

Top of page

x
Executor Task Listeners

Task listeners allow executing custom code when a task status changes (task is enqueued, started, aborted, finished, or failed). Every task listener has the following parameters (code fragments executed or templates used when the state of the task changes accordingly):

In the above parameters, the following information about a task is available (every listener has its own syntax on how to refer to these variables):

The transactionId is always defined. Other properties can be defined in the batch operation or passed through a service call.

WorkflowTaskListener

WorkflowTaskListener allows running eWF workflows. Additional information about the task is available as semiexpression variables. The syntax is ${VARIABLE}.

<listener class="com.ataccama.nme.ext.workflow.WorkflowTaskListener">
	<whenSucceeded>
	<workflowName>someWorkflow.ewf</workflowName>
	<params>
		<param name="TASK_ID" expression="${TASK_ID}" />
		<param name="TASK_NAME" expression="${TASK_NAME}" />
	</params>
	</whenSucceeded>
</listener>

where:

workflowName

Is the ID of the workflow to run (contains .ewf suffix).

ShellTaskListener

ShellTaskListener allows executing shell commands. Additional information about a task is available as environment variables.

<listener class="com.ataccama.nme.engine.monitoring.ShellTaskListener">
	<whenSucceeded>
		mail -s "$TASK_NAME has finished" admin@domain.com &lt;&lt;EOT
		$TASK_NAME ($TASK_ID) has successfully finished.
EOT
	</whenSucceeded>
	<whenFailed>
		mail -s "$TASK_NAME has failed!" admin@domain.com &lt;&lt;EOT
		$TASK_NAME ($TASK_ID) has failed.
EOT
	</whenFailed>
</listener>

Parameters:

In addition to task information, the script fragments may use all the environment variables passed to the java command running iWay MDS.

SqlTaskListener

SqlTaskListener allows executing SQL query on a given database. Additional information about the task is available as name-binded variables.

<listener class="com.ataccama.nme.engine.monitoring.SqlTaskListener">
	<dbConnection>someDB</dbConnection>
	<whenSucceeded>
		INSERT INTO TASK_LOG(id, name) VALUES(:TASK_ID, :TASK_NAME)
	</whenSucceeded>
	<whenFailed>
		INSERT INTO TASK_LOG_ERROR(id, name, message) VALUES(:TASK_ID,
 :TASK_NAME, :ERROR_MESSAGE)
	</whenFailed>
</listener>

where:

dbConnection

Is the name of the database connection defined in the main server configuration.

HttpSoapTaskListener

HttpSoapTaskListener allows calling external services. Additional information about the task is available as semiexpression variables. The syntax is ${VARIABLE}. You can use the CDATA section to include message XML in the configuration XML.

<listener class="com.ataccama.nme.engine.monitoring.HttpSoapTaskListener">
	<url>http://domain.com:8888/component</url>
	<soapAction>action</soapAction>
	<whenSucceeded>
		<![CDATA[
		<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ws="http://www.example.com/ws">
			<soapenv:Header/>
			<soapenv:Body>
				<ws:action>
					<ws:id>${TASK_ID}</ws:id>
					<ws:name>${TASK_NAME}</ws:name>
				</ws:action>
			</soapenv:Body>
		</soapenv:Envelope>
		]]>
	</whenSucceeded>
</listener>

Parameters:


iWay Software