Interface WorkflowActivity


public interface WorkflowActivity
Represents a workflow activity instance.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    Returns the caption of this workflow activity instance.
    Returns the key that uniquely identifies the workflow activity instance.
    Optional<? extends Workflow>
    Returns the sub workflow for this workflow activity instance (if any).
    Returns the type of this workflow activity instance.
    Optional<? extends UserTask>
    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 Link icon

    • getCaption Link icon

      String getCaption()
      Returns the caption of this workflow activity instance.
      Returns:
      the caption
    • getType Link icon

      Returns the type of this workflow activity instance.
      Returns:
      the type of activity
    • getUserTask Link icon

      Optional<? extends UserTask> 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 Link icon

      Optional<? extends Workflow> 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 Link icon

      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 than WorkflowState.IN_PROGRESS, WorkflowState.COMPLETED and WorkflowState.ABORTED states
      Throws:
      MendixRuntimeException - if the workflow doesn't have the activity to be notified or if the workflow has state WorkflowState.COMPLETED or WorkflowState.ABORTED
    • getKey Link icon

      String getKey()
      Returns the key that uniquely identifies the workflow activity instance. The value is the same as WorkflowActivityRecord.getActivityKey().

      The value cannot and should not be used for retrieving activities from the database.

      Returns:
      the activity key