|
5 registered users in last 24 hours Workflow Maintainer's GuideOriginal Text by Lars Pind
This document describes the internal details of the workflow package. It is aimed at developers continuing the development of the package. Other documents related to the ]project-open[ workflow include: For Deciders:
System OverviewThe workflow package consists of five major components:
The Engine is the heart of the system. It's the part that determines what actions you can perform on a case, and keeps track of the state of the case as actions are performed. It also stores the process definitions and the state of all the cases on the system. The Worklist is what the normal end-user sees. It's where the user goes to see the list of tasks he or she is assigned to, and interacts with the system to let us know he's done. The Process Builder lets you define and share processes. The Process Adapter lets you customize assignments and special side-effects of your process to your situation. And finally, the Process Monitor lets you monitor the performance of a process. Transitions and TasksWhen a transition becomes enabled, a row representing the enabled transition is inserted intowf_tasks. This table may have more than one row per transition for a number of reasons. If the user starts the task, then decides to cancel, a new row is inserted, as the same transition becomes enabled again. If there's an iteration in the workflow definition, so the same transition becomes enabled more than once, a new row is inserted each time.
Each task has a state. It starts out as 'enabled'. It moves to 'started', then possibly to 'canceled' or 'finished' in response to user actions. If the transition is part of an implicit or-split (where two transitions share one input place), the task may become 'overridden' if the other task is triggered. AssignmentsAssignments can be done in three different ways:
wf_tasks and the actual assignment is determined, and copied over into wf_task_assignments. The logic is this:
In every event, a number of rows are created in The view User ActionsUsers can start, cancel and finish tasks. Since you can set workflow attributes as part of an action, for each of these actions, you have to make the following sequence of API calls:
The It's perfectly okay to finish a task without explicitly starting it. If there are multiple users assigned to the same task, however, it's strongly recommended that the user starts the task first, as that will remove it from the worklist of other users, so we don't have multiple users working on the same task. Data Model ChangesWhenever there's a data model change, don't forget to propagate that change to:
ReferencesRelated Workflow Topics
Related Object Types
Related Packages
|
