Post Execution tab
The Post Execution tab allows you to configure a service call, to be executed immediately after fulfillment using the channel.
It exposes the following properties:
Post-execution
This checkbox, unchecked by default, is accompanied by the text “Call a service URL once channel execution has completed”. It allows you, at channels where supported, to provide the address of a web service to be called each time the channel is used in an interaction, just prior to the activity’s completion.
When checked, a number of additional properties are shown. Each is documented hereafter.
Service type
A dropdown field, exposing three values, which allows you to specify the nature of the supplied web service:
SOAP Web Service: if using SOAP, the web service call to be used is a basic http web service call without any transport or message security configured. The web service must expose the following
OnOfferComplete
method (code example is .Net) - e.g.:CODE[ServiceContract] public interface IInteractionService { [OperationContract] void OnOfferComplete(string[][] args); }
The Workflow Manager service calls this method when the channel activity completes and passes in execution-specific arguments in an array of name/value pairs.
HTTP Post/JSON (the default): an example JSON packet:
{"interactionID":"7d200b95-f51d-4389-a47d-4400f1114f96","workflowAssociationID":"ajfa2a17-81df-4de7-ada1-85e3f5da8f62","workflowAssociationInstanceID":"8828","dataflowID":"24951","offerName":"NA","channelName":"Control 2","activityName":"Control","channelOfferName":"Control","channelExecutionID":"5719","clientID":"73d74e87-25b8-464f-92a3-423d9b7dd4ff"}
The following arguments are passed for both SOAP Web Service and HTTP Post/JSON:
InteractionID | Interaction file ID |
---|---|
WorkflowAssociationID | ID that identifies the trigger within an interaction |
WorkflowAssociationInstanceID | Workflow instance ID |
DataflowID | ID available in offer history which identifies the audience instance |
OfferName | Offer name |
ChannelName | Channel name |
ActivityName | Workflow activity name |
ChannelOfferName | Name of channel within offer |
ChannelExecutionID | Channel execution instance ID |
ClientID | Client ID |
RPDM (Redpoint Data Management) Web Service: selection of this option allows you to specify that the channel will call an RPDM web service upon completion of execution downstream from a batch audience, or interactive activity configured with an audience. When selected, two additional properties are shown:
Service port: this integer field accepts a minimum value of 1, and a maximum value of 99,999.
Service name: provision of a value in this text field is mandatory.
Service URL
A web service URL, with a maximum length of 1000 characters, must be provided.
Error handling
This checkbox, which is unchecked by default, is accompanied by the text "Suspend activity on service error". When checked, at a post-channel execution service call, if an error is encountered, the fulfilment activity in question enters a Paused state. If the property is unchecked, the activity completes. A log entry is added in both cases.
Headers
This property allows you to specify headers to accompany the service call. An Add Header button is provided. Selecting it adds new header, with default "Name" and "Value" properties. A header's Name is mandatory, and must be unique within the channel. Provision of a Value is also mandatory. An Options button, displayed to the right of a header, exposes a single Remove option, invocation of which removes the header without display of an "Are You Sure?" dialog.
Enable OAuth2
This checkbox is unchecked. When checked, a series of properties are shown that allow you to use OAuth2 when making the service call.
Authentication server URI
This property is shown when Enable OAuth2 is checked. It allows you to specify the address of the OAuth2 authentication server, and its provision is mandatory.
Grant type
This property is shown when Enable OAuth2 is checked. It allows you to select the type of grant that will be requested when the authentication server is contacted. A dropdown field, it exposes values "Password" (the default) and "Credentials".
Client ID
This optional property is shown when Enable OAuth2 is checked.
Client secret
This optional property is shown when Enable OAuth2 is checked.
Username
This property, which is shown when Enable OAuth2 is checked, allows you to specify the username required to access the OAuth2 service. It is shown and mandatory when Grant type is set to "Password".
Password
This mandatory property is also shown when Enable OAuth2 is checked, and accompanies Username.
Authentication scope
This optional property is shown when Enable OAuth2 is checked.
Additional auth field
Another property that is shown only when Enable OAuth2 is checked. An Add Auth Field button is provided. Selecting it adds a new auth field, with default "Name" and "Value" properties. An auth field's Name is mandatory, and must be unique within the channel. Provision of a Value is also mandatory. An Options button, displayed to the right of an auth field, exposes a single Remove option, invocation of which removes the header without display of an "Are You Sure?" dialog.
Note that, if a channel’s Post-execution property is set, and the specified web service is not available, an error does not occur. Rather, error details are logged to the server log.