The page is under construction.
The functionality will be split into two modules: workflow-base and workflow-jbpm. The workflow-base will contain the basic API definition and the UI implementation, whereas the workflow-jbpm module will contain the jBPM based back-end implementation.
Commands API will be used to lunch new processes, as well as to provide human interaction with the running processes (approval/reject/...). This allows to untie the launching and especially the approval process from the M5 UI and allow external systems to enter the process.
The Messages API will be used to inform users about processes waiting for approval.
Note to the above process: when the message is dispatched by user (approved/rejected/...), it has to be deleted from the list (to prevent multiple dispatching).
The following picture provides the class diagram of basic classes:
Core interface (together with WorkflowUtil), defines methods to launch new process, resolve a running process by its ID, and a set of general constants.
Defined as a component, with a dummy implementation in the Base module.
Utility interface - provides methods to be used from within the Process to communicate with Magnolia (e.g. send messages to the user/group, etc.).
This interface defines basic constants and methods of the bean that provides the definition of a workflow.
Provides getWorkflows() and getWorkflow(name) methods - to get all defined workflows and a concrete workflow definition by its name.
Basic implementation of the WorkflowRegistry interface - allows to store the workflow definition as a String property in the configuration, or as a classpath resource identified by a file name.
This interface defines basic constants and methods for the running process.
An implementation of the Process interface, wraps the jBPM's ProcessInstance class.
An implementation of the WorkflowManager interface, provides its methods using the jBPM process engine.
An implementation of the WorkflowUtil interface, provides its methods using the jBPM process engine.
The Base module does no special initialization.
The jBPM module starts the KnowledgeService (process engine) and the (Local)HumanTaskService (and the persistence layer for them), and provides them to the JBPMFlowManager instance.
Besides the UI configuration, the Base module contains the workflow definitions. These are stored at $MODULE_PATH/config/workflows/definitions, e.g. activation and deactivation workflow definitions.
The definition node has following properties:
name- simple name of the definition, e.g.
id- the "system" ID of the definition, used to launch new process based on this definition; e.g.
type- identifies the type of the definition, ATM always "
definition- the String property with the actual definition, may be empty / not present - in such event, the
fileNameproperty must exist;
fileName- if exist, then defines the name of the resource in
CLASSPATH, where the definition is stored;
Contains the configuration of the persistence layer for the KnowledgeService and HumanTaskService.