Package com.collibra.dgc.core.api.model.workflow

# Interface WorkflowInstance

All Superinterfaces:
  `Entity`, `Resource`, `Serializable`

public interface WorkflowInstance extends Resource
Represents an instance of a workflow

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ResourceReference`
  `getBusinessItem()`
  (Optional) Returns the optional business item related to the process instance.
  `UUID`
  `getCreatedAssetId()`
  If the process instance ended, created a term and it is configured for it, this property will retrieve the id of the created term.
  `String`
  `getErrorMessage()`
  Returns the optional error message of any error in a async continuation of this process instance.
  `String`
  `getParentWorkflowInstanceId()`
  Returns workflow instance Id of the parent workflow instance.
  `long`
  `getStartDate()`
  Returns the start date of this process instance.
  `Set<WorkflowInstance>`
  `getSubInstances()`
  Returns the sub process instances of this instance.
  `long`
  `getSubProcessInstancesCount()`
  Returns the count of sub process instances of this instance.
  `List<WorkflowTask>`
  `getTasks()`
  Returns workflow tasks in this process instance.
  `WorkflowDefinitionReference`
  `getWorkflowDefinition()`
  Returns the workflow definition of this instance.
  `boolean`
  `isEnded()`
  Returns if this process instance is already ended.
  `boolean`
  `isInError()`
  Returns if this process instance is in error.

  ### Methods inherited from interface Entity

  `getId, setId`

  ### Methods inherited from interface Resource

  `getCreatedBy, getCreatedOn, getLastModifiedBy, getLastModifiedOn, getResourceType, isSystem`

- ## Method Details

  - ### getWorkflowDefinition

    WorkflowDefinitionReference getWorkflowDefinition()
    Returns the workflow definition of this instance.
    Returns:
      the workflow definition of this instance

  - ### getSubInstances

    Set<WorkflowInstance> getSubInstances()
    Returns the sub process instances of this instance.
    Returns:
      the sub process instances of this instance

  - ### getSubProcessInstancesCount

    long getSubProcessInstancesCount()
    Returns the count of sub process instances of this instance.
    Returns:
      the count of sub process instances of this instance

  - ### getParentWorkflowInstanceId

    String getParentWorkflowInstanceId()
    Returns workflow instance Id of the parent workflow instance. In the case when there is no parent workflow instance, `null` is returned.
    Returns:
      parent workflow instance Id.

  - ### getBusinessItem

    ResourceReference getBusinessItem()
    (Optional) Returns the optional business item related to the process instance.
    Returns:
      the optional business item related to the process instance

  - ### getTasks

    List<WorkflowTask> getTasks()
    Returns workflow tasks in this process instance.
    Returns:
      workflow tasks in this process instance

  - ### getStartDate

    long getStartDate()
    Returns the start date of this process instance.
    Returns:
      the start date in milliseconds

  - ### isEnded

    boolean isEnded()
    Returns if this process instance is already ended.
    Returns:
      `true` if the process instance is ended, `false` otherwise

  - ### getCreatedAssetId

    UUID getCreatedAssetId()
    If the process instance ended, created a term and it is configured for it, this property will retrieve the id of the created term.
    Returns:
      the optional UUID of the created asset

  - ### isInError

    boolean isInError()
    Returns if this process instance is in error. This means that there was a problem with a async continuation of the process instance.
    Returns:
      `true` if the process instance is in error, `false` otherwise

  - ### getErrorMessage

    String getErrorMessage()
    Returns the optional error message of any error in a async continuation of this process instance. Only present if inError is true.
    Returns:
      the optional error message