public static interface WorkflowAgent.WorkflowProcessContext extends BaseContext
next workflow step.
The possible outgoing transitions of this activity targeting the next state are provided via
getTransitions(). 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) which
completes the activity.
Attention:UnsupportedOperationException if after doTransition(Transition) has
been called or the activity has been processed automatically. In both cases isActivityProcessed()
returns true.doTransition(Transition) or gotoErrorState(String, Throwable) has been
called. 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 process
activity. |
IDProvider |
getElement()
Returns the element this workflow process is related to or
null if this is a
workflow without context. |
TaskErrorInfo |
getErrorInfo()
Returns the error info which has been set in
gotoErrorState(String, Throwable), or null if
not 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, logWarningrequestSpecialist, requireSpecialistboolean 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 a
workflow without context.void doTransition(@Nullable Transition transition)
getTransitions() and completes this workflow process
activity.
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 activity
has already been processedgetTransitions()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 activity
has already been processedFormData getFormData()
UnsupportedOperationException - if this context is provided after an automatic activity or the activity
has already been processed@Nullable Transition showActionDialog()
transition parameters.UnsupportedOperationException - if this context is provided in headless mode or after an automatic activity
or 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 stateTaskErrorInfo getErrorInfo()
gotoErrorState(String, Throwable), or null if
not in error state.Task getTask()
Copyright © 2015 e-Spirit AG. All Rights Reserved. Build 5.1.408