Interface WorkflowActivityRecord


public interface WorkflowActivityRecord
Represents a snapshot of a workflow activity.
  • Method Details

    • getModelGUID

      UUID getModelGUID()
      Returns the identifier in the model that uniquely identifies the workflow activity definition. This identifier is stable across all instances of the same activity. If the activity is a user task, then the identifier is the same as the ModelGUID attribute of the System.WorkflowUserTaskDefinition entity. For other activities there is no corresponding attribute. Note that it does not relate to the ModelGUID attributes of the System.WorkflowDefinition entity in any way.
      Returns:
      the workflow activity GUID in the model
    • getActivityKey

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

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

      Returns:
      the workflow activity key
    • getPreviousActivityKey

      Optional<String> getPreviousActivityKey()
      Returns the key that uniquely identifies the previous activity instance (if any).
      Returns:
      the key of the previous activity instance, or Optional.empty() if the activity instance is a Start activity
    • getType

      Returns the workflow activity type of the workflow activity instance.
      Returns:
      the type WorkflowActivityType
    • getCaption

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

      Returns the execution status of the workflow activity instance.
      Returns:
      the status WorkflowActivityExecutionState
    • getStartTime

      Date getStartTime()
      Returns the start time of the workflow activity instance.
      Returns:
      the start time
    • getEndTime

      Optional<Date> getEndTime()
      Returns the end time of the workflow activity instance (if any).
      Returns:
      the end time, or Optional.empty() if not finished
    • getOutcome

      Optional<String> getOutcome()
      Returns the outcome value of the workflow activity instance (if any).
      Returns:
      the selected outcome, or Optional.empty() if the activity instance is not completed
    • getMicroflowName

      Optional<String> getMicroflowName()
      Returns the microflow name for the workflow activity instance (if any).
      Returns:
      the microflow name, or Optional.empty() if the activity instance is not a Call Microflow activity}
    • getTaskName

      Optional<String> getTaskName()
      Returns the task name for the workflow activity instance (if any).
      Returns:
      the task name, or Optional.empty() if the activity instance is not an active User Task activity
    • getTaskDescription

      Optional<String> getTaskDescription()
      Returns the task description for the workflow activity instance (if any).
      Returns:
      the task description, or Optional.empty() if the activity instance is not an active User Task activity
    • getTaskDueDate

      Optional<Date> getTaskDueDate()
      Returns the time when the workflow activity instance is due (if any).
      Returns:
      the due date, or Optional.empty() if the activity instance is not an active User Task activity or has no due date
    • getReason

      Optional<String> getReason()
      Returns the reason why the workflow activity instance failed or was aborted (if any).
      Returns:
      the reason, or Optional.empty() if not reason is set
    • getTaskCompletionType

      Optional<UserTaskCompletionType> getTaskCompletionType()
      Returns the user task completion type of the workflow activity instance (if any).
      Returns:
      the task completion type, or Optional.empty() if the activity instance is not an active User Task activity
    • getTaskRequiredUsers

      Optional<Integer> getTaskRequiredUsers()
      Returns the required number of targeted users that need to contribute to the user task (if any).
      Returns:
      the task completion type, or Optional.empty() if the activity instance is not an active User Task activity
    • getTaskKey

      Optional<String> getTaskKey()
      Returns the key that uniquely identifies the (user) task for this activity instance (if any). The value is the same as UserTask.getKey().

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

      Returns:
      the user task key
    • getActor

      Optional<? extends IUser> getActor()
      Returns the user that performed the action to the workflow activity instance (if any), such as completing it.
      Returns:
      the user object that performed the action, or Optional.empty() is no user actions has been taken
    • getSubWorkflow

      Optional<? extends WorkflowRecord> getSubWorkflow()
      Returns the record of a sub-workflow for the workflow activity instance (if any).
      Returns:
      the sub-workflow record, or Optional.empty() if the activity instance is not a Call Workflow activity
    • getUserTask

      Optional<? extends UserTask> getUserTask()
      Returns the user task instance of the workflow activity instance (if any).
      Returns:
      the corresponding user task instance, or Optional.empty() if the activity instance is not an active User Task activity
    • getUserTaskDefinition

      Optional<? extends IMendixObject> getUserTaskDefinition()
      Returns the user task definition of the workflow activity instance (if any).
      Returns:
      the user task definition, or Optional.empty() if the activity instance is not an active User Task activity