cancel
Showing results for 
Search instead for 
Did you mean: 

Starting a process by key ignores start form required fields

richardmward
Champ in-the-making
Champ in-the-making
Hi,

This may be the expected functionality, but I was wondering if someone could explain why if it is.

If I have a startEvent with some required formProperties in it - when I start a process by using
FormService.submitStartFormData(String processDefinitionId, Map<String, String> properties)
and do not provide all of the required fields, I get an exception saying a property is required (as expected).

However if I start the process using
RuntimeService.startProcessInstanceByKey(String processDefinitionKey, Map<String, Object> variables)
, then it does not complain - essentially skipping the start form.

Is there a reason why this would be the case? Is it expected? It seems unusual to me that you can pass a step on the flow in an invalid state.

Many thanks in advance,
Richard
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
No, the method that takes in the variables map is 'lower level' than the form one. It doesn't know about the forms, it just knows about variables (which may or may not map on form fields)