public class TaskWrapper extends Object implements org.camunda.bpm.engine.task.Task
Task
, providing the ability of dynamically adding
FieldDef
initions based on the TaskFormData
that has been defined for that
task.Datasource
.Constructor and Description |
---|
TaskWrapper() |
TaskWrapper(org.camunda.bpm.engine.task.Task task,
Collection<org.camunda.bpm.engine.task.IdentityLink> identityLinks,
org.camunda.bpm.engine.variable.VariableMap variables)
Create a new
TaskWrapper from the given Task |
Modifier and Type | Method and Description |
---|---|
void |
addFormFields(FieldProcessor fp,
org.camunda.bpm.engine.form.TaskFormData taskFormData,
String mandatoryMessage)
Dynamically adds
FieldDef initions to the given FieldProcessor , depending on the
FormField s defined at the TaskFormData . |
protected void |
addValidation(FieldDef field,
org.camunda.bpm.engine.form.FormFieldValidationConstraint validationConstraint,
String mandatoryMessage) |
protected void |
determineFieldType(org.camunda.bpm.engine.form.FormType type,
FieldDef field) |
Object |
getFormField(String name) |
void |
validate(Site site,
Application application,
Environment environment,
Options options,
Request request,
FieldProcessor fp,
org.camunda.bpm.engine.form.TaskFormData taskFormData,
String requiredMessage)
Validates this
TaskWrapper . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
delegate, getAssignee, getCaseDefinitionId, getCaseExecutionId, getCaseInstanceId, getCreateTime, getDelegationState, getDescription, getDueDate, getExecutionId, getFollowUpDate, getFormKey, getId, getName, getOwner, getParentTaskId, getPriority, getProcessDefinitionId, getProcessInstanceId, getTaskDefinitionKey, getTenantId, isSuspended, setAssignee, setCaseInstanceId, setDelegationState, setDescription, setDueDate, setFollowUpDate, setName, setOwner, setParentTaskId, setPriority, setTenantId
public TaskWrapper()
public TaskWrapper(org.camunda.bpm.engine.task.Task task, Collection<org.camunda.bpm.engine.task.IdentityLink> identityLinks, org.camunda.bpm.engine.variable.VariableMap variables)
TaskWrapper
from the given Task
task
- the Task
to wrap, retrieved from a TaskService
identityLinks
- the IdentityLink
s for the task, usually retrieved with
TaskService.getIdentityLinksForTask(String)
variables
- the variables for this Task
, usually retrieved with
TaskService.getVariablesTyped(String)
public void addFormFields(FieldProcessor fp, org.camunda.bpm.engine.form.TaskFormData taskFormData, String mandatoryMessage)
FieldDef
initions to the given FieldProcessor
, depending on the
FormField
s defined at the TaskFormData
.fp
- the FieldProcessor
taskFormData
- the TaskFormData
to dynamically add the fields frommandatoryMessage
- the message in case a field id mandatoryprotected void addValidation(FieldDef field, org.camunda.bpm.engine.form.FormFieldValidationConstraint validationConstraint, String mandatoryMessage)
protected void determineFieldType(org.camunda.bpm.engine.form.FormType type, FieldDef field)
public void validate(Site site, Application application, Environment environment, Options options, Request request, FieldProcessor fp, org.camunda.bpm.engine.form.TaskFormData taskFormData, String requiredMessage)
TaskWrapper
. Therefore, the FormField
s returned by the TaskFormData
are
checked for FormFieldValidationConstraint
s. If there is a required
constraint, and the value
returned by getFormField(String)
is null
or empty for the given FormField
, an
error-message as append to the FieldDef
inition of that field.site
- the current Site
application
- the current Application
environment
- the current Environment
options
- the current Options
request
- the current Request
fp
- the current FieldProcessor
taskFormData
- the current TaskFormData
requiredMessage
- the current Site
Copyright © 2011–2020 aiticon GmbH. All rights reserved.