public interface UserTaskCreationContext extends ProcessExecutionContext, DataContext
work items creation
.ProcessExecutionContext.WorkflowPermission
Modifier and Type | Method and Description |
---|---|
UserTask.WorkItem |
createWorkItem(CreationWorkItemSpec aCreationWorkItemSpec)
This method creates a work item.
|
String |
getAllocatedToNotificationMail()
Returns the foreign key defined in the User Task configuration for the mail notification on allocation.
|
String |
getOfferedToNotificationMail()
Returns the foreign key defined in the User Task configuration for the mail notification on offering.
|
Profile |
getProfileMailCC()
Returns the profile for CC field
|
List<String> |
getProfiles()
Returns the profiles defined in the UserTask configuration, as a list of strings.
|
UserTask.UserTaskMode |
getUserTaskMode()
Returns the user task mode.
|
createMailSpec, getProcessInstanceDescription, getProcessInstanceLabel, modifyProcessPriority
getProcessInstance, getProcessInstanceCreator, getProcessInstanceKey, getProfileForPermission, getPublishedProcessKey, getRepository, getSession
setVariableString
getVariableNames, getVariableString, isVariableDefined
UserTask.WorkItem createWorkItem(CreationWorkItemSpec aCreationWorkItemSpec) throws OperationException
When the work item is created, all the input parameters are resolved and saved in the work item parameters.
The data context input variables are evaluated just once at the work item creation (and not at the workflow
execution).
Use DataContext.setVariableString(String, String)
to change the variable value
before the creation to persist the expected value.
For the legacy mode (multi work items), this method must be called exactly one time for the new user task, else an exception is thrown at workflow execution.
IllegalStateException
- if the user task is not in legacy multi work
items mode,
and if the method is called several times.
It is forbidden to create several work items in the
default single work item mode.IllegalStateException
- if the user task is in legacy multi work items
mode,
and if the aCreationWorkItemSpec
defines a work item
offered to several profiles. It is forbidden to create a work item offered to
several profiles in the
legacy multi work items mode. This feature is
available
only in the default single work item mode.OperationException
List<String> getProfiles()
String getOfferedToNotificationMail()
String getAllocatedToNotificationMail()
Profile getProfileMailCC()
UserTask.UserTaskMode getUserTaskMode()
This method is useful to know if several work items can be created or if a single work item can be offered to several profiles.
createWorkItem(CreationWorkItemSpec)