Siebel Business Process Framework: Task UI Guide > Creating Steps and Connectors >
Creating a Subtask Step
A subtask step is a type of task UI step that allows you to start a separate task in a task. You can use it to do the following:
- Reuse common sequences that you define in a task UI to decrease development and maintenance cost.
- Modularize a task UI. If a task is so large that it becomes difficult to develop and manage, then you can separate it into smaller subtasks.
- Separate a large task into multiple tasks to improve readability of the task UI in the Task Editor.
- Maintain a clean, consistent, and intuitive programming model.
For more information, see Using a Transient Business Component in a Subtask. To create a subtask step
- In the Object Explorer, click Task.
- Make sure the subtask that the subtask step calls is defined correctly.
For more information, see Characteristics of a Subtask.
- Add a subtask step to a task UI.
For more information, see Adding a Step to a Task UI.
- In the Subtask Name property, choose the subtask that this subtask step calls.
- Optional. Create input arguments or output arguments for the subtask.
For more information, see How the Type Field Affects Other Fields in the Multi Value Property Window.
Comparing a Subtask to a Subprocess
Table 12 compares a subtask that resides in a task UI to a subprocess that resides in a workflow process.
Table 12. Comparison of Subtask to Subprocess
|
|
|
Process Instance |
A parent task UI and a subtask share the same process instance. |
A parent workflow process and a subprocess run in separate instances. |
Process Properties and Task Properties |
Starting a subtask does not create a new instance. Siebel CRM creates a new context each time it starts a subtask. The context stores local task properties. A subtask and a parent task UI do not share task properties. For more information, see How a Subtask Uses a Task Property. |
Starting a subprocess creates a new instance of the workflow process. A subprocess includes an independent set of process properties. |
Business Object |
A parent task UI and a subtask must reference the same business object. They must include the same business object type and share the same business object instance. |
A parent workflow process and a subprocess can reference different business objects, and can use two different business object instances. |
Input Arguments and Output Arguments |
Siebel CRM can pass information in and out of a subtask through an input argument or an output argument. An input argument allows it to enter data in the task property of a subtask. It can get this data from the parent task. For more information, see How a Subtask Uses a Task Property. |
The operation of an input argument or output argument is similar to the subprocess step in a workflow process. |
Characteristics of a Subtask
A subtask includes the following characteristics:
- A task UI can include one or more subtask steps.
- A subtask can include a subtask.
- You cannot use a subtask as a parent task.
- A subtask can include a commit step.
- An object definition must exist for the subtask before you can reference it in a subtask step of the parent task.
- The Is Subtask property of the task UI that a subtask step references must be TRUE. You cannot modify this value after you set it.
- The boundaries of a subtask are not visible in the Siebel client. For example, if the user clicks Previous or Next, then the user can cross the subtask boundary in either direction.
- You can define an event handler only for a parent task, and not a subtask. For more information, see How Siebel CRM Handles an Event That Occurs in a Subtask.
- You must explicitly define a task UI as the parent task or the subtask at design time. Each parent task UI includes a task state. The task state stores information that is essential to the run-time task instance. This information includes the pointer to the current step, task object Id, and the navigation path. A subtask does not require an individual task state, but it does require an independent set of local task properties.
- The parent task and the subtask pass data through input arguments and output arguments so that they can communicate with each other.
- You can deploy and activate a subtask in the same way that you deploy and activate a parent task. If you publish a task that includes a subtask, then you must publish the subtask before you publish the parent task. This sequence makes sure the subtask is available to the parent task in the run-time environment.
Using the Exception Branch in a Subtask
You can use an exception branch in a subtask. You cannot use an exception branch to enter or leave a subtask step. This restriction makes sure that a subtask can only exit from the end step of the subtask, and in the forward direction.
|