The background tasks section lets you enter the name of a single End Point. The End Point will be called by the iCM gateway as messages are processed.
Event Handler
iCM generates events when content is created, modified or deleted. These events can be intercepted and used to implement custom behaviour outside of the scope of the the built-in functionality. The End Point you select in the Background Tasks section should be able to interpret the event message, then perform some action, for example calling another End Point when an article is updated.
An event message contains the following:
Property | Description |
---|---|
action | The action performed, eg INSERT, UPDATE, DELETE |
ip | The IP address of the request that triggered the message |
itemID | iCM asset ID |
itemType | iCM asset type, eg Article, Media, Object, User, UserGroup |
local | true if the action occurred on this server (as opposed to elsewhere in a clustered environment - see below) |
notes | Additional notes |
timestamp | The event timestamp |
userID | The ID of the iCM user responsible for the message |
local
The local flag is important where there are multiple iCM servers in a cluster. When an event is generated it will be sent to each and every iCM in the cluster. Thus every iCM will process the message. The local flag will be set to "true" when the message is received by the iCM server that originated the message. Therefore to ensure that actions are only performed once by the event handler End Point, they should only be performed if the "local" is "true".
Example
The End Point library includes an example event handler in