public interface WorkflowAgent
start
new workflows orprocess
steps in existing ones. Example:
SpecialistsBroker.requireSpecialist(WorkflowAgent.TYPE)
Modifier and Type | Interface and Description |
---|---|
static class |
WorkflowAgent.TimeoutException
Exception thrown if a timeout occurred.
|
static interface |
WorkflowAgent.WorkflowProcessContext
Context representing a manual activity in the corresponding workflow process.
|
Modifier and Type | Field and Description |
---|---|
static SpecialistType<WorkflowAgent> |
TYPE
The agent's technical type to be used to request the agent from a
SpecialistsBroker . |
Modifier and Type | Method and Description |
---|---|
WorkflowAgent.WorkflowProcessContext |
process(Task task,
Transition transition)
Processes the next
activity of the given task specified by given transition, wherefore given transitionmust be one of the outgoing transitions of the current task state ( task . |
WorkflowAgent.WorkflowProcessContext |
startWorkflow(Workflow workflow)
Starts a new workflow process
without context . |
WorkflowAgent.WorkflowProcessContext |
startWorkflow(Workflow workflow,
IDProvider element)
Starts a new workflow process which context is based on the given element (mode is
Task.Mode#ENTITY , if given element is a Dataset , otherwise Task.Mode#STORE_ELEMENT ). |
static final SpecialistType<WorkflowAgent> TYPE
SpecialistsBroker
.@NotNull WorkflowAgent.WorkflowProcessContext startWorkflow(@NotNull Workflow workflow)
without context
. This method will create a new task
which will be reachable via the returned context
. The returned context represents the first manual activity
of the correspondingworkflow model
, providing means to process
the nexttransition
.
automatic
, the activity will be processed automatically and the returned context just provides access to the task which is already in the next state
.IllegalArgumentException
- if provided workflow and provided element do not belong to the same project.@NotNull WorkflowAgent.WorkflowProcessContext startWorkflow(@NotNull Workflow workflow, @Nullable IDProvider element) throws LockException, ElementDeletedException
Task.Mode#ENTITY
, if given element is a Dataset
, otherwise Task.Mode#STORE_ELEMENT
). This method will create a new task
which is reachable through getTask()
of the returnedcontext instance. The returned context represents the first manual activity
of the correspondingworkflow model
providing means toprocess
the nexttransition
.
automatic
, the activity will be processed automatically and the returned context just provides access to the task which is already in the next state
.IllegalArgumentException
- if provided workflow and provided element do not belong to the same project.LockException
ElementDeletedException
WorkflowAgent.WorkflowProcessContext process(@NotNull Task task, @NotNull Transition transition) throws LockException
activity
of the given task specified by given transition, wherefore given transitionmust be one of the outgoing transitions of the current task state
( task
. getTaskState()
. getModelState()
. getTargetTransitions()
). The returned context represents the next activity
of the belonging workflow model
providing means to process
the next transition
. If the next activity has a script
, the activity will be processed automatically and the returned context provides only access to the task which is already in the next state
.IllegalArgumentException
- if given task or transition are not part of the corresponding workflow model.LockException
- during lock problems with elements related to context based tasksCopyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210