Package org.imixs.workflow
Class WorkflowKernel
java.lang.Object
org.imixs.workflow.WorkflowKernel
The Workflowkernel is the core component of this Framework to control the
processing of a workitem. A
Workflowmanager
loads an instance of
a Workflowkernel and hand over a Model
and register
Plugins
for processing one or many workitems.- Version:
- 1.1
- Author:
- Ralph Soika
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final int
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Deprecated.static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
ConstructorDescriptionConstructor initialize the contextObject and plugin vectors -
Method Summary
Modifier and TypeMethodDescriptionint
eval
(ItemCollection workitem) Evaluates the next taskID for a process instance (workitem) based on the current model definition.static String
This method generates an secure 8 byte random secure id.static String
This method generates an immutable universally unique identifier (UUID).Returns a registry containing all registered plugin instances.This method returns new SplitWorkitems evaluated during the last processing life-cycle.process
(ItemCollection workitem) Processes a process instance (workitem) based on the current model definition.void
registerAdapter
(Adapter adapter) This method registers a new adapter class.void
registerPlugin
(String pluginClass) This method registers a new plugin based on class name.void
registerPlugin
(Plugin plugin) This method registers a new plugin class.void
This method removes all registered pluginsvoid
unregisterPlugin
(String pluginClass) This method removes a registered plugin based on its class name.
-
Field Details
-
MISSING_WORKFLOWCONTEXT
- See Also:
-
UNDEFINED_PROCESSID
- See Also:
-
UNDEFINED_ACTIVITYID
- See Also:
-
UNDEFINED_WORKITEM
- See Also:
-
UNDEFINED_PLUGIN_ERROR
- See Also:
-
ACTIVITY_NOT_FOUND
- See Also:
-
MODEL_ERROR
- See Also:
-
PLUGIN_NOT_CREATEABLE
- See Also:
-
PLUGIN_NOT_REGISTERED
- See Also:
-
PLUGIN_ERROR
- See Also:
-
ISO8601_FORMAT
- See Also:
-
UNIQUEID
- See Also:
-
UNIQUEIDSOURCE
- See Also:
-
UNIQUEIDVERSIONS
- See Also:
-
WORKITEMID
- See Also:
-
MODELVERSION
- See Also:
-
TRANSACTIONID
- See Also:
-
PROCESSID
Deprecated.- See Also:
-
TASKID
- See Also:
-
EVENTID
- See Also:
-
ACTIVITYIDLIST
- See Also:
-
WORKFLOWGROUP
- See Also:
-
WORKFLOWSTATUS
- See Also:
-
ISVERSION
- See Also:
-
LASTTASK
- See Also:
-
LASTEVENT
- See Also:
-
LASTEVENTDATE
- See Also:
-
CREATOR
- See Also:
-
EDITOR
- See Also:
-
LASTEDITOR
- See Also:
-
CREATED
- See Also:
-
MODIFIED
- See Also:
-
TYPE
- See Also:
-
MAXIMUM_ACTIVITYLOGENTRIES
public static final int MAXIMUM_ACTIVITYLOGENTRIES- See Also:
-
-
Constructor Details
-
WorkflowKernel
Constructor initialize the contextObject and plugin vectors
-
-
Method Details
-
generateUniqueID
This method generates an immutable universally unique identifier (UUID). A UUID represents a 128-bit value.- Returns:
- UUID
-
generateTransactionID
This method generates an secure 8 byte random secure id. The ID is returned as a hex decimal value.- Returns:
- 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.- Parameters:
pluginClass
-- Throws:
PluginException
-
registerAdapter
This method registers a new adapter class.- Parameters:
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.- Parameters:
pluginClass
-- Throws:
PluginException
-
unregisterPlugin
This method removes a registered plugin based on its class name.- Parameters:
pluginClass
-- Throws:
PluginException
- if plugin not registered
-
unregisterAllPlugins
public void unregisterAllPlugins()This method removes all registered plugins- Parameters:
pluginClass
-
-
getPluginRegistry
Returns a registry containing all registered plugin instances.- Returns:
-
process
Processes a process instance (workitem) based on the current model definition. A Workitem must at least provide the properties $TASKID and $EVENTID.During the processing life-cycle more than one event can be processed. This depends on the model definition which can define follow-up-events, split-events and conditional events.
The method executes all plugin and adapter classes and returns an updated instance of the workitem. But the method did not persist the process instance. The persitance mechanism is covered by the WorkflowService.
- Parameters:
workitem
- the process instance to be processed.- Returns:
- updated workitem
- Throws:
PluginException
ModelException
-
eval
Evaluates the next taskID for a process instance (workitem) based on the current model definition. A Workitem must at least provide the properties $TASKID and $EVENTID.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 plugin or adapter class.
- Parameters:
workitem
- the process instance to be evaluated.- Returns:
- result TaskID
- Throws:
PluginException
ModelException
-
getSplitWorkitems
This method returns new SplitWorkitems evaluated during the last processing life-cycle.- Returns:
-