190 likes | 205 Views
Learn how to create and manage custom workflows for effective task handling. Understand workflow types, states, transitions, and task assignments.
E N D
contentXXL Workflow/Tasks • Overview • Workflow • Tasks • How to create a customized workflow
1. Overview • Workflow handles publishing and approval of objects • Tasks are job oriented, flexible workflows which may be assigned to objects or without an object context • Workflow may be assigned to an user or a role. • Tasks may be assigned to one or more users or roles. If it is assigned to several users, every user must finish this task. If it is assigned to a role, any member of this role can accept the task. The task then is invisible for the other rolemembers.
2. Workflow • there are 3 types of workflows • trivial no action • trivial with notify notification, no approval required • basic notification, approval required • i
2. Workflow • Concept: • workflow is modelled as a state machine • it consists of states and state transitions Transition: approve Transition: start State: Approved State: Waiting for approval Transition: reject State: Rejected
2. Workflow • here the state machines (workflow types) are defined • currently 3 workflow types are implemented: • trivial (= default) • trivial with notify • basic AssemblyName: possibility to implement custom workflows
2 . Workflow • defines workflow state types: • 3 states are currently available • start • in progress • finished • basic: • is in workflow (type 'start') • accepted (type 'finished') • rejected (type 'finished') for workflows 'trivial' and 'trivial with notify' only the state accepted is possible
2. Workflow • defines possible transitions for a workflow • between states • (fields StateFrom and StateTo from table WorkFlowState) basic: • start (StateFrom: 0) • accepted • rejected • trivial and trivial with notify: • accepted (StateFrom: 0) ClassName: ContentXXL.WorkFlow.Basic.PrimitiveTransition (basic and trivial) ContentXXL.WorkFlow.Basic.PrimitiveTransitionWithMailNotification
2. Workflow not used not used
2. Workflow binds workflow to object (ObjectVersionControlID) if versioning is disabled the workflow is connected with version 0 Version: LatestVersion from table ObjectVersionConrol WorkFlowStateID: ID from table WorkFlowState InitiatorUserID: user which requests this workflow Action: save, checkin, publish TargetGlobalID: if action is 'publish', the PublishInfoRequestID from table PublishInfoRequest (publishing information) is stored here
2. Workflow saves workflow history, not reflected in user interface not used
2. Workflow binds workflow type (WorkFlowDefinitionID) to object and responsible persons GlobalID: defines scope for this workflow (module or portal) ResponsiblePerson: globalid from table roles or users LanguageID: workflows can be defined language dependant Action: not used
2. Workflow Namespace ContentXXL.WorkFlow.Basic
3. Tasks there are standard tasks and workflowtasks workflowtasks have a workflowinstanceid > 0 responsiblecache: users or roles to which the task is assigned to as comma separated string if more than one user or role (redundant information from PublishInfo table for fast access) relatedobject: globalid of object when the task was created in an object context 'None' if it is a general task Empty string in case of a workflow task status: current state of the task
3. Tasks assignment of tasks to users or roles are made in the PublishInfo table: GlobalItemID: task globalid GlobalTargetID: user or role globalid if a task is assigned to a role and one member of this role accepts the task, it will be reassigned to this member
3. Tasks represented by the field 'status' in the Tasks table
4. How to create a customized workflow database: create a new entry in table WorkFlowDefinition (AssemblyName is the name of your assembly) create a corresponding new entry in table WorkFlowState create a corresponding new entry in table WorkFlowTransition (ClassName is your class which implements the interface IWorkFlowTransition)
contentXXL Thank you!