10-14-2012 11:22 AM
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.
String users = "user1,user2,user3,user4";
String processDefinitionId = processDefinition.getId();
Map<String, String> formProperties = new HashMap<String, String>();
formProperties.put("countersignUsers", users);
ProcessInstance processInstance = formService.submitStartFormData(processDefinitionId, formProperties);
Map<String, Object> variableMap = new HashMap<String, Object>();
List<String> users = Arrays.asList("user1", "user2", "user3", "user4");
variableMap.put("countersignUsers", users);
variableMap.put("rate", rate);
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("dispatch", variableMap);
assertNotNull(processInstance.getId()); // it's ok
10-15-2012 03:52 AM
10-15-2012 05:39 AM
Form-properties were delibiratly String-typed and the conversion to actual Object's in built-in in FormTypes. So if you want to add a type that converts e.g.. a comma-separated list of values in a form-proprty to an object-array, you'll have to write an plug in your own custom form-proprty type.
Have a look at: org.activiti.explorer.form.UserFormType for an example on how to create one, and look in the /activiti-webapp-explorer2/src/main/webapp/WEB-INF/applicationContext.xml how to wire it.
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.