onTaskCreate
When a task is created, the onTaskCreate event is invoked and the registered callback method is executed.
Subscribe to the onTaskCreate event and register the callback by using the following sample manifest.json content.
"events": {
"onTaskCreate": {
"handler": "onTaskCreateCallback"
}
}
Define the corresponding callback by using the following sample server.js content:
exports = {
onTaskCreateCallback: function(payload) {
console.log("Logging arguments from onTaskCreate event: " + JSON.stringify(payload));
}
}
Attributes of the data object
- actorobject
Details of the entity that triggered the onTaskCreate event.
- associationsobject
Associated objects related to the task object.
- taskobject
Details of the task object created when the onTaskCreate event is triggered.
onTaskUpdate
When a task is updated, the onTaskUpdate event is invoked and the registered callback method is executed.
Subscribe to the onTaskUpdate event and register the callback by using the following sample manifest.json content.
"events": {
"onTaskUpdate": {
"handler": "onTaskUpdateCallback"
}
}
Define the corresponding callback by using the following sample server.js content:
exports = {
onTaskUpdateCallback: function(payload) {
console.log("Logging arguments from onTaskCreate event: " + JSON.stringify(payload));
}
}
Attributes of the data object
- actorobject
Details of the entity that triggered the onTaskUpdate event.
- associationsobject
Associated objects related to the task object.
- changesobject
Changes that triggered the onTaskUpdate specified as a JSON object of the following format:
{ "model_changes": { "<task.attribute that changed>": ["Old value", "New value"] } }
Example
{ "misc_changes": {}, "model_changes": { "description": [ "task create", "task update" ], "updated_at": [ "2020-06-24T14:18:23Z", "2020-06-24T14:18:38Z" ] }, "system_changes": {} }
- taskobject
Details of the task object.