public static interface WorkflowAgent.WorkflowProcessContext extends BaseContext
next workflow step
. The possible outgoing transitions of this activity targeting the next state
are provided viagetTransitions()
. The user of this context has to decide which transition should be processed by calling doTransition(Transition)
. All data modifying methods like getFormData()
, getTransitionParameters()
must be called before calling doTransition(Transition)
whichcompletes the activity. Attention:UnsupportedOperationException
if after doTransition(Transition)
hasbeen called or the activity has been processed automatically. In both cases isActivityProcessed()
returns true
.doTransition(Transition)
or gotoErrorState(String,Throwable)
has beencalled. This can cause a timeout if the answer last too long.BaseContext.Env
Modifier and Type | Method and Description |
---|---|
void |
doTransition(Transition transition)
Process the next transition (one of
getTransitions() and completes this workflow processactivity. |
IDProvider |
getElement()
Returns the element this workflow process is related to or
null if this is aworkflow without context . |
TaskErrorInfo |
getErrorInfo()
Returns the error info which has been set in
gotoErrorState(String,Throwable) , or null ifnot in error state. |
FormData |
getFormData()
Returns the custom form data object
|
Task |
getTask()
Returns the task this workflow process belongs to.
|
TransitionParameters |
getTransitionParameters()
Delivers the transition parameters object to be filled before calling
doTransition(de.espirit.firstspirit.workflow.model.Transition) . |
List<Transition> |
getTransitions()
Return the next possible transitions of the activity this context belongs to.
|
void |
gotoErrorState(String comment,
Throwable throwable)
Switch this task to the error state if it is defined.
|
boolean |
isActivityProcessed()
Indicates whether the activity this context belongs to has been processed yet or not.
|
Transition |
showActionDialog()
Shows an action gui dialog and returns the transition selected by the user.
|
is, logDebug, logError, logError, logInfo, logWarning
requestSpecialist, requireSpecialist
boolean isActivityProcessed()
doTransition(Transition)
this method will deliver true
. If this context is provided after an activity with a script
which has been processed automatically,this method will always deliver true
.doTransition(Transition)
@Nullable IDProvider getElement()
null
if this is aworkflow without context
.void doTransition(@Nullable Transition transition) throws WorkflowAgent.TimeoutException
getTransitions()
and completes this workflow processactivity. Use null
to cancel the current activity process. This method can only be called once.UnsupportedOperationException
- if this context is provided after an automatic activity or the activityhas already been processed
WorkflowAgent.TimeoutException
- if this context timed out (see server property 'workflow.api.timeout')getTransitions()
List<Transition> getTransitions()
doTransition(Transition)
TransitionParameters getTransitionParameters()
doTransition(de.espirit.firstspirit.workflow.model.Transition)
. Calling doTransition(Transition)
will set the transition
in this parameters.UnsupportedOperationException
- if this context is provided after an automatic activity or the activityhas already been processed
FormData getFormData()
UnsupportedOperationException
- if this context is provided after an automatic activity or the activityhas already been processed
@Nullable Transition showActionDialog()
transition parameters
.UnsupportedOperationException
- if this context is provided in headless mode or after an automatic activityor this process has already been processed
(doTransition(Transition)
, gotoErrorState(String,Throwable)
already called)void gotoErrorState(@Nullable String comment, @Nullable Throwable throwable) throws IllegalStateException
IllegalStateException
- if the belonging workflow model has no error state
TaskErrorInfo getErrorInfo()
gotoErrorState(String,Throwable)
, or null
ifnot in error state.Task getTask()
Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210