Klasse WorkflowKernel
The WorkflowKernel operates on a Open BPMN model instance to navigate through
a BPMN 2.0 model. The model instance is identified by the attribute
$modelversion. The WorkflowKernel expects a WorkflowContext to access
the ModelManager and the runtime environment.
An implementation of the
Ungültige Referenz
WorkflowManagerPlugin and Adapter classes
to be executed during the processing life cycle of one or many workItems.
- Version:
- 2.0
- Autor:
- Ralph Soika
- Siehe auch:
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringVeraltet.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungWorkflowKernel(WorkflowContext context) Constructor initialize a ModelManger instance. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungeval(ItemCollection _workitem) Evaluates the next task BPMN element for a process instance (workitem) based on the current model definition.static StringThis method generates an secure 8 byte random secure id.static StringThis method generates an immutable universally unique identifier (UUID).Returns a registry containing all registered Adapter instances.Returns a registry containing all registered plugin instances.This method returns new SplitWorkitems evaluated during the last processing life-cycle.loadEvent(ItemCollection workitem, org.openbpmn.bpmn.BPMNModel model) Returns the BPMN Event entity associated with a given workitem, based on its attributes "$modelVersion", "$taskID" and "$eventID".process(ItemCollection workitem) This method processes a workitem (process instance) based on the current model definition.voidregisterAdapter(Adapter adapter) This method registers a new adapter class.voidregisterPlugin(String pluginClass) This method registers a new plugin based on class name.voidregisterPlugin(Plugin plugin) This method registers a new plugin class.voidThis method removes all registered pluginsvoidunregisterPlugin(String pluginClass) This method removes a registered plugin based on its class name.
-
Felddetails
-
MISSING_WORKFLOWCONTEXT
- Siehe auch:
-
UNDEFINED_PROCESSID
- Siehe auch:
-
UNDEFINED_ACTIVITYID
- Siehe auch:
-
UNDEFINED_WORKITEM
- Siehe auch:
-
UNDEFINED_PLUGIN_ERROR
- Siehe auch:
-
ACTIVITY_NOT_FOUND
- Siehe auch:
-
MODEL_ERROR
- Siehe auch:
-
PLUGIN_NOT_CREATEABLE
- Siehe auch:
-
PLUGIN_NOT_REGISTERED
- Siehe auch:
-
PLUGIN_ERROR
- Siehe auch:
-
ADAPTER_ERROR_CONTEXT
- Siehe auch:
-
ADAPTER_ERROR_CODE
- Siehe auch:
-
ADAPTER_ERROR_PARAMS
- Siehe auch:
-
ADAPTER_ERROR_MESSAGE
- Siehe auch:
-
ISO8601_FORMAT
- Siehe auch:
-
UNIQUEID
- Siehe auch:
-
UNIQUEIDSOURCE
- Siehe auch:
-
UNIQUEIDVERSIONS
- Siehe auch:
-
WORKITEMID
- Siehe auch:
-
MODELVERSION
- Siehe auch:
-
TRANSACTIONID
- Siehe auch:
-
PROCESSID
Veraltet.- Siehe auch:
-
TASKID
- Siehe auch:
-
EVENTID
- Siehe auch:
-
INTERMEDIATE_EVENTID
- Siehe auch:
-
INTERMEDIATE_EVENT_ELEMENTID
- Siehe auch:
-
WORKFLOWGROUP
- Siehe auch:
-
WORKFLOWSTATUS
- Siehe auch:
-
ISVERSION
- Siehe auch:
-
LASTTASK
- Siehe auch:
-
LASTEVENT
- Siehe auch:
-
LASTEVENTDATE
- Siehe auch:
-
CREATOR
- Siehe auch:
-
EDITOR
- Siehe auch:
-
LASTEDITOR
- Siehe auch:
-
EVENTLOG
- Siehe auch:
-
EVENTLOG_COMMENT
- Siehe auch:
-
CREATED
- Siehe auch:
-
MODIFIED
- Siehe auch:
-
TYPE
- Siehe auch:
-
-
Konstruktordetails
-
WorkflowKernel
Constructor initialize a ModelManger instance. The ModelManager instance can load models form the WorkflowContext.
-
-
Methodendetails
-
getModelManager
-
generateUniqueID
This method generates an immutable universally unique identifier (UUID). A UUID represents a 128-bit value.- Gibt zurück:
- UUID
-
generateTransactionID
This method generates an secure 8 byte random secure id. The ID is returned as a hex decimal value.- Gibt zurück:
- transactionID
-
registerPlugin
This method registers a new plugin class. The method throws a PluginException if the class can not be registered. If the new Plugin implements the PluginDependency interface, the method validates dependencies.- Parameter:
pluginClass-- Löst aus:
PluginException
-
registerAdapter
This method registers a new adapter class.- Parameter:
adapterClass-
-
registerPlugin
This method registers a new plugin based on class name. The plugin will be instantiated by its name. The method throws a PluginException if the plugin class can not be created.- Parameter:
pluginClass-- Löst aus:
PluginException
-
unregisterPlugin
This method removes a registered plugin based on its class name.- Parameter:
pluginClass-- Löst aus:
PluginException- if plugin not registered
-
unregisterAllPlugins
public void unregisterAllPlugins()This method removes all registered plugins- Parameter:
pluginClass-
-
getPluginRegistry
Returns a registry containing all registered plugin instances.- Gibt zurück:
-
getAdapterRegistry
Returns a registry containing all registered Adapter instances.- Gibt zurück:
-
process
This method processes a workitem (process instance) based on the current model definition. A workitem must at least provide the properties$ModelVersion,$TaskIDand$EventID.During the processing life-cycle more than one event can be processed. This depends on the model definition which is controlled by the
ModelManager. For example an event can be followed by another event in the process flow. Also conditional events can have different outcomes depending on the data of a workitem.The method executes all plugin and adapter classes and returns an updated instance of the workitem. The method did not persist the process instance. The persistence mechanism is covered by the
WorkflowServicewitch is not part of this core project.- Parameter:
workitem- the process instance to be processed.- Gibt zurück:
- updated workitem
- Löst aus:
PluginExceptionModelException
-
loadEvent
public ItemCollection loadEvent(ItemCollection workitem, org.openbpmn.bpmn.BPMNModel model) throws ModelException Returns the BPMN Event entity associated with a given workitem, based on its attributes "$modelVersion", "$taskID" and "$eventID".The method throws a
ModelExceptionif no Event can be resolved based on the given model information.The method is called by the
WorkflowKernelto start the processing life cycle.A Event is typically connected with a Task by outgoing SequenceFlows. A special case is a Start event followed by one or more Events connected with a Task (Start-Task) element.
- Parameter:
workitem-- Gibt zurück:
- BPMN Event entity -
ItemCollection - Löst aus:
ModelException- if no event was found
-
eval
Evaluates the next task BPMN element for a process instance (workitem) based on the current model definition. A Workitem must at least provide the properties$TaskIDand a$EventIDor$intermediateEventID.During the evaluation life-cycle more than one event can be evaluated. This depends on the model definition which can define follow-up-events, split-events and conditional events.
The method did not persist the process instance or execute any plugins or adapter classes.
- Parameter:
workitem- the process instance to be evaluated.- Gibt zurück:
- the BPMN task element followed by the given execution flow
- Löst aus:
PluginExceptionModelException
-
getSplitWorkitems
This method returns new SplitWorkitems evaluated during the last processing life-cycle.- Gibt zurück:
-