Activity Callbacks

Activity callbacks are used to inject system-wide activities to perform additional operations when a certain type of activity occurs.

For example, if you have a custom notification system for mobile devices you may inject to work item assign type activities to send push notifications.

image-20231212-170052.png

Is Enabled?

Specify whether the given activity callback is enabled or not.

Name

Name of integration to identify.

Callback code

Integration script for activity.

The integration script called with a couple of predefined variables as follows;

Name of Variable

Description

Name of Variable

Description

$Domain

Domain object

$Targets

Array of target identities.

$Activity

Activity object

Script content may vary depending on service definition but as an example the following script can be used;

if ($Activity.objectType == 'workitem' && $Activity['@type'] == 'assign') { var payload = { targets: $Targets.map(function (identity) { return identity.Id; }), message: $Activity.task + " " + $Activity.instructions }; var client = $Rest.Create('http://localhost/post'); client.Request().AddObject(payload).ExecuteJson(); }

Copyright © 2010 - 2023 Emakin. All rights reserved.