sai576
sai576

Reputation: 111

how to get the submitted form values in external form rendering concept

I am new to Activti, I am not clear in some concepts. Can anyone explain how to get the submitted form values in external form rendering concept either in user task and start event. And how to use these values in other activities.

If there are any video tutorials regarding Activiti explained all BPMN constructs with simple examples, in case if not there any one upload please.

Upvotes: 1

Views: 3977

Answers (2)

Madhusudan Joshi
Madhusudan Joshi

Reputation: 4476

If you have not deployed activiti-rest.war file, then do the same on your server. Follow the link REST API to get all the details about how to get form properties and values. It has provided a very clear description of each URIs.

The following URI will provide you the properties details: GET /form/{taskId}/properties

Upvotes: 0

ATMTA
ATMTA

Reputation: 767

First of all check FormService. This service is used for accessing to form data and rendering forms for starting new process instances and completing tasks. Pay attention to

  • TaskFormData getTaskFormData(String taskId) ,
  • StartFormData getStartFormData(String processDefinitionId)
  • ProcessInstance submitStartFormData(String processDefinitionId,Map<String,String> properties)
  • void submitTaskFormData(String taskId,Map<String,String> properties)

All the data that's needed to render a form is assembled in one of these two service methods: StartFormData FormService.getStartFormData(String processDefinitionId) and TaskFormdata FormService.getTaskFormData(String taskId). The information you get from this methods is enough to render using frameworks like Vaadin . Here you can find how Activiti explorer form rendering is implemented. After rendering forms you probably wish to submit the data. Submitted information arrives to server in key-value format. The key is the id of the form property. Then you need to call to submitStartFormData() or submitTaskFormData() methods to pass submitted information to the process engine. After that all submitted fields became process variables and can be used in process definitions e.g. in conditionExpression elements

 <conditionExpression xsi:type="tFormalExpression">${vacationApproved == 'true'}/>

User guide : http://activiti.org/userguide/index.html#externalFormRendering

Upvotes: 1

Related Questions