Package org.camunda.bpm.engine.impl
Class FormServiceImpl
- java.lang.Object
- 
- org.camunda.bpm.engine.impl.ServiceImpl
- 
- org.camunda.bpm.engine.impl.FormServiceImpl
 
 
- 
- All Implemented Interfaces:
- FormService
 
 public class FormServiceImpl extends ServiceImpl implements FormService - Author:
- Tom Baeyens, Falko Menge (camunda)
 
- 
- 
Field Summary- 
Fields inherited from class org.camunda.bpm.engine.impl.ServiceImplcommandExecutor
 
- 
 - 
Constructor SummaryConstructors Constructor Description FormServiceImpl()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStreamgetDeployedStartForm(java.lang.String processDefinitionId)Retrieves a deployed start form for a process definition with a given id.java.io.InputStreamgetDeployedTaskForm(java.lang.String taskId)Retrieves a deployed task form for a task with a given id.java.lang.ObjectgetRenderedStartForm(java.lang.String processDefinitionId)Rendered form generated by the default build-in form engine for starting a new process instance.java.lang.ObjectgetRenderedStartForm(java.lang.String processDefinitionId, java.lang.String engineName)Rendered form generated by the given build-in form engine for starting a new process instance.java.lang.ObjectgetRenderedTaskForm(java.lang.String taskId)Rendered form generated by the default build-in form engine for completing a task.java.lang.ObjectgetRenderedTaskForm(java.lang.String taskId, java.lang.String engineName)Rendered form generated by the given build-in form engine for completing a task.StartFormDatagetStartFormData(java.lang.String processDefinitionId)Retrieves all data necessary for rendering a form to start a new process instance.java.lang.StringgetStartFormKey(java.lang.String processDefinitionId)Retrieves a user defined reference to a start form.VariableMapgetStartFormVariables(java.lang.String processDefinitionId)Retrieves a list of all variables for rendering a start from.VariableMapgetStartFormVariables(java.lang.String processDefinitionId, java.util.Collection<java.lang.String> formVariables, boolean deserializeObjectValues)Retrieves a list of requested variables for rendering a start from.TaskFormDatagetTaskFormData(java.lang.String taskId)Retrieves all data necessary for rendering a form to complete a task.java.lang.StringgetTaskFormKey(java.lang.String processDefinitionId, java.lang.String taskDefinitionKey)Retrieves a user defined reference to a task form.VariableMapgetTaskFormVariables(java.lang.String taskId)Retrieves a list of all variables for rendering a task form.VariableMapgetTaskFormVariables(java.lang.String taskId, java.util.Collection<java.lang.String> formVariables, boolean deserializeObjectValues)Retrieves a list of requested variables for rendering a task form.ProcessInstancesubmitStartForm(java.lang.String processDefinitionId, java.lang.String businessKey, java.util.Map<java.lang.String,java.lang.Object> properties)Start a new process instance with the user data that was entered as properties in a start form.ProcessInstancesubmitStartForm(java.lang.String processDefinitionId, java.util.Map<java.lang.String,java.lang.Object> properties)Start a new process instance with the user data that was entered as properties in a start form.ProcessInstancesubmitStartFormData(java.lang.String processDefinitionId, java.lang.String businessKey, java.util.Map<java.lang.String,java.lang.String> properties)ProcessInstancesubmitStartFormData(java.lang.String processDefinitionId, java.util.Map<java.lang.String,java.lang.String> properties)voidsubmitTaskForm(java.lang.String taskId, java.util.Map<java.lang.String,java.lang.Object> properties)Completes a task with the user data that was entered as properties in a task form.voidsubmitTaskFormData(java.lang.String taskId, java.util.Map<java.lang.String,java.lang.String> properties)VariableMapsubmitTaskFormWithVariablesInReturn(java.lang.String taskId, java.util.Map<java.lang.String,java.lang.Object> properties, boolean deserializeValues)Completes a task with the user data that was entered as properties in a task form.- 
Methods inherited from class org.camunda.bpm.engine.impl.ServiceImplgetCommandExecutor, setCommandExecutor
 
