Contents
Outbound Transformation Script
The outbound transformation script path is iwd_scripts\IxnServer2iWDTransformer.groovy. The script produces output in UTF-8 for Interaction Server to put into the notification queue (or to deliver to an external system by other means).
Outbound Script Parameters
The script uses the following parameters:
- CompleteQueues—A comma-separated list of queue names for completed interactions (default iWD_Completed)
- RestartQueue—A comma-separated list of queue names for new interactions (default iWD_New)
- CancelQueues—A comma-separated list of queue names for canceled interactions (default iWD_Canceled)
- RejectQueues—A comma-separated list of queue names for rejected interactions (default iWD_Rejected)
- ExtendedAttributes—A comma-separated list of interaction attributes that has to appear under the <Ext> tag of the iWD notification messages
The script uses the following internal parameters (hard-coded as static member variables) to maintain the compatibility with previous versions of iWD:
- includeWorkbinQueueName—If set to true, the default, the script includes the workbin queue name in TaskDistributedQueue messages, as is done in iWD. If set to false, the actual workbin name is included.
- specificQueueNotifications—If set to true, the script generates specific unsolicited notifications based on the queue name (for example, TaskCompleted, TaskCanceled, TaskRestarted, TaskRejected, TaskErrorHeld are generated instead of a generic TaskDistributedQueue). The default value is false, which generates the generic TaskDistributedQueue as is done in iWD.
The two internal parameters described above can be changed in the script file. Changes take effect after restart.
Root Element
The notification messages produced by Interaction Server always contain a single notification. This notification is a root element. The outbound transformation script expects the root element to be messages and if it is, treats all of the child elements as notifications (which always have the name interaction). If the root element is not messages, then it is expected to be interaction and is treated as a single notification element. In all other cases the transformation fails. In output XML, the root element is always GTLMessages and child elements are iWD notification elements.
Transforming Actions
The Interaction Server operation is specified by the operation attribute of the interaction tag. Possible actions and their translations are as follows:
- <interaction operation='created'>—Translates to TaskCreated
- <interaction operation='changed'>—Translates to TaskUpdated
- <interaction operation='stopped'>—Translates to nothing
- <interaction operation='held'>—Translates to TaskHeld
- <interaction operation='resumed'>—Translates to TaskResumed
- <interaction operation='info'>—Translates to TaskInfo
- <interaction operation='moved'>—Translates to one of TaskCompleted, TaskRestarted, TaskCanceled, TaskRejected or TaskDistributedQueue
- <interaction operation='assigned'>—Translates to TaskAssigned
- <interaction operation='error'>—Translates to Error
Note the transformation of the moved notification to different iWD notifications. The choice of the appropriate notification is made based on the Queue attribute of the original notification message as follows:
- If the value of the Queue attribute is included in the CompleteQueues parameter, then the TaskCompleted notification is generated.
- If the value of the Queue attribute is included in the RestartQueue parameter, then the TaskRestarted notification is generated.
- If the value of the Queue attribute is included in the CancelQueues parameter, then the TaskCanceled notification is generated.
- If the value of the Queue attribute is included in the RejectQueues parameter, then the TaskRejected notification is generated.
- Otherwise, the TaskDistributedQueue notification is generated.
Transforming Properties
The following transformation takes place for the outbound iWD message:
- All known direct children of the properties tag are translated according to the Translation Table for Known Attributes (Outbound) below and put into the transformed message as direct children of the notification message.
- All direct children of the properties tag that begin with prefix IWD_ext_ are put into the Ext tag of the transformed message as child elements with the same name, but without the prefix IWD_ext_.
- All other children of the properties tag are put into the Data tag of the transformed message as child elements with exactly same names.
- If Workbin is empty InteractionQueue
- If WorkbinAgentId is set AgentWorkbin
- If WorkbinAgentGroupId is set AgentGroupWorkbin
- If WorkbinPlaceId is set PlaceWorkbin
- If WorkbinPlaceGroupId is set PlaceGroupWorkbin
Attribute Name in properties | iWD Message Attribute | Notes |
---|---|---|
InteractionId | BrokerId | |
ExternalId | CaptureId | |
SubmittedBy | CapturePointId | |
IWD_CapturePointId | Ignored. SubmittedBy is used instead. | |
<actor> | Actor | Strategy, agent ID, or server name. |
<reason> | Reason | Attribute name of reason tag. |
event_time attribute of the notification | EventDateTime | If not present, it is set to the CurrentTime parameter of transformation. |
IWD_tenantId | tenantID | |
IWD_solutionId | solutionId | |
IWD_departmentId | departmentId | |
IWD_processId | processId | |
IWD_channel | channel | |
IWD_category | category | |
State, Queue, IsHeld | status | Based on a set of attributes. |
IWD_businessCalendarId | businessCalendarId | |
SubmittedAt | createdDateTime | |
HeldAt | heldDateTime | Only if held, no translation in iWD 8.0 |
AssignedAt | assignedDateTime | |
CompletedAt | completedDateTime | |
IWD_activationDateTime | activationDateTime | |
IWD_dueDateTime | dueDateTime | |
IWD_expirationDatetime | expirationDateTime | |
Priority | priority | |
IWD_reprioritizeDateTime | reprioritizeDateTime | |
IWD_businessValue | businessValue | |
AssignedTo | assignedToUser | |
Queue | Queue | |
Workbin, WorkbinAgentId, WorkbinAgentGroupId, WorkbinPlaceId, WorkbinPlaceGroupId | QueueType |
|
WorkbinAgentId, WorkbinAgentGroupId, WorkbinPlaceId, WorkbinPlaceGroupId | QueueTarget | First not empty |