Package de.xima.fc.entities
Class WorkflowProcess
- java.lang.Object
-
- de.xima.cmn.dao.model.AEntity<Long>
-
- de.xima.fc.entities.AbstractEntity
-
- de.xima.fc.entities.AbstractLockableEntity
-
- de.xima.fc.entities.WorkflowProcess
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>
,de.xima.cmn.dao.interfaces.ILockableEntity<Long>
,ILockingVersionProviding
,ITransferable
,ITransferableEntity
,ITransferableLockableEntity
,IUUIDEntity
,Serializable
,Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
@Entity public class WorkflowProcess extends AbstractLockableEntity implements IUUIDEntity
A workflow process that defines which actions are taken when certain events occur during the life cycle of a form record. A workflow process always belong to aWorkflowVersion
. Each project may have multiple versions of a workflow process, and one active version.A process consists of one or more workflow tasks, usually one task for each event (such as submitting the form, or changing the form record's state).
- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTR_TASKS
JPA attribute name for thegetTasks()
field.static String
ATTR_VERSION
JPA attribute name for thegetVersion()
field.static String
COL_VERSION
Database column name for thegetVersion()
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.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 WorkflowProcess()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTask(WorkflowTask task)
Adds the given task to this process and sets theWorkflowTask.getProcess()
to this process.WorkflowProcess
cloneBasics()
Long
getId()
List<WorkflowTask>
getTasks()
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.WorkflowVersion
getVersion()
void
setTasks(List<WorkflowTask> tasks)
void
setUUID(String uuid)
Sets the UUID (universal unique identifier) that uniquely identifies this type of entity.void
setUUIDObject(UUID uuid)
void
setVersion(WorkflowVersion version)
-
Methods inherited from class de.xima.fc.entities.AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersion, toString
-
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_TASKS
public static final String ATTR_TASKS
JPA attribute name for thegetTasks()
field.- See Also:
- Constant Field Values
-
ATTR_VERSION
public static final String ATTR_VERSION
JPA attribute name for thegetVersion()
field.- See Also:
- Constant Field Values
-
COL_VERSION
public static final String COL_VERSION
Database column name for thegetVersion()
field.- See Also:
- Constant Field Values
-
-
Method Detail
-
addTask
public void addTask(WorkflowTask task)
Adds the given task to this process and sets theWorkflowTask.getProcess()
to this process.- Parameters:
task
- The task to add.
-
getTasks
public List<WorkflowTask> getTasks()
- Returns:
- A list of tasks that indicate which actions are executed when certain events occur during the life cycle of a form record.
-
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 processes that
belong to the same
WorkflowVersion
.
-
getVersion
public WorkflowVersion getVersion()
- Returns:
- The version to which this workflow process belongs, see
WorkflowVersion.getMainProcess()
.
-
setTasks
public void setTasks(List<WorkflowTask> tasks)
- Parameters:
tasks
- A list of tasks that indicate which actions are executed when certain events occur during the life cycle of a form record.
-
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
.
-
setVersion
public void setVersion(WorkflowVersion version)
- Parameters:
version
- The version to which this workflow process belongs.
-
cloneBasics
public WorkflowProcess cloneBasics()
- Returns:
- A new process instance with all fields that do not reference other entities copied from this instance.
-
-