Saving Form Properties and variables when starting a process
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2014 07:30 AM
Hi,
I want to save 'form properties' and 'variables' together when starting a process.
The first task after 'start event' is a script task, that uses a variable that is saved in starting the process.
I found two possible (not working) solutions:
1- Starting process with RuntimeService.startProcessInstanceById (with variables), then saving form properties with FormService.saveFormData: It's not possible, we have only FormService.saveFormData for tasks, not processInstances.
2- Submitting form properties with FormService.submitStartFormData, then saving variables with RuntimeService.setVariables: It's not possible, FormService.submitStartFormData has no 'variables' argument. So it starts process without saving variables (and the script task will throw an exception).
What should i do?
Thanks in advance
I want to save 'form properties' and 'variables' together when starting a process.
The first task after 'start event' is a script task, that uses a variable that is saved in starting the process.
I found two possible (not working) solutions:
1- Starting process with RuntimeService.startProcessInstanceById (with variables), then saving form properties with FormService.saveFormData: It's not possible, we have only FormService.saveFormData for tasks, not processInstances.
ProcessInstance startProcessInstanceById(String processDefinitionId, String businessKey, Map<String, Object> variables) ;void saveFormData(String taskId, Map<String, String> properties);
2- Submitting form properties with FormService.submitStartFormData, then saving variables with RuntimeService.setVariables: It's not possible, FormService.submitStartFormData has no 'variables' argument. So it starts process without saving variables (and the script task will throw an exception).
ProcessInstance submitStartFormData(String processDefinitionId, String businessKey, Map<String, String> properties);void setVariables(String executionId, Map<String, ? extends Object> variables);
What should i do?
Thanks in advance
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2014 02:20 PM
Form properties are variables, they are stored as variables after submitting them. Why would you want to separate these two out?
