Package de.xima.fc.entities
Class WorkflowTask
- java.lang.Object
-
- de.xima.cmn.dao.model.AEntity<Long>
-
- de.xima.fc.entities.AbstractEntity
-
- de.xima.fc.entities.AbstractLockableEntity
-
- de.xima.fc.entities.WorkflowTask
-
- 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 thegetRootNode()
that is executed when one of itsgetTrigger()
fires.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTR_NODES
JPA attribute name for thegetNodes()
field.static String
ATTR_PROCESS
JPA attribute name for thegetProcess()
field.static String
ATTR_ROOT_NODE
JPA attribute name for thegetRootNode()
field.static String
ATTR_TRIGGER
JPA attribute name for thegetTrigger()
field.static String
COL_DESCRIPTION
Database column name for thegetDescription()
field.static String
COL_NAME
Database column name for thegetName()
field.static String
COL_PROCESS
Database column name for thegetProcess()
field.static String
COL_PROCESS_ORDER_INDEX
The index at which this entity appear inWorkflowProcess.getTasks()
.static String
COL_ROOT_NODE
Database column name for thegetRootNode()
field.-
Fields inherited from class de.xima.fc.entities.AbstractLockableEntity
COL_LOCKINGVERSION, lockingVersion
-
Fields inherited from class de.xima.fc.entities.AbstractEntity
COL_ID, id
-
Fields inherited from interface de.xima.fc.entities.interfaces.IDescriptionProviding
ATTR_BESCHREIBUNG, ATTR_DESCRIPTION
-
Fields inherited from interface de.xima.fc.entities.interfaces.INameProviding
ATTR_NAME
-
Fields inherited from interface de.xima.fc.entities.interfaces.ITransferableEntity
IMPORT_ID, INVALID_ID
-
Fields inherited from interface de.xima.fc.entities.interfaces.IUUIDEntity
ATTR_UUID, COL_UUID, INVALID_UUID, INVALID_UUID_OBJECT, NULL_SAFE_UUID_TYPE, NULLABLE_UUID_TYPE, TYPE_NAME_UUID
-
-
Constructor Summary
Constructors Constructor Description WorkflowTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addNode(WorkflowNode node)
Adds the given node to the list of workflow nodes, and setsAWorkflowElement.getTask()
to this task.void
addNodes(List<WorkflowNode> nodes)
Adds the given nodes to the list of workflow nodes, and setsAWorkflowElement.getTask()
to this task.WorkflowTask
cloneBasics()
String
getBeschreibung()
Deprecated.String
getDescription()
Long
getId()
String
getName()
List<WorkflowNode>
getNodes()
WorkflowProcess
getProcess()
WorkflowNode
getRootNode()
WorkflowTrigger
getTrigger()
UUID
getUuid()
String
getUUID()
Gets the UUID (universal unique identifier) that uniquely identifies this type of entity.UUID
getUUIDObject()
Gets the UUID (universal unique identifier) that uniquely identifies this type of entity.void
replaceTrigger(WorkflowTrigger trigger)
Replaces the trigger of this task with the given trigger and setsAWorkflowElement.getTask()
to this task.void
setDescription(String description)
void
setName(String name)
void
setNodes(List<WorkflowNode> nodes)
void
setProcess(WorkflowProcess process)
void
setRootNode(WorkflowNode rootNode)
void
setTrigger(WorkflowTrigger trigger)
void
setUUID(String uuid)
Sets the UUID (universal unique identifier) that uniquely identifies this type of entity.void
setUUIDObject(UUID uuid)
String
toString()
-
Methods inherited from class de.xima.fc.entities.AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersion
-
Methods inherited from class de.xima.fc.entities.AbstractEntity
asIntValue, isPersisted, setId, setId
-
Methods inherited from class de.xima.cmn.dao.model.AEntity
compareTo, equals, getDBTableName, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Field Detail
-
ATTR_NODES
public static final String ATTR_NODES
JPA attribute name for thegetNodes()
field.- See Also:
- Constant Field Values
-
ATTR_PROCESS
public static final String ATTR_PROCESS
JPA attribute name for thegetProcess()
field.- See Also:
- Constant Field Values
-
ATTR_ROOT_NODE
public static final String ATTR_ROOT_NODE
JPA attribute name for thegetRootNode()
field.- See Also:
- Constant Field Values
-
ATTR_TRIGGER
public static final String ATTR_TRIGGER
JPA attribute name for thegetTrigger()
field.- See Also:
- Constant Field Values
-
COL_DESCRIPTION
public static final String COL_DESCRIPTION
Database column name for thegetDescription()
field.- See Also:
- Constant Field Values
-
COL_NAME
public static final String COL_NAME
Database column name for thegetName()
field.- See Also:
- Constant Field Values
-
COL_PROCESS
public static final String COL_PROCESS
Database column name for thegetProcess()
field.- See Also:
- Constant Field Values
-
COL_PROCESS_ORDER_INDEX
public static final String COL_PROCESS_ORDER_INDEX
The index at which this entity appear inWorkflowProcess.getTasks()
.- See Also:
- Constant Field Values
-
COL_ROOT_NODE
public static final String COL_ROOT_NODE
Database column name for thegetRootNode()
field.- See Also:
- Constant Field Values
-
-
Method Detail
-
addNode
public void addNode(WorkflowNode node)
Adds the given node to the list of workflow nodes, and setsAWorkflowElement.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 setsAWorkflowElement.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 interfaceIDescriptionProviding
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceIDescriptionProviding
- Returns:
- A human-readable description for this object.
-
getName
public String getName()
- Specified by:
getName
in interfaceINameProviding
- 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 isnull
, 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 interfaceIUuidProviding
- Returns:
- The UUID that identifies this instance.
-
getUUID
public String getUUID()
Description copied from interface:IUUIDEntity
Gets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for exampleclient scopes
orproject scope
.- Specified by:
getUUID
in interfaceIUUIDEntity
- Returns:
- The UUID of the entity.
-
getUUIDObject
public UUID getUUIDObject()
Description copied from interface:IUUIDEntity
Gets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for exampleclient scopes
orproject scope
.- Specified by:
getUUIDObject
in interfaceIUUIDEntity
- 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 setsAWorkflowElement.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 givengetRootNode()
.
-
setProcess
public void setProcess(WorkflowProcess process)
- Parameters:
process
- The process to which this tasks belong, seeWorkflowProcess.getTasks()
.
-
setRootNode
public void setRootNode(WorkflowNode rootNode)
- Parameters:
rootNode
- The root node where execution begins when any of thegetTrigger()
fires. In case this node isnull
, 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 thegetRootNode()
of this task is executed.
-
setUUID
public void setUUID(String uuid)
Description copied from interface:IUUIDEntity
Sets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for exampleclient scopes
orproject scope
.- Specified by:
setUUID
in interfaceIUUIDEntity
- Parameters:
uuid
- The UUID of the entity.
-
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 sameWorkflowProcess
.
-
toString
public String toString()
- Overrides:
toString
in classAbstractLockableEntity
-
-