Create advanced activity effects
-
The Case Activity Web services feature setting must be enabled.
-
You must be assigned the PROCESSADM access code.
You can use advanced activity effects to call external web services in case activities. To get started with advanced activity effects, please contact your KMD WorkZone contact for license information and an introduction to using advanced activity effects in case activities.
This topic describes the basic steps that you need to go through to use advanced activity effects. For more details, refer to the DCR API Documentation.
To use advanced activity effects in case activities, you need to:
Create a web service definition file
The first step is to create a web service definition file, which is a JSON file that will all contain the web service definitions that you want to use. The JSON file also includes configuration of authentication methods. The JSON file can contain multiple web service definitions and authenticators. To get started on a web service definition file, you can use an example from the DCR documentation. The steps below describe the basic steps based on the Extended example in the DCR API documentation.
-
Create a new JSON file in a text editor.
-
Copy the code from the DCR example to the new file.
-
Delete the content that you do not need, for example, delete all but the authenticator that you need, for example the anonymous authenticator, and an empty
effects
section where you can add the specific effects that correspond to the web services that you want to call. -
Insert the code for the effect in the same way as an effect in the DCR example. You can, for example, the CVR effect as a template.
-
Make sure that you have defined the same authenticator as the one that is used in the activity effect and that they are identically named.
Read more about the structure in the DCR API documentation.
Create an advanced activity effect in DCR Portal
-
In the DCR Portal, create a new process or edit an existing process based on the WorkZone template. See Create a DCR process using the WorkZone template.
-
Go to Edit > Resources, and in the Activity effects section, click Add to add the web service that you want to call as an activity effect.
-
Add the title of the activity effect. The title must be the ID of the web service. Copy the ID from the JSON file.
-
Expand the Parameters, and fill in the parameters. Copy the parameters from the effect in the JSON file.
-
Optionally, enter a default value.
-
Click Add to save the activity effect. The new activity effect is now shown the list of activity effects.
-
Close the Edit resources dialog. You can now use the activity effect in the DCR process.
See also: Export and deploy case activity processes.
Upload the web service definitions file
To use advanced activities in case activities, you must upload the web service definitions file to WorkZone Configurator. In WorkZone Configurator, go to Process > Web service definitions. See Web service definitions.
Troubleshooting
If you get an error or the advanced activity effect behaves unexpected, you can follow the guidelines below to troubleshoot:
-
Set up the HTTP request in a tool such as Postman or Microsoft PowerShell. Try to execute the request, and check if the web request returns the status "OK". If the response is successful, you can proceed.
-
Check the Updated field on the Web service definitions tab in WorkZone Configurator. If the date is not correct, or you are unsure about it, try to reload the web service definition file.
-
Copy the instance ID of the DCR process that uses the advanced activity effect. In WorkZone QueryBuilder, select the WzpWorkflowLogs entity, and filter on the instanceID. Select the column Properties and ActivityName. Look for the activity effect, and check if the property value starts with "Web Tracker Log Response: ". It can provide you with more information such as missing output handlers, etc.
-
Check how the DCR process runs in different environments, such as in test and staging environments.