Interface WorkflowScriptContext
- All Superinterfaces:
BaseContext,ClientScriptContext,GuiScriptContext,ProjectScriptContext,ScriptContext,SpecialistsBroker
Definition of a context container for workflow scripts.
- Since:
- 3.0.1
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.espirit.firstspirit.access.BaseContext
BaseContext.Env -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoiddoTransition(Transition transition) Starts the transition given by the transition parametervoiddoTransition(String transitionName) Starts the transition with the reference name given by the string parameterReturns the call mode of the currentTaskgetData()Deprecated.Returns error info object if gotoErrorState was called during this script execution or null.@Nullable FormDataProvides the form data defined within the currentTask.The contents of this map will be held persistent during the whole workflow processDeprecated, for removal: This API element is subject to removal in a future version.since 5.1.104, useClientScriptContext.getElement()getTask()Return the task object.@Nullable TransitionReturn result transition of the script execution.Return the TransitionParameters for the script execution@NotNull Transition[]Returns all Transitions allowed for the current user, which points FROM the underlyingactivity.Returns aWorkflowablefor the current Object@NotNull WorkflowContextReturn the current workflow context.voidgotoErrorState(@Nullable String comment, @Nullable Throwable throwable) Goto the error state of the workflow.voidSends an email to the defined receiversShow ActionDialog and forward all values (including the selected transition) to theTransitionParametersobject for thisTask, if a target transition is selected.
All values are updated automatically.Methods inherited from interface de.espirit.firstspirit.access.BaseContext
isMethods inherited from interface de.espirit.firstspirit.access.ClientScriptContext
getElement, getUser, getUserGroupsMethods inherited from interface de.espirit.firstspirit.access.GuiScriptContext
getGuiHost, getScript, isOnHomePage, showForm, showForm, showFormMethods inherited from interface de.espirit.firstspirit.access.project.ProjectScriptContext
getProject, getUserServiceMethods inherited from interface de.espirit.firstspirit.access.ScriptContext
getConnection, getProperties, getProperty, logDebug, logError, logError, logInfo, logWarning, removeProperty, setPropertyMethods inherited from interface de.espirit.firstspirit.agency.SpecialistsBroker
requestSpecialist, requireSpecialist
-
Field Details
-
MANUAL
static final int MANUALTask state definition for manual transitions.- Since:
- 3.0.1
- See Also:
-
AUTOMATIC
static final int AUTOMATICTask state definition for automatic transition.- Since:
- 3.0.1
- See Also:
-
-
Method Details
-
getStoreElement
Deprecated, for removal: This API element is subject to removal in a future version.since 5.1.104, useClientScriptContext.getElement()- Specified by:
getStoreElementin interfaceClientScriptContext- Returns:
- an instance of
Workflowable - Since:
- 3.0.46
-
showActionDialog
Transition showActionDialog()Show ActionDialog and forward all values (including the selected transition) to theTransitionParametersobject for thisTask, if a target transition is selected.
All values are updated automatically. There is no need to calldoTransition(Transition)afterwards. You can read and manipulate the selected values by using thegetTransitionParameters()method.- Returns:
- The selected transition or
null - Since:
- 3.0.1
-
doTransition
Starts the transition with the reference name given by the string parameter- Parameters:
transitionName- The reference name of theTransition- Throws:
IllegalAccessException- Since:
- 3.0.1
-
doTransition
Starts the transition given by the transition parameter- Parameters:
transition- theTransitionthat should be started- Throws:
IllegalAccessException- Since:
- 3.0.1
-
getData
Deprecated.since 5.2.19, usegetFormData()- Since:
- 3.0.1
-
getFormData
Provides the form data defined within the currentTask.- Returns:
- The defined form data or
null. - Since:
- 5.2.19
-
getTransitions
Returns all Transitions allowed for the current user, which points FROM the underlyingactivity.- Returns:
- a list with all transitions allowed for the current user, or an empty list if there is no transition.
- Since:
- 3.0.1
-
getCallMode
TaskState.Mode getCallMode()Returns the call mode of the currentTask- Returns:
- The
TaskState.Modeof the currentTask - Since:
- 4.0.120
-
sendEMail
Sends an email to the defined receivers- Parameters:
receivers- The email address of the recipients. Can be a comma separated list of email addressessubject- The subject of the emailmessage- The message body for the email- Since:
- 3.0.1
-
getSession
The contents of this map will be held persistent during the whole workflow process- Returns:
- the session parameter map
- Since:
- 3.0.1
-
getWorkflowable
Workflowable getWorkflowable()Returns aWorkflowablefor the current Object- Returns:
- The
Workflowablebelonging to this workflow script context - Since:
- 3.0.46
-
getTransition
Return result transition of the script execution. Returnnullif no transition was made.- Since:
- 4.1.1
-
getTransitionParameters
TransitionParameters getTransitionParameters()Return the TransitionParameters for the script execution- Returns:
- The
TransitionParametersbelonging to the currentTransition - Since:
- 4.0.120
-
gotoErrorState
void gotoErrorState(@Nullable @Nullable String comment, @Nullable @Nullable Throwable throwable) throws IllegalStateException Goto the error state of the workflow. If the workflow has no error state it will throw an IllegalStateException- Parameters:
comment- A comment for the error. Can benullthrowable- AThrowablebelonging to the error. Can benull- Throws:
IllegalStateException- If the workflow has no error state- Since:
- 4.1.10
-
getErrorInfo
TaskErrorInfo getErrorInfo()Returns error info object if gotoErrorState was called during this script execution or null.- Returns:
- Returns the
TaskErrorInfothat belongs to the error of the currentTask. - Since:
- 4.1.10
-
getTask
Task getTask()Return the task object.- Returns:
- The
Taskbelonging to the current workflow script context - Since:
- 4.1.10
-
getWorkflowContext
Return the current workflow context.- Returns:
- The current
workflow context - Since:
- 4.2.451
-
getFormData()