Interface WorkflowScriptContext

All Superinterfaces:
BaseContext, ClientScriptContext, GuiScriptContext, ProjectScriptContext, ScriptContext, SpecialistsBroker

public interface WorkflowScriptContext extends GuiScriptContext
Definition of a context container for workflow scripts.
Since:
3.0.1
  • Field Details

    • MANUAL

      static final int MANUAL
      Task state definition for manual transitions.
      Since:
      3.0.1
      See Also:
    • AUTOMATIC

      static final int AUTOMATIC
      Task state definition for automatic transition.
      Since:
      3.0.1
      See Also:
  • Method Details

    • getStoreElement

      @Deprecated(forRemoval=true) StoreElement getStoreElement()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getStoreElement in interface ClientScriptContext
      Returns:
      an instance of Workflowable
      Since:
      3.0.46
    • showActionDialog

      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.
      All values are updated automatically. There is no need to call doTransition(Transition) afterwards. You can read and manipulate the selected values by using the getTransitionParameters() method.
      Returns:
      The selected transition or null
      Since:
      3.0.1
    • doTransition

      void doTransition(String transitionName) throws IllegalAccessException
      Starts the transition with the reference name given by the string parameter
      Parameters:
      transitionName - The reference name of the Transition
      Throws:
      IllegalAccessException
      Since:
      3.0.1
    • doTransition

      void doTransition(Transition transition) throws IllegalAccessException
      Starts the transition given by the transition parameter
      Parameters:
      transition - the Transition that should be started
      Throws:
      IllegalAccessException
      Since:
      3.0.1
    • getData

      @Deprecated Data getData()
      Deprecated.
      since 5.2.19, use getFormData()
      Since:
      3.0.1
    • getFormData

      @Nullable @Nullable FormData getFormData()
      Provides the form data defined within the current Task.
      Returns:
      The defined form data or null.
      Since:
      5.2.19
    • getTransitions

      @NotNull @NotNull Transition[] getTransitions()
      Returns all Transitions allowed for the current user, which points FROM the underlying activity.
      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 current Task
      Returns:
      The TaskState.Mode of the current Task
      Since:
      4.0.120
    • sendEMail

      void sendEMail(String receivers, String subject, String message)
      Sends an email to the defined receivers
      Parameters:
      receivers - The email address of the recipients. Can be a comma separated list of email addresses
      subject - The subject of the email
      message - The message body for the email
      Since:
      3.0.1
    • getSession

      Map<Object,Object> 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 a Workflowable for the current Object
      Returns:
      The Workflowable belonging to this workflow script context
      Since:
      3.0.46
    • getTransition

      @Nullable @Nullable Transition getTransition()
      Return result transition of the script execution. Return null if no transition was made.
      Since:
      4.1.1
    • getTransitionParameters

      TransitionParameters getTransitionParameters()
      Return the TransitionParameters for the script execution
      Returns:
      The TransitionParameters belonging to the current Transition
      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 be null
      throwable - A Throwable belonging to the error. Can be null
      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 TaskErrorInfo that belongs to the error of the current Task.
      Since:
      4.1.10
    • getTask

      Task getTask()
      Return the task object.
      Returns:
      The Task belonging to the current workflow script context
      Since:
      4.1.10
    • getWorkflowContext

      @NotNull @NotNull WorkflowContext getWorkflowContext()
      Return the current workflow context.
      Returns:
      The current workflow context
      Since:
      4.2.451