public class WorkflowCommons
extends java.lang.Object
Constructor and Description |
---|
WorkflowCommons() |
Modifier and Type | Method and Description |
---|---|
static void |
assignTaskToAuthority(Task task,
DataObjectId<Authority> authorityid,
DataObjectId<Appuser> usertoexclude,
java.lang.String emailtype,
java.lang.String emailname,
java.lang.String title,
java.lang.String body,
java.lang.String objectid,
java.lang.String objectlabel,
DataObjectId<Appuser> originator,
DataObject<?> object)
assigns a task to an authority
|
static void |
assignTaskToUser(Task task,
DataObjectId<Appuser> specificuser,
java.lang.String emailtype,
java.lang.String title,
java.lang.String body,
java.lang.String objectid,
java.lang.String objectlabel,
DataObjectId<Appuser> originator,
java.lang.String notificationname,
DataObject<?> object)
assigns tasks to a user
|
static java.lang.String |
generateObjectId(DataObject<?> object)
generates a readable object id (number) if possible
|
static java.lang.String |
generateObjectString(DataObject<?> object)
generates a string identifying the object.
|
static void |
sendNotification(java.lang.String title,
java.lang.String bodytext,
java.lang.String objectid,
java.lang.String objectlabel,
DataObjectId<Appuser> senderuserid,
java.util.ArrayList<DataObjectId<Appuser>> users,
java.lang.String emailtype,
java.lang.String notificationname,
java.lang.String modulename,
boolean action)
sends an e-mail notification for a workflow
|
public static void sendNotification(java.lang.String title, java.lang.String bodytext, java.lang.String objectid, java.lang.String objectlabel, DataObjectId<Appuser> senderuserid, java.util.ArrayList<DataObjectId<Appuser>> users, java.lang.String emailtype, java.lang.String notificationname, java.lang.String modulename, boolean action)
title
- title of the notificationbodytext
- body textobjectid
- id of the objectobjectlabel
- label of the objectsenderuserid
- id of the user who sent the mailusers
- users to the send e-mail toemailtype
- e-mail typenotificationname
- name of notificationmodulename
- name of moduleaction
- true if the e-mail if for actionpublic static void assignTaskToUser(Task task, DataObjectId<Appuser> specificuser, java.lang.String emailtype, java.lang.String title, java.lang.String body, java.lang.String objectid, java.lang.String objectlabel, DataObjectId<Appuser> originator, java.lang.String notificationname, DataObject<?> object)
task
- task to sendspecificuser
- user to send the task toemailtype
- type of e-mailtitle
- title of the e-mailbody
- body of the e-mailobjectid
- id of the objectobjectlabel
- label of the objectoriginator
- originator of the tasknotificationname
- name of the notificationobject
- data object subject of the workflowpublic static void assignTaskToAuthority(Task task, DataObjectId<Authority> authorityid, DataObjectId<Appuser> usertoexclude, java.lang.String emailtype, java.lang.String emailname, java.lang.String title, java.lang.String body, java.lang.String objectid, java.lang.String objectlabel, DataObjectId<Appuser> originator, DataObject<?> object)
task
- taskauthorityid
- id of the authorityusertoexclude
- user to exclude. Typically, this happens when an user
rejects a task, it is sent back to the group, with
exception of the user having just rejected the taskemailtype
- type of e-mail for notificationemailname
- name of the e-mailtitle
- title of the e-mailbody
- body of the e-mailobjectid
- id of the objectobjectlabel
- label of the objectoriginator
- originator for notification e-mailobject
- data object the workflow is working onpublic static java.lang.String generateObjectString(DataObject<?> object)
object
- the object to processpublic static java.lang.String generateObjectId(DataObject<?> object)
object
- data object