org.camunda.bpm.engine.impl
Class FormServiceImpl

java.lang.Object
  extended by org.camunda.bpm.engine.impl.ServiceImpl
      extended by 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.ServiceImpl
commandExecutor
 
Constructor Summary
FormServiceImpl()
           
 
Method Summary
 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 engineName)
          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 engineName)
          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)
           
 ProcessInstance submitStartFormData(String processDefinitionId, String businessKey, Map<String,String> properties)
           
 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)
           
 
Methods inherited from class org.camunda.bpm.engine.impl.ServiceImpl
getCommandExecutor, setCommandExecutor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormServiceImpl

public FormServiceImpl()
Method Detail

getRenderedStartForm

public Object getRenderedStartForm(String processDefinitionId)
Description copied from interface: FormService
Rendered form generated by the default build-in form engine for starting a new process instance.

Specified by:
getRenderedStartForm in interface FormService

getRenderedStartForm

public Object getRenderedStartForm(String processDefinitionId,
                                   String engineName)
Description copied from interface: FormService
Rendered form generated by the given build-in form engine for starting a new process instance.

Specified by:
getRenderedStartForm in interface FormService

getRenderedTaskForm

public Object getRenderedTaskForm(String taskId)
Description copied from interface: FormService
Rendered form generated by the default build-in form engine for completing a task.

Specified by:
getRenderedTaskForm in interface FormService

getRenderedTaskForm

public Object getRenderedTaskForm(String taskId,
                                  String engineName)
Description copied from interface: FormService
Rendered form generated by the given build-in form engine for completing a task.

Specified by:
getRenderedTaskForm in interface FormService

getStartFormData

public StartFormData getStartFormData(String processDefinitionId)
Description copied from interface: FormService
Retrieves 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:
getStartFormData in interface FormService

getTaskFormData

public TaskFormData getTaskFormData(String taskId)
Description copied from interface: FormService
Retrieves 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:
getTaskFormData in interface FormService

submitStartFormData

public ProcessInstance submitStartFormData(String processDefinitionId,
                                           Map<String,String> properties)
Specified by:
submitStartFormData in interface FormService

submitStartFormData

public ProcessInstance submitStartFormData(String processDefinitionId,
                                           String businessKey,
                                           Map<String,String> properties)
Specified by:
submitStartFormData in interface FormService

submitStartForm

public ProcessInstance submitStartForm(String processDefinitionId,
                                       Map<String,Object> properties)
Description copied from interface: FormService
Start a new process instance with the user data that was entered as properties in a start form.

Specified by:
submitStartForm in interface FormService

submitStartForm

public ProcessInstance submitStartForm(String processDefinitionId,
                                       String businessKey,
                                       Map<String,Object> properties)
Description copied from interface: FormService
Start 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 , see 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.

Specified by:
submitStartForm in 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.

submitTaskFormData

public void submitTaskFormData(String taskId,
                               Map<String,String> properties)
Specified by:
submitTaskFormData in interface FormService

submitTaskForm

public void submitTaskForm(String taskId,
                           Map<String,Object> properties)
Description copied from interface: FormService
Completes a task with the user data that was entered as properties in a task form.

Specified by:
submitTaskForm in interface FormService

getStartFormKey

public String getStartFormKey(String processDefinitionId)
Description copied from interface: FormService
Retrieves 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:
getStartFormKey in interface FormService

getTaskFormKey

public String getTaskFormKey(String processDefinitionId,
                             String taskDefinitionKey)
Description copied from interface: FormService
Retrieves 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 from Task instances returned by any TaskQuery.

Specified by:
getTaskFormKey in interface FormService

getStartFormVariables

public VariableMap getStartFormVariables(String processDefinitionId)
Description copied from interface: FormService
Retrieves 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:
getStartFormVariables in interface FormService
Parameters:
processDefinitionId - the id of the process definition for which the start form should be retrieved.
Returns:
a map of VariableInstances.

getStartFormVariables

public VariableMap getStartFormVariables(String processDefinitionId,
                                         Collection<String> formVariables,
                                         boolean deserializeObjectValues)
Description copied from interface: FormService
Retrieves 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:
getStartFormVariables in 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.

getTaskFormVariables

public VariableMap getTaskFormVariables(String taskId)
Description copied from interface: FormService

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:

Specified by:
getTaskFormVariables in interface FormService
Parameters:
taskId - the id of the task for which the variables should be retrieved.
Returns:
a map of VariableInstances.

getTaskFormVariables

public VariableMap getTaskFormVariables(String taskId,
                                        Collection<String> formVariables,
                                        boolean deserializeObjectValues)
Description copied from interface: FormService

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:

Specified by:
getTaskFormVariables in 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.


Copyright © 2015 camunda services GmbH. All rights reserved.