E
- parent data objectF
- transition field choice definition of the lifecycle of the objectpublic abstract class ComplexWorkflowHelper<E extends DataObject<E> & LifecycleInterface<E,F>,F extends TransitionFieldChoiceDefinition<F>>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EMAIL_DAILY |
static java.lang.String |
EMAIL_DELAY15MIN |
static java.lang.String |
EMAIL_DELAY2H |
static java.lang.String |
EMAIL_NONE |
static java.lang.String |
EMAIL_NOW |
static java.lang.String |
EMAIL_WEEKLY |
static java.lang.String |
START_CODE |
Constructor and Description |
---|
ComplexWorkflowHelper(java.lang.String defaulttaskemailtype)
creates a complex workflow helper
|
Modifier and Type | Method and Description |
---|---|
protected void |
addnextstepaftertask(java.lang.String taskcode,
java.lang.String choicecode,
ComplexWorkflowStep<E,F> step)
specifies what is the next step after a task
|
protected void |
addtaskstep(java.lang.String taskcode,
WorkflowTaskStep<E,F> taskstep)
adds a task step
|
void |
executenext(E object,
DataObjectId<Workflow> workflowid,
java.lang.String currenttaskcode,
java.lang.String choice)
executes the next step
|
java.lang.String |
getDefaultTaskEmailType() |
abstract void |
initializetaskandsteps()
initializes task and steps
|
abstract boolean |
isStartAtChangeState(ChoiceValue<F> newstate)
checks if the workflow will start at change state for the specified new state
|
abstract boolean |
isStartAtInsert() |
void |
reassigntask(E object,
DataObjectId<Workflow> workflowid,
DataObjectId<Appuser> newuser,
java.lang.String code,
java.lang.String reassigncomment)
reassigns the task
|
void |
regenerateTaskUserAfterReject(E object,
DataObjectId<Workflow> workflowid,
Task task,
DataObjectId<Appuser> useridtoexclude)
recreates the task after rejection by one of hte user
|
public static final java.lang.String EMAIL_NONE
public static final java.lang.String EMAIL_NOW
public static final java.lang.String EMAIL_DELAY15MIN
public static final java.lang.String EMAIL_DELAY2H
public static final java.lang.String EMAIL_DAILY
public static final java.lang.String EMAIL_WEEKLY
public static final java.lang.String START_CODE
public ComplexWorkflowHelper(java.lang.String defaulttaskemailtype)
defaulttaskemailtype
- default task e-mail notificationpublic java.lang.String getDefaultTaskEmailType()
public abstract boolean isStartAtInsert()
public abstract boolean isStartAtChangeState(ChoiceValue<F> newstate)
newstate
- new statepublic abstract void initializetaskandsteps()
protected void addtaskstep(java.lang.String taskcode, WorkflowTaskStep<E,F> taskstep)
taskcode
- code of the tasktaskstep
- step of the taskprotected void addnextstepaftertask(java.lang.String taskcode, java.lang.String choicecode, ComplexWorkflowStep<E,F> step)
taskcode
- code of the previous taskchoicecode
- choice if there is a conditionstep
- step after the taskpublic void executenext(E object, DataObjectId<Workflow> workflowid, java.lang.String currenttaskcode, java.lang.String choice)
object
- subject data objectworkflowid
- id of the workflowcurrenttaskcode
- current task codechoice
- outcome of the task (choice of the user)public void regenerateTaskUserAfterReject(E object, DataObjectId<Workflow> workflowid, Task task, DataObjectId<Appuser> useridtoexclude)
object
- subject data objectworkflowid
- id of the workflowtask
- current taskuseridtoexclude
- user id to exclude (because he rejected the task)public void reassigntask(E object, DataObjectId<Workflow> workflowid, DataObjectId<Appuser> newuser, java.lang.String code, java.lang.String reassigncomment)
object
- subject data objectworkflowid
- if of the workflownewuser
- new usercode
- code of the task (current choice)reassigncomment
- reassign comment of the original assignee