Tuesday, 10 February 2015

Events and subscriptions

Events and subscriptions

Events provide a mechanism for initiating actions that are invoked when objects are created and modified in, and deleted from, an object store. For example, creating a document in an object store triggers a create event, which launches a workflow that approves the new document and posts the approved content to a Web site.

A subscription is the association of a particular event trigger with an event action. In the previous example, create is the event trigger and the event action is the workflow launch. Many different subscriptions might be associated with a particular event trigger. The following diagram illustrates how several events might be triggered when a new loan application document is created in an object store.

FileNet P8 comes with predefined event actions, including launching a workflow. In addition, events can be developed as a Java class. Subscriptions can be associated with a class so that they apply to the class itself or to all instances or all objects of the class type. Or, subscriptions can be associated with individual objects. Event subscriptions can be run synchronously or asynchronously. When set to run synchronously, the object operation (for example, create or update) and the operations of the event actions are completed as a single transaction; failure in either results in rollback of both operations. For example, a synchronous event might be applied to a Claim folder class that returns an error if a document that doesn’t belong to the Claim Document class is filed in the folder. When set to run asynchronously, the object operation and the event action operation run as separate transactions; in this case, the object operation can succeed independently of the event action operation


 





No comments:

Post a Comment