Code Samples
To assist you with understanding how to implement a task workflow, you can examine and deploy a sample task application, process model, and Integration Server package that support a very simple loan application process. You can find the code samples on the TECHcommunity website at:
The sample zip files contain the following items:
FormFlowProcessTasks.zip. This file contains the FormFlowProcess Tasks task application that contains two tasks, each with the following portlets:
StartLoanProcess. The primary purpose of this portlet is to provide a
My webMethods interface that enables the user to enter a loan process number and start a new loan process instance. The portlet transitions to the first task interface when the first task is instantiated by the process instance.
TaskStep1Overview. This is a standard Task Overview portlet that serves as a container for providing a formatted message panel for displaying any JSF context messages, as well as portlet include controls for any additional portlets in the task.
TaskStep1Start. A standard Start portlet that enables a user to start a new task on the Task Engine Administration page of My webMethods. If a task is used exclusively within a process (where it will be triggered only by the process), you do not need to include a task start portlet.
TaskStep1View. Also a standard portlet, this is identified as the Task Details portlet in the task editor. It presents editable and non-editable task information, as well as various controls and tabs. This is the portlet where you implement transition to the next task in the task workflow when the task is completed.
WmFormFlowTest.zip. This file contains the
Integration Server package with the required IS document “Loan” as well as the following:
startLoanProcess flow service to start loan application process.
formFlowComplete flow service to complete a task workflow when process ends.
FormFlowTest.zip. This file contains the FormFlowProcess process model, a very simple process model that demonstrates a task workflow:
The start message step is subscribed to the WmFormFlowTest IS document named Loan. Task Step 1 and Task Step 2 are examples of a two-stage task workflow, and the process completes with a service activity that calls a notification service.
Related Topics