public interface FormService
Modifier and Type | Method and Description |
---|---|
InputStream |
getDeployedStartForm(String processDefinitionId)
Retrieves a deployed start form for a process definition with a given id.
|
InputStream |
getDeployedTaskForm(String taskId)
Retrieves a deployed task form for a task with a given id.
|
Object |
getRenderedStartForm(String processDefinitionId)
Rendered form generated by the default build-in form engine for starting a new process instance.
|
Object |
getRenderedStartForm(String processDefinitionId,
String formEngineName)
Rendered form generated by the given build-in form engine for starting a new process instance.
|
Object |
getRenderedTaskForm(String taskId)
Rendered form generated by the default build-in form engine for completing a task.
|
Object |
getRenderedTaskForm(String taskId,
String formEngineName)
Rendered form generated by the given build-in form engine for completing a task.
|
StartFormData |
getStartFormData(String processDefinitionId)
Retrieves all data necessary for rendering a form to start a new process instance.
|
String |
getStartFormKey(String processDefinitionId)
Retrieves a user defined reference to a start form.
|
VariableMap |
getStartFormVariables(String processDefinitionId)
Retrieves a list of all variables for rendering a start from.
|
VariableMap |
getStartFormVariables(String processDefinitionId,
Collection<String> formVariables,
boolean deserializeObjectValues)
Retrieves a list of requested variables for rendering a start from.
|
TaskFormData |
getTaskFormData(String taskId)
Retrieves all data necessary for rendering a form to complete a task.
|
String |
getTaskFormKey(String processDefinitionId,
String taskDefinitionKey)
Retrieves a user defined reference to a task form.
|
VariableMap |
getTaskFormVariables(String taskId)
Retrieves a list of all variables for rendering a task form.
|
VariableMap |
getTaskFormVariables(String taskId,
Collection<String> formVariables,
boolean deserializeObjectValues)
Retrieves a list of requested variables for rendering a task form.
|
ProcessInstance |
submitStartForm(String processDefinitionId,
Map<String,Object> properties)
Start a new process instance with the user data that was entered as properties in a start form.
|
ProcessInstance |
submitStartForm(String processDefinitionId,
String businessKey,
Map<String,Object> properties)
Start a new process instance with the user data that was entered as properties in a start form.
|
ProcessInstance |
submitStartFormData(String processDefinitionId,
Map<String,String> properties)
Deprecated.
|
ProcessInstance |
submitStartFormData(String processDefinitionId,
String businessKey,
Map<String,String> properties)
Deprecated.
|
void |
submitTaskForm(String taskId,
Map<String,Object> properties)
Completes a task with the user data that was entered as properties in a task form.
|
void |
submitTaskFormData(String taskId,
Map<String,String> properties)
Deprecated.
|
VariableMap |
submitTaskFormWithVariablesInReturn(String taskId,
Map<String,Object> properties,
boolean deserializeValues)
Completes a task with the user data that was entered as properties in a task form.
|
StartFormData getStartFormData(String processDefinitionId)
AuthorizationException
- If the user has no Permissions.READ
permission on Resources.PROCESS_DEFINITION
.Object getRenderedStartForm(String processDefinitionId)
AuthorizationException
- If the user has no Permissions.READ
permission on Resources.PROCESS_DEFINITION
.Object getRenderedStartForm(String processDefinitionId, String formEngineName)
AuthorizationException
- If the user has no Permissions.READ
permission on Resources.PROCESS_DEFINITION
.@Deprecated ProcessInstance submitStartFormData(String processDefinitionId, Map<String,String> properties)
submitStartForm(String, Map)
ProcessInstance submitStartForm(String processDefinitionId, Map<String,Object> properties)
AuthorizationException
- If the user has no Permissions.CREATE
permission on Resources.PROCESS_INSTANCE
and no Permissions.CREATE_INSTANCE
permission on Resources.PROCESS_DEFINITION
.@Deprecated ProcessInstance submitStartFormData(String processDefinitionId, String businessKey, Map<String,String> properties)
submitStartForm(String, String, Map)
ProcessInstance submitStartForm(String processDefinitionId, String businessKey, Map<String,Object> properties)
ProcessInstanceQuery.processInstanceBusinessKey(String)
. Providing such a business
key is definitely a best practice.
Note that a business key MUST be unique for the given process definition.
Process instance from different process definition are allowed to have the
same business key.processDefinitionId
- the id of the process definition, cannot be null.businessKey
- a key that uniquely identifies the process instance in the context or the
given process definition.properties
- the properties to pass, can be null.AuthorizationException
- If the user has no Permissions.CREATE
permission on Resources.PROCESS_INSTANCE
and no Permissions.CREATE_INSTANCE
permission on Resources.PROCESS_DEFINITION
.TaskFormData getTaskFormData(String taskId)
AuthorizationException
- In case of standalone tasks:
Permissions.READ
permission on Resources.TASK
orTaskPermissions#READ_VARIABLE
permission on Resources.TASK
In case the task is part of a running process instance:
Permissions.READ
permission on Resources.TASK
or
no Permissions.READ_TASK
permission on Resources.PROCESS_DEFINITION
TaskPermissions#READ_VARIABLE
permission on Resources.TASK
or
no ProcessDefinitionPermissions#READ_TASK_VARIABLE
permission on Resources.PROCESS_DEFINITION
when this
config is enabledObject getRenderedTaskForm(String taskId)
AuthorizationException
- In case of standalone tasks:
Permissions.READ
permission on Resources.TASK
orTaskPermissions#READ_VARIABLE
permission on Resources.TASK
when this
config is enabledIn case the task is part of a running process instance:
Permissions.READ
permission on Resources.TASK
or
no Permissions.READ_TASK
permission on Resources.PROCESS_DEFINITION
TaskPermissions#READ_VARIABLE
permission on Resources.TASK
or
no ProcessDefinitionPermissions#READ_TASK_VARIABLE
permission on Resources.PROCESS_DEFINITION
when this
config is enabledObject getRenderedTaskForm(String taskId, String formEngineName)
AuthorizationException
- In case of standalone tasks:
Permissions.READ
permission on Resources.TASK
orTaskPermissions#READ_VARIABLE
permission on Resources.TASK
when this
config is enabledIn case the task is part of a running process instance:
Permissions.READ
permission on Resources.TASK
or
no Permissions.READ_TASK
permission on Resources.PROCESS_DEFINITION
TaskPermissions#READ_VARIABLE
permission on Resources.TASK
or
no ProcessDefinitionPermissions#READ_TASK_VARIABLE
permission on Resources.PROCESS_DEFINITION
when this
config is enabled@Deprecated void submitTaskFormData(String taskId, Map<String,String> properties)
submitTaskForm(String, Map)
void submitTaskForm(String taskId, Map<String,Object> properties)
taskId
- properties
- AuthorizationException
- If the user has no Permissions.UPDATE
permission on Resources.TASK
or no Permissions.UPDATE_TASK
permission on Resources.PROCESS_DEFINITION
.VariableMap submitTaskFormWithVariablesInReturn(String taskId, Map<String,Object> properties, boolean deserializeValues)
taskId
- properties
- deserializeValues
- if false, returned SerializableValue
s
will not be deserialized (unless they are passed into this method as a
deserialized value or if the BPMN process triggers deserialization)AuthorizationException
- If the user has no Permissions.UPDATE
permission on Resources.TASK
or no Permissions.UPDATE_TASK
permission on Resources.PROCESS_DEFINITION
.VariableMap getStartFormVariables(String processDefinitionId)
processDefinitionId
- the id of the process definition for which the start form should be retrieved.AuthorizationException
- If the user has no Permissions.READ
permission on Resources.PROCESS_DEFINITION
.VariableMap getStartFormVariables(String processDefinitionId, Collection<String> formVariables, boolean deserializeObjectValues)
processDefinitionId
- the id of the process definition for which the start form should be retrieved.formVariables
- a Collection of the names of the variables to retrieve. Allows restricting the set of retrieved variables.deserializeObjectValues
- if false object values are not deserializedAuthorizationException
- If the user has no Permissions.READ
permission on Resources.PROCESS_DEFINITION
.VariableMap getTaskFormVariables(String taskId)
Retrieves a list of all variables for rendering a task form. In addition to the task variables and process variables, the method takes into account FormData specified for the task. This allows defining default values for form fields.
A variable is resolved in the following order:
taskId
- the id of the task for which the variables should be retrieved.AuthorizationException
- In case of standalone tasks:
Permissions.READ
permission on Resources.TASK
orTaskPermissions#READ_VARIABLE
permission on Resources.TASK
when this
config is enabledIn case the task is part of a running process instance:
Permissions.READ
permission on Resources.TASK
or
no Permissions.READ_TASK
permission on Resources.PROCESS_DEFINITION
TaskPermissions#READ_VARIABLE
permission on Resources.TASK
or
no ProcessDefinitionPermissions#READ_TASK_VARIABLE
permission on Resources.PROCESS_DEFINITION
when this
config is enabledVariableMap getTaskFormVariables(String taskId, Collection<String> formVariables, boolean deserializeObjectValues)
Retrieves a list of requested variables for rendering a task form. In addition to the task variables and process variables, the method takes into account FormData specified for the task. This allows defining default values for form fields.
A variable is resolved in the following order:
taskId
- the id of the task for which the variables should be retrieved.formVariables
- a Collection of the names of the variables to retrieve. Allows restricting the set of retrieved variables.deserializeObjectValues
- if false object values are not deserializedAuthorizationException
- In case of standalone tasks:
Permissions.READ
permission on Resources.TASK
orTaskPermissions#READ_VARIABLE
permission on Resources.TASK
when this
config is enabledIn case the task is part of a running process instance:
Permissions.READ
permission on Resources.TASK
or
no Permissions.READ_TASK
permission on Resources.PROCESS_DEFINITION
TaskPermissions#READ_VARIABLE
permission on Resources.TASK
or
no ProcessDefinitionPermissions#READ_TASK_VARIABLE
permission on Resources.PROCESS_DEFINITION
when this
config is enabledString getStartFormKey(String processDefinitionId)
AuthorizationException
- If the user has no Permissions.READ
permission on Resources.PROCESS_DEFINITION
.String getTaskFormKey(String processDefinitionId, String taskDefinitionKey)
Task
instances returned by any
TaskQuery
.AuthorizationException
- If the user has no Permissions.READ
permission on Resources.PROCESS_DEFINITION
.InputStream getDeployedStartForm(String processDefinitionId)
AuthorizationException
- If the user has no Permissions.READ
permission on Resources.PROCESS_DEFINITION
.NotFoundException
- If the start form cannot be found.BadUserRequestException
- If the start form key has wrong format ("embedded:deployment:InputStream getDeployedTaskForm(String taskId)
AuthorizationException
- If the user has no Permissions.READ
permission on Resources.TASK
.NotFoundException
- If the task form cannot be found.BadUserRequestException
- If the task form key has wrong format ("embedded:deployment:Copyright © 2022. All rights reserved.