Package com.mendix.workflows
Interface WorkflowActivity
public interface WorkflowActivity
Represents a workflow activity instance.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the caption of this workflow activity instance.getKey()
Returns the key that uniquely identifies the workflow activity instance.Returns the sub workflow for this workflow activity instance (if any).getType()
Returns the type of this workflow activity instance.Returns the user task instance of this workflow activity instance (if any).boolean
Notifies this workflow activity instance to continue to the next activity.
-
Method Details
-
getCaption
String getCaption()Returns the caption of this workflow activity instance.- Returns:
- the caption
-
getType
WorkflowActivityType getType()Returns the type of this workflow activity instance.- Returns:
- the type of activity
-
getUserTask
Returns the user task instance of this workflow activity instance (if any).- Returns:
- the user task instance of this activity instance, or
Optional.empty()
if it is not an active User Task activity
-
getSubWorkflow
Returns the sub workflow for this workflow activity instance (if any).- Returns:
- the sub-workflow, or
Optional.empty()
if this activity is not a Call Workflow activity
-
notifyActivity
boolean notifyActivity()Notifies this workflow activity instance to continue to the next activity.Note that this activity instance should be of type
WorkflowActivityType.WAIT_FOR_NOTIFICATION
.- Returns:
- true if the activity instance is successfully notified
false if the workflow isn't waiting on the activity being notified or if the workflow is in a state other thanWorkflowState.IN_PROGRESS
,WorkflowState.COMPLETED
andWorkflowState.ABORTED
states - Throws:
MendixRuntimeException
- if the workflow doesn't have the activity to be notified or if the workflow has stateWorkflowState.COMPLETED
orWorkflowState.ABORTED
-
getKey
String getKey()Returns the key that uniquely identifies the workflow activity instance. The value is the same asWorkflowActivityRecord.getActivityKey()
.The value cannot and should not be used for retrieving activities from the database.
- Returns:
- the activity key
-