Workflow Concepts

The Content Engine API provides the following workflow capabilities:

This topic discusses the API capabilities of workflow definition and workflow subscription objects. For code examples of these objects, see Working with Workflow-related Objects. For an overview of workflows, see Getting started with FileNet Process applications. For information on workflows as implemented in the Enterprise Manager, see Implement workflow subscriptions.

Workflow Definitions

A workflow definition document is authored with the Process Designer application, and is persisted on the Content Engine as a WorkflowDefinition object. The WorkflowDefinition interface extends the Document interface, and can, therefore, be treated as a Document object. That is, you can check out the workflow definition, set content on it, check it back in, file it into a folder, and delete it.

To be useful, a workflow definition must be transferred to Process Engine, where it is compiled. You can manually transfer workflow definitions with the Process Designer application, or programmatically via the Process Java™ API. If a programmatic transfer is successful, Process Engine returns a unique identifier for the compiled workflow definition, which you must set on the WorkflowDefinition object's VWVersion property.

NOTE There is no .NET API for Process Engine; therefore, you cannot transfer workflow definitions with a .NET application.

A transferred workflow definition can be launched manually, or it can be launched from a subscription, as described in the next section. Note that a WorkflowDefinition can be linked to multiple subscriptions. A WorkflowDefinition object's WorkflowSubscriptions property contains all of the workflow subscriptions associated with the object.

Workflow Subscriptions

You can link a workflow definition to a workflow subscription. When a subscribed event fires, the workflow launches from Process Engine. There are two workflow subscription interfaces: InstanceWorkflowSubscription and ClassWorkflowSubscription, both of which extend the Subscription class. An InstanceWorkflowSubscription executes in response to an event triggered on a specific object instance. A ClassWorkflowSubscription executes in response to an event triggered on any object of a particular class.

Setting up a workflow subscription is almost identical to setting up a class or instance subscription, a process described in Subscription Concepts. To summarize, you use a Factory method to create an instance of a subscription, and then set the DisplayName, SubscriptionTarget, SubscribedEvents, and EventAction properties. In addition, with a workflow subscription, you must also transfer a workflow definition to Process Engine, then set these properties:

Other workflow subscription-specific properties are optional. For example, the settable EnableManualLaunch property indicates whether the workflow for a Subscription object can be manually launched.

Note that the derived property, IsSynchronous, is read-only with a value of false for a workflow subscription. This property determines how the subscription's event procedure executes on Content Engine. For a workflow subscription, the event is always fired asynchronously.

For more property information, see InstanceWorkflowSubscription Properties and ClassWorkflowSubscription Properties.