ArcFM Engine Developer Guide
Subtasks

Version: 10.2.1c and 10.2.1c SP3

Resource Center Home

Subtasks are COM classes that can be associated with Process Framework tasks. Subtasks play a role in determining when their parent task is enabled. When a task is executed, its subtasks are executed as well. Process Framework extensions offer several subtasks that the user can group into tasks using the Process Framework Administration tool. For more information about creating tasks, refer to the online help provided with the Administration tool.

In addition to configuring the subtasks provided with Process Framework’s extensions, you may create your own. This section focuses on creating custom subtasks that may be grouped into a single task.


Interfaces:
    IMMPxSubtask
    IMMPxSubtask2

Component Category:
    MMPxSubtasks

Tools in Process Framework extensions are one of the ways users interact with Process Framework. Tools usually perform several actions such as prompting the user to confirm if he wishes to continue an operation, changing the owner of a node, and submitting a node for approval. Tools that change the state of a node must be aware of the state to which the node is moving. These qualities make tools inflexible and force implementers to write custom tools if they need to deviate even slightly from the behavior of the tools provided with the sample extensions included with the ArcFM Solution installation (Session Manager and Workflow Manager).

Process Framework Tasks provide a mechanism to make tools more flexible. Tasks allow users to divide the actions performed by a tool into subtasks and execute these subtasks as a group. Subtasks may be added, removed, and reordered to provide the desired functionality.

Subtasks may also carry certain data parameters that can be used by the subtask’s custom code. This provides a way to write more flexible subtasks that can behave differently for each task to which it is assigned. An example of this would be a “Change Owner” subtask. When the Change Owner subtask is assigned to the Submit task (in the Process Framework Administration Tool), it may display a list of users with the Approval Officer role. When the Change Owner subtask is assigned to the Reject task, it may display a list of users with the Editor role instead.

Executing Tasks from Subtasks

A subtask may call a task to be executed. For example, Workflow Manager utilizes two node types. When you click the Begin Construction button for a design, the Begin Construction tool’s subtask executes the Construct Work Request task to move the Work Request node to the In Construction state.

Configuring Subtasks

To ensure your custom subtask appears in the Available Subtasks window on the Process Framework Administration tool, it must be registered in the M&M Process Framework Subtask (MMPxSubtasks) component category. This is easily done by utilizing the IMMRegInCat interface.

Task Dictionary

A task dictionary is used to store data that may be accessed by all subtasks assigned to the task (IMMPxTask2::Dictionary). One subtask may gather information required by a second subtask. The first subtask can place the data in the task dictionary, where the second subtask has access to it.

Task Localization

If you modify a task name, it must also be updated in the Process Framework Administration tool. Select the task on the Node Types tab and select Properties to edit it.

 

 


Send Comment to ArcFMdocumentation@schneider-electric.com