Oracle Workflow APIs provides three types of Task Service APIs:
1. Single Task Service:
This is used for programmatically setting the outcome of a single task. ITaskService interface exposes operations to perform actions viz. add/remove comments, withdraw or reassign tasks, etc. It internally uses the ITaskQueryService interface (discussed in next section) to fetch a specific task and then perform operations on it
2. Task Query Service
This is used for programmatically retrieving tasks, task details, etc. The ITaskQueryService interface exposes methods to fetch workflow-context from remote client object, retrieve tasks that match the specified task filter viz. task-number, task-id, etc.
3. Federated Task Service
This is used for programmatically fetching task details from multiple SOA runtime environments.
We first create an instance of TaskAuthenticationClient which can be used to get handle to the instances if ITaskQueryService and ITaskService. This class will abstract the underlying SOA APIs from the invoker classes. We will employ singleton design for this class as we want to restrict the object creation to a single instance.
We will now create a TaskServiceClient class. This class will hold the references of TaskAuthenticationClient, ITaskQueryService, ITaskService and the IWorkflowContext.
The code snippet below demonstrates the use of SOA API to
- Fetch list of tasks based on a filter
- Fetch task details based on task number
- Fetch task history i.e. various versions of the task
- Add comments to a task
For more information contact the blogger at:
piyush@piyush-agarwal.com
piyush.m.agarwal@gmail.com