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

# Interface WorkflowDefinitionApi

public interface WorkflowDefinitionApi
All the API for handling workflow definitions.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AssetAssignmentRule`
  `addAssetTypeAssignmentRule(AddAssetTypeAssignmentRuleRequest addAssetTypeAssignmentRuleRequest)`
  Adds an asset type assignment rule to the workflow definition specified in the request.
  `DomainAssignmentRule`
  `addDomainTypeAssignmentRule(AddDomainTypeAssignmentRuleRequest addDomainTypeAssignmentRuleRequest)`
  Adds a domain type assignment rule to the workflow definition specified in the request.
  `AssetAssignmentRule`
  `changeAssetTypeAssignmentRule(ChangeAssetTypeAssignmentRuleRequest changeAssetTypeAssignmentRuleRequest)`
  Changes asset type assignment rule with the information that is present in the request.
  `DomainAssignmentRule`
  `changeDomainTypeAssignmentRule(ChangeDomainTypeAssignmentRuleRequest changeDomainTypeAssignmentRuleRequest)`
  Changes domain type assignment rule with the information that is present in the request.
  `WorkflowDefinition`
  `changeWorkflowDefinition(ChangeWorkflowDefinitionRequest changeWorkflowDefinitionRequest)`
  Changes the workflow definition with the information that is present in the request.
  `WorkflowDefinition`
  `deployWorkflowDefinition(DeployWorkflowDefinitionRequest deployWorkflowDefinitionRequest)`
  Deploys workflow definition using the specified request.
  `Job`
  `deployWorkflowDefinitionInJob(DeployWorkflowDefinitionRequest deployWorkflowDefinitionRequest)`
  Deploys workflow definition in a job using the specified request.
  `boolean`
  `exists(UUID workflowId)`
  Returns true if a workflow definition with given UUID exists.
  `PagedResponse<WorkflowDefinition>`
  `findWorkflowDefinitions(FindWorkflowDefinitionsRequest findWorkflowDefinitionsRequest)`
  Finds the workflows matching the criteria described in the request object.
  `List<NamedDescribedWorkflowStartEventType>`
  `getPossibleWorkflowStartEventTypes()`
  Returns all possible `WorkflowStartEventType`s with name and description.
  `WorkflowDefinition`
  `getWorkflowDefinition(UUID workflowDefinitionId)`
  Returns the workflow definition identified by given UUID.
  `WorkflowDefinition`
  `getWorkflowDefinitionByProcessId(String processId)`
  Returns the workflow definition identified by given process id.
  `InputStream`
  `getWorkflowDefinitionDiagram(UUID workflowDefinitionId)`
  Returns the workflow definition identified by the given UUID, described as diagram file.
  `InputStream`
  `getWorkflowDefinitionXML(UUID workflowDefinitionId)`
  Returns the workflow definition identified by the given UUID, described as XML file.
  `void`
  `removeAssignmentRule(UUID workflowDefinitionId, UUID ruleId)`
  Removes an assigment rule identified by the given UUID of the assignment rule and the UUID of the workflow definition.
  `void`
  `removeWorkflowDefinition(UUID workflowDefinitionId)`
  Removes the workflow identified by given UUID.
  `Job`
  `removeWorkflowDefinitionsInJob(List<UUID> workflowDefinitionIds)`
  Removes multiple workflow definitions asynchronously.

- ## Method Details

  - ### deployWorkflowDefinition

    WorkflowDefinition deployWorkflowDefinition(DeployWorkflowDefinitionRequest deployWorkflowDefinitionRequest)
    Deploys workflow definition using the specified request.
    Parameters:
      `deployWorkflowDefinitionRequest` - the request describing the properties of the workflow definition
    Returns:
      the deployed workflow definition

  - ### deployWorkflowDefinitionInJob

    Job deployWorkflowDefinitionInJob(DeployWorkflowDefinitionRequest deployWorkflowDefinitionRequest)
    Deploys workflow definition in a job using the specified request.
    Parameters:
      `deployWorkflowDefinitionRequest` - the request describing the properties of the workflow definition
    Returns:
      the job that deploys the workflows asynchronously

  - ### addAssetTypeAssignmentRule

    AssetAssignmentRule addAssetTypeAssignmentRule(AddAssetTypeAssignmentRuleRequest addAssetTypeAssignmentRuleRequest)
    Adds an asset type assignment rule to the workflow definition specified in the request.
    Parameters:
      `addAssetTypeAssignmentRuleRequest` - the request describing assignment rule to be added
    Returns:
      the added assignment rule
    Throws:
      `ApiEntityNotFoundException` - if workflow definition does not exist

  - ### addDomainTypeAssignmentRule

    DomainAssignmentRule addDomainTypeAssignmentRule(AddDomainTypeAssignmentRuleRequest addDomainTypeAssignmentRuleRequest)
    Adds a domain type assignment rule to the workflow definition specified in the request.
    Parameters:
      `addDomainTypeAssignmentRuleRequest` - the request describing assignment rule to be added
    Returns:
      the added assignment rule
    Throws:
      `ApiEntityNotFoundException` - if workflow definition does not exist

  - ### changeWorkflowDefinition

    WorkflowDefinition changeWorkflowDefinition(ChangeWorkflowDefinitionRequest changeWorkflowDefinitionRequest)
    Changes the workflow definition with the information that is present in the request.
    Parameters:
      `changeWorkflowDefinitionRequest` - changes that are to be performed on the workflow definition
    Returns:
      the changed workflow definition
    Throws:
      `ApiEntityNotFoundException` - if workflow definition does not exist

  - ### changeAssetTypeAssignmentRule

    AssetAssignmentRule changeAssetTypeAssignmentRule(ChangeAssetTypeAssignmentRuleRequest changeAssetTypeAssignmentRuleRequest)
    Changes asset type assignment rule with the information that is present in the request.
    Parameters:
      `changeAssetTypeAssignmentRuleRequest` - changes that are to be performed on the asset type assignment rule
    Returns:
      the changed asset type assignment rule
    Throws:
      `ApiEntityNotFoundException` - if workflow definition does not exist

  - ### changeDomainTypeAssignmentRule

    DomainAssignmentRule changeDomainTypeAssignmentRule(ChangeDomainTypeAssignmentRuleRequest changeDomainTypeAssignmentRuleRequest)
    Changes domain type assignment rule with the information that is present in the request.
    Parameters:
      `changeDomainTypeAssignmentRuleRequest` - changes that are to be performed on the domain type assignment rule
    Returns:
      the changed domain type assignment rule
    Throws:
      `ApiEntityNotFoundException` - if workflow definition does not exist

  - ### getWorkflowDefinition

    WorkflowDefinition getWorkflowDefinition(UUID workflowDefinitionId)
    Returns the workflow definition identified by given UUID.
    Parameters:
      `workflowDefinitionId` - the UUID of the workflow definition
    Returns:
      the workflow definition
    Throws:
      `ApiEntityNotFoundException` - if an entity could not be found

  - ### getWorkflowDefinitionByProcessId

    WorkflowDefinition getWorkflowDefinitionByProcessId(String processId)
    Returns the workflow definition identified by given process id.
    Parameters:
      `processId` - the process id of the workflow definition
    Returns:
      the workflow
    Throws:
      `ApiEntityNotFoundException` - if an entity could not be found

  - ### exists

    boolean exists(UUID workflowId)
    Returns true if a workflow definition with given UUID exists.
    Parameters:
      `workflowId` - the UUID of the workflow definition
    Returns:
      true if a workflow with given UUID exists, `false` otherwise

  - ### getWorkflowDefinitionXML

    InputStream getWorkflowDefinitionXML(UUID workflowDefinitionId)
    Returns the workflow definition identified by the given UUID, described as XML file.
    Parameters:
      `workflowDefinitionId` - the UUID of the workflow definition
    Returns:
      the XML file containing the workflow definition
    Throws:
      `ApiEntityNotFoundException` - if workflow definition does not exist

  - ### getWorkflowDefinitionDiagram

    InputStream getWorkflowDefinitionDiagram(UUID workflowDefinitionId)
    Returns the workflow definition identified by the given UUID, described as diagram file.
    Parameters:
      `workflowDefinitionId` - the UUID of the workflow definition
    Returns:
      the image (diagram) file containing the workflow definition
    Throws:
      `ApiEntityNotFoundException` - if workflow definition does not exist

  - ### findWorkflowDefinitions

    @SecurityAuditMethod(resultFormatter=com.collibra.dgc.core.api.internal.security.audit.formatter.PagedResponseFormatter.class) PagedResponse<WorkflowDefinition> findWorkflowDefinitions(FindWorkflowDefinitionsRequest findWorkflowDefinitionsRequest)
    Finds the workflows matching the criteria described in the request object.
    Parameters:
      `findWorkflowDefinitionsRequest` - the request
    Returns:
      a List of Workflows

  - ### removeWorkflowDefinition

    void removeWorkflowDefinition(UUID workflowDefinitionId)
    Removes the workflow identified by given UUID.
    Parameters:
      `workflowDefinitionId` - the UUID of the workflow definition
    Throws:
      `ApiEntityNotFoundException` - if workflow definition does not exist

  - ### removeWorkflowDefinitionsInJob

    Job removeWorkflowDefinitionsInJob(List<UUID> workflowDefinitionIds)
    Removes multiple workflow definitions asynchronously.
    Parameters:
      `workflowDefinitionIds` - the list of UUIDs of the workflow definitions to remove
    Returns:
      the job responsible for removal of workflow definitions

  - ### removeAssignmentRule

    void removeAssignmentRule(UUID workflowDefinitionId, UUID ruleId)
    Removes an assigment rule identified by the given UUID of the assignment rule and the UUID of the workflow definition.
    Parameters:
      `workflowDefinitionId` - the UUID of the workflow definition
      `ruleId` - the UUID of the assignment rule
    Throws:
      `ApiEntityNotFoundException` - if workflow definition or rule do not exist

  - ### getPossibleWorkflowStartEventTypes

    @SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionFormatter.class) List<NamedDescribedWorkflowStartEventType> getPossibleWorkflowStartEventTypes()
    Returns all possible `WorkflowStartEventType`s with name and description.
    Returns:
      all possible `WorkflowStartEventType`s