Interface Workflows


public interface Workflows
Provides an interface to the workflow component of the runtime server.
  • Method Details

    • getDefinition

      WorkflowDefinition getDefinition(String workflowName)
      Returns a workflow definition for the specified name. No check is performed whether the name actually exists in the application.
      Parameters:
      workflowName - the name of the workflow
      Returns:
      the workflow definition
      Throws:
      MendixRuntimeException - when no workflow definition exists for the specified name
    • instantiate

      Workflow instantiate(IContext context, String workflowName, IMendixObject workflowContext)
      Instantiates a new workflow and returns the object representing it.
      Parameters:
      context - the context in which to create the workflow
      workflowName - the name of the workflow
      workflowContext - the context parameter object to associate with the workflow
      Returns:
      the instantiated workflow
    • getWorkflow

      Workflow getWorkflow(IContext context, IMendixObject workflow)
      Retrieves the workflow object for the specified Mendix object.
      Parameters:
      context - the context in which to retrieve the workflow
      workflow - the Mendix object for the workflow instance
      Returns:
      the workflow object
    • getWorkflows

      Collection<? extends Workflow> getWorkflows(IContext context, IMendixObject workflowContext)
      Retrieves the workflow objects that are associated with the specified context object.
      Parameters:
      context - the context in which to retrieve the workflows
      workflowContext - the context parameter object the workflows should be associated with
      Returns:
      the list of workflows
    • lockWorkflowDefinition

      void lockWorkflowDefinition(IContext context, String workflowName, boolean pauseAllWorkflows)
      Locks the workflow definition for the specified workflow name.
      Parameters:
      context - the context in which to lock the definition
      workflowName - the name of the workflow
      pauseAllWorkflows - indicates whether to pause all workflow instances with the same definition
      Throws:
      UserException - if the workflow definition has already been locked
    • unlockWorkflowDefinition

      void unlockWorkflowDefinition(IContext context, String workflowName, boolean resumeAllPausedWorkflows)
      Unlocks the workflow definition for the specified workflow name.
      Parameters:
      context - the context in which to unlock the definition
      workflowName - the name of the workflow
      resumeAllPausedWorkflows - indicates whether to resume all paused workflow instances with the same definition
      Throws:
      UserException - if the workflow definition is not locked
    • getUserTask

      UserTask getUserTask(IContext context, IMendixObject userTask)
      Retrieves the user task object for the specified Mendix object.
      Parameters:
      context - the context in which to retrieve the user task
      userTask - the Mendix object for the user task instance
      Returns:
      the user task object