E
- parent data objectF
- the transition choice for the lifecyclepublic class Simpletaskworkflow<E extends DataObject<E> & LifecycleInterface<E,F>,F extends TransitionFieldChoiceDefinition<F>> extends DataObjectProperty<E>
Modifier and Type | Field and Description |
---|---|
static java.text.SimpleDateFormat |
dateformat |
updatedfieldingui
field, parentpayload
Constructor and Description |
---|
Simpletaskworkflow(SimpletaskworkflowDefinition<E,F> definition,
DataObjectPayload parentpayload,
F lifecyclehelper)
creates the property simple task workflow for a data object
|
Modifier and Type | Method and Description |
---|---|
void |
accepttask(E object,
DataObjectId<Task> taskid,
DataObjectId<Appuser> userid)
accepts the task
|
boolean |
canaccepttask(E object,
DataObjectId<Task> taskid,
DataObjectId<Appuser> userid)
returns true if the user can accept the task (task in status Open)
|
boolean |
canrejecttask(E object,
DataObjectId<Task> taskid,
DataObjectId<Appuser> userid)
returns true if the user can reject the task (possible in any state that
allows going back to default choice)
|
static <E extends DataObject<E> & LifecycleInterface<E,F>,F extends TransitionFieldChoiceDefinition<F>> |
postprocLifecycleChangestate(E[] objectbatch,
ChoiceValue<F>[] newstate,
Simpletaskworkflow<E,F>[] simpletaskfworkflowbatch)
massive post-proccessing after changee state.
|
void |
postprocLifecycleChangestate(E object,
ChoiceValue<F> newstate)
post processing after change state.
|
void |
postprocStoredobjectInsert(E object)
performs post processing after the insertion of the object (creates a
workflow task)
|
static <E extends DataObject<E> & LifecycleInterface<E,F>,F extends TransitionFieldChoiceDefinition<F>> |
postprocStoredobjectInsert(E[] objectbatch,
Simpletaskworkflow<E,F>[] simpletaskworkflow)
performs post processing after massive insertion of the object (not optimized
for performance)
|
void |
processtask(E object,
DataObjectId<Task> taskid,
DataObjectId<Appuser> userid,
DataObjectId<Taskchoice> choiceid,
java.lang.String comment)
processes the task (completion by user)
|
void |
reassigntask(E object,
DataObjectId<Task> taskid,
DataObjectId<Appuser> user,
DataObjectId<Appuser> newuser,
java.lang.String taskcomment)
reassigns a task from a user to another one
|
void |
rejecttask(E object,
DataObjectId<Task> taskid,
DataObjectId<Appuser> userid)
rejects the task
|
void |
savetaskcomment(E object,
DataObjectId<Task> taskid,
DataObjectId<Appuser> userid,
java.lang.String comment)
saves task comment
|
void |
setDependentPropertyLifecycle(Lifecycle<E,F> lifecycle)
sets the dependent property lifecycle
|
generateSimpleDataEltFromObject, getDisplayDataElt, getDynamicDataElt, getFieldBufferForGUI
getAllTriggersForRefresh, getFieldFromName, getFieldNumber, getStoredField, getTriggersForThisUpdate, initFromDB, postTreatmentAfterInitFromDB
changeName, cleanName, equals, getName
public Simpletaskworkflow(SimpletaskworkflowDefinition<E,F> definition, DataObjectPayload parentpayload, F lifecyclehelper)
definition
- definition of the workflow objectparentpayload
- parent payload of the data objectlifecyclehelper
- lifecycle transition choicepublic void setDependentPropertyLifecycle(Lifecycle<E,F> lifecycle)
lifecycle
- dependent property lifecyclepublic void postprocStoredobjectInsert(E object)
object
- data objectpublic static <E extends DataObject<E> & LifecycleInterface<E,F>,F extends TransitionFieldChoiceDefinition<F>> void postprocStoredobjectInsert(E[] objectbatch, Simpletaskworkflow<E,F>[] simpletaskworkflow)
objectbatch
- a batch of data objectssimpletaskworkflow
- a batch of corresponding simple task workflow
propertiespublic void postprocLifecycleChangestate(E object, ChoiceValue<F> newstate)
object
- data objectnewstate
- new state for change statepublic static <E extends DataObject<E> & LifecycleInterface<E,F>,F extends TransitionFieldChoiceDefinition<F>> void postprocLifecycleChangestate(E[] objectbatch, ChoiceValue<F>[] newstate, Simpletaskworkflow<E,F>[] simpletaskfworkflowbatch)
objectbatch
- object batchnewstate
- new statesimpletaskfworkflowbatch
- simple task workflow batch corresponding to
the object batchpublic boolean canaccepttask(E object, DataObjectId<Task> taskid, DataObjectId<Appuser> userid)
object
- data objecttaskid
- id of the taskuserid
- id of the userpublic boolean canrejecttask(E object, DataObjectId<Task> taskid, DataObjectId<Appuser> userid)
object
- data objecttaskid
- id of the taskuserid
- id of the userpublic void savetaskcomment(E object, DataObjectId<Task> taskid, DataObjectId<Appuser> userid, java.lang.String comment)
object
- data objecttaskid
- id of the taskuserid
- id of the usercomment
- comment for the taskpublic void accepttask(E object, DataObjectId<Task> taskid, DataObjectId<Appuser> userid)
object
- data objecttaskid
- id of the taskuserid
- id of the user accepting the taskpublic void rejecttask(E object, DataObjectId<Task> taskid, DataObjectId<Appuser> userid)
object
- data objecttaskid
- id of the taskuserid
- id of the userpublic void processtask(E object, DataObjectId<Task> taskid, DataObjectId<Appuser> userid, DataObjectId<Taskchoice> choiceid, java.lang.String comment)
object
- data objecttaskid
- id of the taskuserid
- id of the userchoiceid
- id of the choice of outcome selected by the user (e.g.
request approved or request rejected)comment
- task commentpublic void reassigntask(E object, DataObjectId<Task> taskid, DataObjectId<Appuser> user, DataObjectId<Appuser> newuser, java.lang.String taskcomment)
object
- data objecttaskid
- id of the taskuser
- user who reassigned the tasknewuser
- new user the task is assigned totaskcomment
- comment of the task