Service
Overview
The ServiceWorkEntryExecutor class creates XML requests from the source to target mappings and invokes EPM services to add, update, or delete the target data. For more information on how to map these actions, see Service Action Mapping.
Select a Target Level mapping and Target Types table set, and create an appropriate SELECT … template statement for this executable class.
Read requests
This executable can issue READ requests without updating the target service data. However, it can log the responses from the service and can be used to test what a service’s XML or JSON would look like. The responses can be logged as run status messages using the ResponseOnlineLogLimit parameter so that they can be viewed online. See Parameters for more information.
For more information on how to map these actions, see Service Action Mapping.
Parameters
This executable class accepts the following parameters:
| Parameter | Description |
|---|---|
authTask |
Specifies the details for authentication, such as For remote service calls, you can specify an authentication task to authenticate and obtain a token. If needed, the authentication task can be linked to other authentication tasks. See AuthWorkEntryExecutor. |
errorTolerance |
Specifies the number of tries before a failing service execution is aborted. During the retries, all the exception messages are written to the Default: |
fastAdd |
Executes add requests in fast mode. |
fastUpdate |
Executes update requests in fast mode. |
filepath |
Defines the file path of the output requests for invokeMethod or local.
|
h:<header> |
Specifies any request headers for remote service calls. Duplicate header names are not permitted. |
h:Content-Type |
Specifies the format used to send requests for remote service calls. Possible values are:
Default: |
h:Accept |
Specifies the format the tool expects the responses to be in. |
invokeMethod |
Specifies how DIH invokes requests. Possible values are:
|
language |
Specifies a valid language code, such as ENG for English. |
user |
Specifies the user id used for the service requests in |
maxRequestLogSize |
Defines the size limit of the XML request in the log. |
maxResponseLogSize |
Defines the size limit of the XML response in the log. |
readResponseOnlineLogLimit |
Specifies the maximum number of read responses to log to the run status. |
serverUrl |
Specifies the base URL of the target REST server for remote calls. |
traceCallData |
Writes the requests and responses of the valid calls to the UA_RUN_SERVICE_TRACE table. This table can be queried for validation purposes, or to simply trace calls for debugging. |
For more information on other variables and syntax that can be used, see Common executable features.
Service file export template
file invoke method.
A Data Block is defined on the service’s Task and can be used to specify a template for a file export. Without a data block on the task, the specified template on the file upload uses the Code Block sequence #2 of the service Executable. The template specified in the Task takes precedence over the template in the Executable. If neither is specified, the requests will be exported one request per line in the output file.
The format for the request in the template is {request(%s</tags)}. Other elements can be specified around this and inside the round brackets. For example:
<root>
{request(<payload>%s</payload>)}
</root>
Everything between the () in the {request…}reference will be used to generate each request. Anything outside of the {request…} reference will be generated once.
<root> element in the example above will include all the requests for all the targets.