Package com.mendix.workflows
Interface Workflow
- 
 public interface WorkflowProvides an interface for managing workflows.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidabort(java.lang.String reason)Aborts the workflow with a given reason.booleancanContinue()Returns whether the workflow can be continued or not.booleancanRestart()Returns whether the workflow is restartable or not.java.util.Collection<? extends WorkflowActivity>getCurrentActivities()Returns the list of current activities.JumpToOptionsgetJumpToOptions()Generates the list of possible workflow activities the workflow can jump to.IMendixObjectgetMendixObject()Gets the workflow mendix object.IMendixObjectgetWorkflowContext()Gets the workflow parameter context object.voidlockDefinition(boolean pauseAllWorkflows)Locks the definition of the workflow.voidmarkAsResolved()Continues the incompatible workflow.
 Note that the workflow must be Incompatible and thatcanContinue()must return true.voidopenPage()Opens the Workflow Admin Page.voidpause()Pauses the workflow.voidrestart()Restarts the workflow.
 Note thatcanRestart()must return true for the workflow to be restartable.voidretry()Retries the failed workflow.
 Note that the workflow has to be failed for retry to be applicable.voidsetWorkflowContext(IMendixObject contextObject)Sets the workflow parameter context object.WorkflowStatestate()Returns the state of workflow.voidunlockDefinition(boolean resumeAllPausedWorkflows)Unlocks the definition of the workflow.voidunpause()Unpauses the paused workflow.
 
- 
- 
- 
Method Detail- 
getMendixObjectIMendixObject getMendixObject() Gets the workflow mendix object.- Returns:
- the workflow mendix object
 
 - 
getWorkflowContextIMendixObject getWorkflowContext() Gets the workflow parameter context object.- Returns:
- the workflow parameter context object
 
 - 
setWorkflowContextvoid setWorkflowContext(IMendixObject contextObject) Sets the workflow parameter context object.- Parameters:
- contextObject- workflow parameter context object
 
 - 
pausevoid pause() Pauses the workflow.
 - 
unpausevoid unpause() Unpauses the paused workflow.
 - 
restartvoid restart() Restarts the workflow.
 Note thatcanRestart()must return true for the workflow to be restartable.
 - 
retryvoid retry() Retries the failed workflow.
 Note that the workflow has to be failed for retry to be applicable.
 - 
abortvoid abort(java.lang.String reason) Aborts the workflow with a given reason.- Parameters:
- reason- abort reason to be record
 
 - 
markAsResolvedvoid markAsResolved() Continues the incompatible workflow.
 Note that the workflow must be Incompatible and thatcanContinue()must return true.
 - 
openPagevoid openPage() Opens the Workflow Admin Page.
 - 
lockDefinitionvoid lockDefinition(boolean pauseAllWorkflows) Locks the definition of the workflow.- Parameters:
- pauseAllWorkflows- parameter for pausing the workflow instances of the definition
- Throws:
- UserException- if the workflow definition has been already locked
 
 - 
unlockDefinitionvoid unlockDefinition(boolean resumeAllPausedWorkflows) Unlocks the definition of the workflow.- Parameters:
- resumeAllPausedWorkflows- parameter for resuming the workflow instances of the definition
- Throws:
- UserException- if the workflow definition is not locked
 
 - 
canRestartboolean canRestart() Returns whether the workflow is restartable or not.- Returns:
- true if the workflow is restartable, otherwise return false
 
 - 
canContinueboolean canContinue() Returns whether the workflow can be continued or not.- Returns:
- true if the workflow can be continued, otherwise return false
 
 - 
stateWorkflowState state() Returns the state of workflow.- Returns:
- the state WorkflowState
 
 - 
getCurrentActivitiesjava.util.Collection<? extends WorkflowActivity> getCurrentActivities() Returns the list of current activities.- Returns:
- the list of current activities
 
 - 
getJumpToOptionsJumpToOptions getJumpToOptions() Generates the list of possible workflow activities the workflow can jump to. Sample usage as follows:Workflow workflow = Core.workflows().getWorkflow(context, workflowObject); JumpToOptions jumpToOptions = workflow.getJumpToOptions(); JumpableWorkflowActivity sourceActivity = jumpToOptions.getCurrentActivities() .stream() .filter(a -> a.getDetails().getCaption() == "MyUserTask1") .findFirst() .get(); WorkflowActivityDetails targetActivity = sourceActivity.getApplicableTargets() .stream() .filter(a -> a.getCaption() == "MyUserTask2") .findFirst() .get(); Workflow updatedWorkflow = jumpToOptions.prepareJumpTo() .jumpActivityTo(sourceActivity, targetActivity) .applyJumpTo();- Returns:
- the interface for jump-to operations
 
 
- 
 
-