Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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.

Is Enabled?

Specify whether the given activity callback is enabled or not.

Name

Name of integration to identify.

Callback code

Integration script for activity.

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();
}
  • No labels