- 
 
- 
- 
- 
Method Detail- 
getRenderedStartFormpublic java.lang.Object getRenderedStartForm(java.lang.String processDefinitionId) Description copied from interface:FormServiceRendered form generated by the default build-in form engine for starting a new process instance.- Specified by:
- getRenderedStartFormin interface- FormService
 
 - 
getRenderedStartFormpublic java.lang.Object getRenderedStartForm(java.lang.String processDefinitionId, java.lang.String engineName)Description copied from interface:FormServiceRendered form generated by the given build-in form engine for starting a new process instance.- Specified by:
- getRenderedStartFormin interface- FormService
 
 - 
getRenderedTaskFormpublic java.lang.Object getRenderedTaskForm(java.lang.String taskId) Description copied from interface:FormServiceRendered form generated by the default build-in form engine for completing a task.- Specified by:
- getRenderedTaskFormin interface- FormService
 
 - 
getRenderedTaskFormpublic java.lang.Object getRenderedTaskForm(java.lang.String taskId, java.lang.String engineName)Description copied from interface:FormServiceRendered form generated by the given build-in form engine for completing a task.- Specified by:
- getRenderedTaskFormin interface- FormService
 
 - 
getStartFormDatapublic StartFormData getStartFormData(java.lang.String processDefinitionId) Description copied from interface:FormServiceRetrieves all data necessary for rendering a form to start a new process instance. This can be used to perform rendering of the forms outside of the process engine.- Specified by:
- getStartFormDatain interface- FormService
 
 - 
getTaskFormDatapublic TaskFormData getTaskFormData(java.lang.String taskId) Description copied from interface:FormServiceRetrieves all data necessary for rendering a form to complete a task. This can be used to perform rendering of the forms outside of the process engine.- Specified by:
- getTaskFormDatain interface- FormService
 
 - 
submitStartFormDatapublic ProcessInstance submitStartFormData(java.lang.String processDefinitionId, java.util.Map<java.lang.String,java.lang.String> properties) - Specified by:
- submitStartFormDatain interface- FormService
 
 - 
submitStartFormDatapublic ProcessInstance submitStartFormData(java.lang.String processDefinitionId, java.lang.String businessKey, java.util.Map<java.lang.String,java.lang.String> properties) - Specified by:
- submitStartFormDatain interface- FormService
 
 - 
submitStartFormpublic ProcessInstance submitStartForm(java.lang.String processDefinitionId, java.util.Map<java.lang.String,java.lang.Object> properties) Description copied from interface:FormServiceStart a new process instance with the user data that was entered as properties in a start form.- Specified by:
- submitStartFormin interface- FormService
 
 - 
submitStartFormpublic ProcessInstance submitStartForm(java.lang.String processDefinitionId, java.lang.String businessKey, java.util.Map<java.lang.String,java.lang.Object> properties) Description copied from interface:FormServiceStart a new process instance with the user data that was entered as properties in a start form. A business key can be provided to associate the process instance with a certain identifier that has a clear business meaning. For example in an order process, the business key could be an order id. This business key can then be used to easily look up that process instance , seeProcessInstanceQuery.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.- Specified by:
- submitStartFormin interface- FormService
- Parameters:
- 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.
 
 - 
submitTaskFormDatapublic void submitTaskFormData(java.lang.String taskId, java.util.Map<java.lang.String,java.lang.String> properties)- Specified by:
- submitTaskFormDatain interface- FormService
 
 - 
submitTaskFormpublic void submitTaskForm(java.lang.String taskId, java.util.Map<java.lang.String,java.lang.Object> properties)Description copied from interface:FormServiceCompletes a task with the user data that was entered as properties in a task form.- Specified by:
- submitTaskFormin interface- FormService
 
 - 
