org.activiti.engine
Interface FormService


public interface FormService

Access to form data and rendered forms for starting new process instances and completing tasks.

Author:
Tom Baeyens

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 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.
 TaskFormData getTaskFormData(String taskId)
          Retrieves all data necessary for rendering a form to complete a task.
 ProcessInstance submitStartFormData(String processDefinitionId, Map<String,String> properties)
          Start a new process instance with the user data that was entered as properties in a start form.
 ProcessInstance submitStartFormData(String processDefinitionId, String businessKey, Map<String,String> properties)
          Start a new process instance with the user data that was entered as properties in a start form.
 void submitTaskFormData(String taskId, Map<String,String> properties)
          Completes a task with the user data that was entered as properties in a task form.
 

Method Detail

getStartFormData

StartFormData getStartFormData(String processDefinitionId)
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.


getRenderedStartForm

Object getRenderedStartForm(String processDefinitionId)
Rendered form generated by the default build-in form engine for starting a new process instance.


getRenderedStartForm

Object getRenderedStartForm(String processDefinitionId,
                            String formEngineName)
Rendered form generated by the given build-in form engine for starting a new process instance.


submitStartFormData

ProcessInstance submitStartFormData(String processDefinitionId,
                                    Map<String,String> properties)
Start a new process instance with the user data that was entered as properties in a start form.


submitStartFormData

ProcessInstance submitStartFormData(String processDefinitionId,
                                    String businessKey,
                                    Map<String,String> properties)
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.

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.

getTaskFormData

TaskFormData getTaskFormData(String taskId)
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.


getRenderedTaskForm

Object getRenderedTaskForm(String taskId)
Rendered form generated by the default build-in form engine for completing a task.


getRenderedTaskForm

Object getRenderedTaskForm(String taskId,
                           String formEngineName)
Rendered form generated by the given build-in form engine for completing a task.


submitTaskFormData

void submitTaskFormData(String taskId,
                        Map<String,String> properties)
Completes a task with the user data that was entered as properties in a task form.



Copyright © 2012 Alfresco. All Rights Reserved.