public interface WorkflowScriptContext extends GuiScriptContext
BaseContext.Env
Modifier and Type | Field and Description |
---|---|
static int |
AUTOMATIC
Task state definition for automatic transition.
|
static int |
MANUAL
Task state definition for manual transitions.
|
Modifier and Type | Method and Description |
---|---|
void |
doTransition(String transitionName)
Starts the transition with the reference name given by the string parameter
|
void |
doTransition(Transition transition)
Starts the transition given by the transition parameter
|
TaskState.Mode |
getCallMode()
Returns the call mode of the current
Task |
Data |
getData()
Deprecated.
since 5.2.19, use
getFormData() |
TaskErrorInfo |
getErrorInfo()
Returns error info object if gotoErrorState was called during this script execution or null.
|
FormData |
getFormData()
Provides the form data defined within the current
Task . |
Map<Object,Object> |
getSession()
The contents of this map will be held persistent during the whole workflow process
|
StoreElement |
getStoreElement()
Deprecated.
since 5.1.104, use
ClientScriptContext.getElement() |
Task |
getTask()
Return the task object.
|
Transition |
getTransition()
Return result transition of the script execution.
|
TransitionParameters |
getTransitionParameters()
Return the TransitionParameters for the script execution
|
Transition[] |
getTransitions()
Returns all Transitions allowed for the current user, which points FROM the underlying
activity . |
Workflowable |
getWorkflowable()
Returns a
Workflowable for the current Object |
WorkflowContext |
getWorkflowContext()
Return the current workflow context.
|
void |
gotoErrorState(String comment,
Throwable throwable)
Goto the error state of the workflow.
|
void |
sendEMail(String receivers,
String subject,
String message)
Sends an email to the defined receivers
|
Transition |
showActionDialog()
Show ActionDialog and forward all values (including the selected transition) to the
TransitionParameters
object for this Task , if a target transition is selected. |
getGuiHost, getScript, isOnHomePage, showForm, showForm, showForm
getElement, getUser, getUserGroups
getProject, getUserService
getConnection, getProperties, getProperty, logDebug, logError, logError, logInfo, logWarning, removeProperty, setProperty
is
requestSpecialist, requireSpecialist
static final int MANUAL
static final int AUTOMATIC
@Deprecated StoreElement getStoreElement()
ClientScriptContext.getElement()
getStoreElement
in interface ClientScriptContext
Workflowable
Transition showActionDialog()
TransitionParameters
object for this Task
, if a target transition is selected.doTransition(Transition)
afterwards. You can read and manipulate the
selected values by using the getTransitionParameters()
method.null
void doTransition(String transitionName) throws IllegalAccessException
transitionName
- The reference name of the Transition
IllegalAccessException
void doTransition(Transition transition) throws IllegalAccessException
transition
- the Transition
that should be startedIllegalAccessException
@Deprecated Data getData()
getFormData()
@Nullable FormData getFormData()
Task
.null
.@NotNull Transition[] getTransitions()
activity
.TaskState.Mode getCallMode()
Task
TaskState.Mode
of the current Task
void sendEMail(String receivers, String subject, String message)
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 emailMap<Object,Object> getSession()
Workflowable getWorkflowable()
Workflowable
for the current ObjectWorkflowable
belonging to this workflow script context@Nullable Transition getTransition()
null
if no transition was made.TransitionParameters getTransitionParameters()
TransitionParameters
belonging to the current Transition
void gotoErrorState(@Nullable String comment, @Nullable Throwable throwable) throws IllegalStateException
comment
- A comment for the error. Can be null
throwable
- A Throwable
belonging to the error. Can be null
IllegalStateException
- If the workflow has no error stateTaskErrorInfo getErrorInfo()
TaskErrorInfo
that belongs to the error of the current Task
.Task getTask()
Task
belonging to the current workflow script context@NotNull WorkflowContext getWorkflowContext()
workflow context
Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210