Task Execution and Monitoring Services
These services are located in the com.ataccama.nme.internal.engine.services.handlers.BatchControlServiceBundle
service bundle.
The services allow external applications to schedule load and export operations without having to interact with the workflow component and/or parse the pages at the web console.
<service class="com.ataccama.nme.internal.engine.services.handlers.BatchControlServiceBundle" />
We use a placeholder instance entity Example , a placeholder master entity Example , and a placeholder Master View Mv to illustrate the functionality of services.
|
invokeLoadOperation
Invokes a load operation with the given parameters. The request consists of the operation name and an optional list of operation parameters.
<invokeLoadOperation>
<name>crm_in</name> <!-- load operation name -->
<parameters> <!-- zero or more parameters -->
<parameter name="fileSuffix" value="20110812"/>
</parameters>
</invokeLoadOperation>
The service returns immediately, placing the operation into the task queue.
The response consists of a single value, taskId
, assigned to the task.
The getTaskStatus
service can be used to query the state of the task.
invokeMultiLoadOperation
Invokes a multi load operation with the given parameters. The request consists of list of operation names and an optional list of operation parameters.
<invokeMultiLoadOperation>
<operations>
<operation>crm_full</operation>
<operation>life_full</operation>
</operations>
<parameters>
<parameter name="someParam" value="someValue" />
</parameters>
</invokeMultiLoadOperation>
The service returns immediately, placing the operation into the task queue.
The response consists of a single value, taskId
, assigned to the task.
The getTaskStatus
service can be used to query the state of the task.
invokeExportOperation
Invokes an export operation with the given parameters. The semantics of the request and response is the same as in the case of invokeLoadOperation.
<invokeExportOperation>
<name>full</name> <!-- export operation name -->
<parameters> <!-- zero or more parameters -->
<parameter name="referenceTransactionId" value="6226117"/>
</parameters>
</invokeExportOperation>
getTasks
Returns all tasks including their ID, technical name, and statuses. Sorted from latest to oldest.
<getTasks>
<offset>0</offset> <!-- support for paging, default value is 0 -->
<count>50</count> <!-- how many tasks to return, default value is 50 -->
</getTasks>
There is optional paging where offset defines the page order and count defines the page size.
Get task response
<getTasksResponse>
<tasks>
<task>
<id>2</id>
<typeId>batchLoad.crm_delta</typeId>
<status>FINISHED_OK</status>
</task>
<task>
<id>1</id>
<typeId>multiLoad.batchLoad.crm_initial+batchLoad.life_initial+batchLoad.invest_initial+batchLoad.hub_reference_data_full</typeId>
<status>FINISHED_OK</status>
</task>
<!-- ... more ... -->
</tasks>
</getTasksResponse>
getTaskStatus
Retrieves the status details for a given <taskId>
as well as information about related event handlers.
<getTaskStatus>
<taskId>202</taskId>
</getTaskStatus>
If the task is not found, the response contains the status with value NOT_FOUND
(other fields are empty).
Otherwise, a structure containing the task ID, metadata, and status is returned.
The status can be one of the following:
-
WAITING
- Task in the queue. -
RUNNING
- Task is currently being executed. -
FINISHED_OK
- Task finished successfully. -
FINISHED_FAILURE
- Task finished with a failure. -
ABORTING
- Task canceled by a user but not yet terminated. -
ABORTED
- Task terminated by a user.
Event handler states are:
-
RECEIVING
- Receiving events during NME Committing. -
READY
- All events were received and are ready to be published. -
PUBLISHING
- Publishing events via publishers. -
PUBLISHED
- All events were published successfully. -
CORRUPTED
- Persisted events in the eventHandler storage are corrupted. -
CRASHED_RECEIVING
- EventHandler session crashed during receiving, event will be discarded. -
CRASHED_PUBLISHING
- EventHandler session crashed during publishing, can be restarted.
Get task status response
<getTaskStatusResponse>
<id>202</id>
<typeId>batchLoad.crm_full</typeId>
<status>FINISHED_OK</status>
<eventHandlerTasks>
<task>
<name>default</name>
<id>204</id>
<state>PUBLISHED</state>
</task>
<task>
<name>History</name>
<id>205</id>
<state>PUBLISHED</state>
</task>
<task>
<name>MdaSync</name>
<id>206</id>
<state>PUBLISHED</state>
</task>
</eventHandlerTasks>
</getTaskStatusResponse>
Was this page useful?