Package org.imixs.workflow
Schnittstelle WorkflowContext
- Alle bekannten Implementierungsklassen:
WorkflowService
public interface WorkflowContext
This WorkflowContext provides methods to resolve a valid model version and
fetch a thread save instance of a load a
org.openbpmn.bpmn.BPMNModel.- Version:
- 1.0
- Autor:
- imixs.com
- Siehe auch:
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungevalConditionalExpression(String expression, ItemCollection workitem) Evaluates a BPMN sequence flow condition.evalNextTask(ItemCollection workitem) The method evaluates the next task for a process instance (workitem) based on the current model definition.evalWorkflowResult(ItemCollection event, String tag, ItemCollection documentContext) The method evaluates the WorkflowResult for a given BPMN event and returns a ItemCollection containing all item values of a specified tag name.evalWorkflowResult(ItemCollection event, String xmlTag, ItemCollection documentContext, boolean resolveItemValues) The method evaluates the WorkflowResult for a given BPMN event and returns a ItemCollection containing all item values of a specified xml tag.org.openbpmn.bpmn.BPMNModelfetchModel(String version) This method returns a exclusive thread save BPMNModel instance.findModelVersionByGroup(String group) Returns returns the hightest version matching a given workflow group.findModelVersionByRegEx(String modelRegex) Returns the highest version matching a given regular expression.findModelVersionByWorkitem(ItemCollection workitem) Returns a valid model version for a given workitem.getWorkItem(String uniqueid) This method loads a Workitem with the corresponding uniqueid.processWorkItem(ItemCollection workitem) This method processes a workItem.
-
Methodendetails
-
fetchModel
This method returns a exclusive thread save BPMNModel instance. The method must not return a shared model instance. The method must throw a ModelException in case no model matching the requested version exists. A client can callfindModelVersionByWorkitemto resolve a valid model version for a workitem.- Parameter:
version- - valid model version- Gibt zurück:
- an instance of a BPMNModel to be used in a thread save way
- Löst aus:
ModelException
-
findModelVersionByWorkitem
Returns a valid model version for a given workitem. A model version can also be specified as a regular expression or can be resolved only by a given workflow group. The method must throw a ModelException in case no matching model version exists.- Parameter:
group- - name of the workflow group- Gibt zurück:
- version matching the params of the given workitem
- Löst aus:
ModelException
-
findModelVersionByRegEx
Returns the highest version matching a given regular expression. The method must throw a ModelException in case no matching model version exists.- Parameter:
modelRegex- - regular expression- Gibt zurück:
- version matching the regex
- Löst aus:
ModelException
-
findModelVersionByGroup
Returns returns the hightest version matching a given workflow group. The method must throw a ModelException in case no matching model version exists.- Parameter:
group- - name of the workflow group- Gibt zurück:
- version matching the group
- Löst aus:
ModelException
-
getWorkItem
This method loads a Workitem with the corresponding uniqueid. -
processWorkItem
ItemCollection processWorkItem(ItemCollection workitem) throws AccessDeniedException, ProcessingErrorException, PluginException, ModelException This method processes a workItem. A workitem have to provide at least the properties '$modelversion', '$taskid' and '$eventid'- Parameter:
workitem- - the workItem to be processed- Gibt zurück:
- updated version of the processed workItem
- Löst aus:
AccessDeniedException- - thrown if the user has insufficient access to update the workItemProcessingErrorException- - thrown if the workitem could not be processed by the workflowKernelPluginException- - thrown if processing by a plugin failsModelException
-
evalNextTask
The method evaluates the next task for a process instance (workitem) based on the current model definition. A Workitem must at least provide the properties $TASKID and $EVENTID.- Gibt zurück:
- Task entity
- Löst aus:
PluginExceptionModelException
-
evalWorkflowResult
ItemCollection evalWorkflowResult(ItemCollection event, String xmlTag, ItemCollection documentContext, boolean resolveItemValues) throws PluginException The method evaluates the WorkflowResult for a given BPMN event and returns a ItemCollection containing all item values of a specified xml tag. Each tag definition must contain at least a name attribute and may contain an optional list of additional attributes.- Parameter:
event-xmlTag- - XML tag to be evaluateddocumentContext-resolveItemValues- - if true, itemValue tags will be resolved.- Gibt zurück:
- eval itemCollection or null if no tags are contained in the workflow result.
- Löst aus:
PluginException- if the xml structure is invalid
-
evalWorkflowResult
ItemCollection evalWorkflowResult(ItemCollection event, String tag, ItemCollection documentContext) throws PluginException The method evaluates the WorkflowResult for a given BPMN event and returns a ItemCollection containing all item values of a specified tag name. Each tag definition of a WorkflowResult contains a name and a optional list of additional attributes. The method generates a item for each content element and attribute value.
e.g.- text
will result in the attributes 'comment' with value 'text' and 'comment.ignore' with the value 'true'- Parameter:
event-tag- - tag to be evaluateddocumentContext-- Gibt zurück:
- Löst aus:
PluginException
-
evalConditionalExpression
Evaluates a BPMN sequence flow condition. This method is called by the ModelManager to delegate a conditional expression of a BPMN SequenceFlow to the Workflow Runtime.- Parameter:
expression- the conditional expression from a BPMN SequenceFlow. Can be JavaScript code or any domain-specific condition for a specialized observer.workitem- the workflow item providing context data for condition evaluation- Gibt zurück:
- conditional expression evaluated by the workflow runtime.
-