Class WorkflowTask

java.lang.Object
de.xima.cmn.dao.model.AEntity<Long>
All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>, de.xima.cmn.dao.interfaces.ILockableEntity<Long>, IDescriptionProviding, ILockingVersionProviding, INameProviding, ITransferable, ITransferableEntity, ITransferableLockableEntity, IUUIDEntity, IUuidProviding, Serializable, Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>

@Entity public class WorkflowTask extends AbstractLockableEntity implements IUUIDEntity, IUuidProviding, INameProviding, IDescriptionProviding
A single workflow task with a program represented by the getRootNode() that is executed when one of its getTrigger() fires.
Since:
7.0.0
Author:
XIMA MEDIA GmbH
See Also:
  • Field Details

  • Constructor Details

    • WorkflowTask

      public WorkflowTask()
  • Method Details

    • addNode

      public void addNode(WorkflowNode node)
      Adds the given node to the list of workflow nodes, and sets AWorkflowElement.getTask() to this task.
      Parameters:
      node - Node to add.
    • addNodes

      public void addNodes(List<WorkflowNode> nodes)
      Adds the given nodes to the list of workflow nodes, and sets AWorkflowElement.getTask() to this task.
      Parameters:
      nodes - Nodes to add.
    • cloneBasics

      public WorkflowTask cloneBasics()
      Returns:
      A new task instance with all fields that do not reference other entities copied from this instance.
    • getBeschreibung

      @Deprecated public String getBeschreibung()
      Deprecated.
      Specified by:
      getBeschreibung in interface IDescriptionProviding
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface IDescriptionProviding
      Returns:
      A human-readable description for this object.
    • getId

      public Long getId()
      Specified by:
      getId in interface de.xima.cmn.dao.interfaces.IEntity<Long>
    • getName

      public String getName()
      Specified by:
      getName in interface INameProviding
      Returns:
      The name of this object.
    • getNodes

      public List<WorkflowNode> getNodes()
      Returns:
      A list of all nodes contained in this workflow task, i.e. all nodes that can be reached, starting at the given getRootNode().
    • getProcess

      public WorkflowProcess getProcess()
      Returns:
      The process to which this tasks belong, see WorkflowProcess.getTasks().
    • getRootNode

      public WorkflowNode getRootNode()
      Returns:
      The root node where execution begins when any of the getTrigger() fires. In case this node is null, execution must behave the same way as if were an empty node.
    • getTrigger

      public WorkflowTrigger getTrigger()
      Returns:
      A list of triggers that may start this task. Once any of these triggers fires, the corresponding workflow logic defined by the getRootNode() of this task is executed.
    • getUuid

      public UUID getUuid()
      Specified by:
      getUuid in interface IUuidProviding
      Returns:
      The UUID that identifies this instance.
    • getUUID

      public String getUUID()
      Specified by:
      getUUID in interface IUUIDEntity
      Returns:
      UUID (Universal Unique Identifier) that identifies this type of entity. Usually is unique within a context, e.g. Mandant, Projekt, ...
    • getUUIDObject

      public UUID getUUIDObject()
      Specified by:
      getUUIDObject in interface IUUIDEntity
      Returns:
      A unique identifier of this workflow task. This ID must be unique at least among all other tasks that belong to the same WorkflowProcess.
    • replaceTrigger

      public void replaceTrigger(WorkflowTrigger trigger)
      Replaces the trigger of this task with the given trigger and sets AWorkflowElement.getTask() to this task.
      Parameters:
      trigger - The new trigger for this task.
    • setDescription

      public void setDescription(String description)
      Parameters:
      description - The user-defined description of this task, also shown in the UI.
    • setName

      public void setName(String name)
      Parameters:
      name - The user-defined name of this task, also shown in the UI.
    • setNodes

      public void setNodes(List<WorkflowNode> nodes)
      Parameters:
      nodes - A list of all nodes contained in this workflow task, i.e. all nodes that can be reached, starting at the given getRootNode().
    • setProcess

      public void setProcess(WorkflowProcess process)
      Parameters:
      process - The process to which this tasks belong, see WorkflowProcess.getTasks().
    • setRootNode

      public void setRootNode(WorkflowNode rootNode)
      Parameters:
      rootNode - The root node where execution begins when any of the getTrigger() fires. In case this node is null, execution must behave the same way as if were an empty node.
    • setTrigger

      public void setTrigger(WorkflowTrigger trigger)
      Parameters:
      trigger - The trigger that may start this task. Once this trigger fires, the corresponding workflow logic defined by the getRootNode() of this task is executed.
    • setUUID

      public void setUUID(String uuid)
      Specified by:
      setUUID in interface IUUIDEntity
    • setUUIDObject

      public void setUUIDObject(UUID uuid)
      Parameters:
      uuid - A unique identifier of this workflow task. This ID must be unique at least among all other tasks that belong to the same WorkflowProcess.
    • toString

      public String toString()
      Overrides:
      toString in class AbstractLockableEntity