Interface WorkflowActivity


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

    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

    • getCaption

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

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

      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

      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

      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

      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