submitTaskFormWithVariablesInReturnpublic VariableMap submitTaskFormWithVariablesInReturn(java.lang.String taskId, java.util.Map<java.lang.String,java.lang.Object> properties, boolean deserializeValues) Description copied from interface:FormServiceCompletes a task with the user data that was entered as properties in a task form.- Specified by:
- submitTaskFormWithVariablesInReturnin interface- FormService
- deserializeValues- if false, returned- SerializableValues will not be deserialized (unless they are passed into this method as a deserialized value or if the BPMN process triggers deserialization)
- Returns:
- a map of process variables
 
 - 
getStartFormKeypublic java.lang.String getStartFormKey(java.lang.String processDefinitionId) Description copied from interface:FormServiceRetrieves a user defined reference to a start form. In the Explorer app, it is assumed that the form key specifies a resource in the deployment, which is the template for the form. But users are free to use this property differently.- Specified by:
- getStartFormKeyin interface- FormService
 
 - 
getTaskFormKeypublic java.lang.String getTaskFormKey(java.lang.String processDefinitionId, java.lang.String taskDefinitionKey)Description copied from interface:FormServiceRetrieves a user defined reference to a task form. In the Explorer app, it is assumed that the form key specifies a resource in the deployment, which is the template for the form. But users are free to use this property differently. Both arguments can be obtained fromTaskinstances returned by anyTaskQuery.- Specified by:
- getTaskFormKeyin interface- FormService
 
 - 
getStartFormVariablespublic VariableMap getStartFormVariables(java.lang.String processDefinitionId) Description copied from interface:FormServiceRetrieves a list of all variables for rendering a start from. The method takes into account FormData specified for the start event. This allows defining default values for form fields.- Specified by:
- getStartFormVariablesin interface- FormService
- Parameters:
- processDefinitionId- the id of the process definition for which the start form should be retrieved.
- Returns:
- a map of VariableInstances.
 
 - 
getStartFormVariablespublic VariableMap getStartFormVariables(java.lang.String processDefinitionId, java.util.Collection<java.lang.String> formVariables, boolean deserializeObjectValues) Description copied from interface:FormServiceRetrieves a list of requested variables for rendering a start from. The method takes into account FormData specified for the start event. This allows defining default values for form fields.- Specified by:
- getStartFormVariablesin interface- FormService
- Parameters:
- 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 deserialized
- Returns:
- a map of VariableInstances.
 
 - 
getTaskFormVariablespublic VariableMap getTaskFormVariables(java.lang.String taskId) Description copied from interface:FormServiceRetrieves 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: - First, the method collects all form fields and creates variable instances for the form fields.
- Next, the task variables are collected.
- Next, process variables from the parent scopes of the task are collected, until the process instance scope is reached.
 - Specified by:
- getTaskFormVariablesin interface- FormService
- Parameters:
- taskId- the id of the task for which the variables should be retrieved.
- Returns:
- a map of VariableInstances.
 
 - 
getTaskFormVariablespublic VariableMap getTaskFormVariables(java.lang.String taskId, java.util.Collection<java.lang.String> formVariables, boolean deserializeObjectValues) Description copied from interface:FormServiceRetrieves 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: - First, the method collects all form fields and creates variable instances for the form fields.
- Next, the task variables are collected.
- Next, process variables from the parent scopes of the task are collected, until the process instance scope is reached.
 - Specified by:
- getTaskFormVariablesin interface- FormService
- Parameters:
- 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 deserialized
- Returns:
- a map of VariableInstances.
 
 - 
getDeployedStartFormpublic java.io.InputStream getDeployedStartForm(java.lang.String processDefinitionId) Description copied from interface:FormServiceRetrieves a deployed start form for a process definition with a given id.- Specified by:
- getDeployedStartFormin interface- FormService
 
 - 
getDeployedTaskFormpublic java.io.InputStream getDeployedTaskForm(java.lang.String taskId) Description copied from interface:FormServiceRetrieves a deployed task form for a task with a given id.- Specified by:
- getDeployedTaskFormin interface- FormService
 
 
- 
 
-