cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic variable check on REST API process start

tj1
Champ in-the-making
Champ in-the-making
Hi guys,

we starting our process from REST API. Is there any automatic way, to check that all needed variables for the process are set? And if there are not all required variables set, I would receive Response code 400 and process would not be started?

Thanks for the answers!
3 REPLIES 3

anjan
Champ in-the-making
Champ in-the-making
You can make a REST call to <code>/service/form/form-data?processDefinitionId=value</code> and it will return the formProperties in JSON response.  For each of the form properties, you can check if the required attribute is true or false.

tj1
Champ in-the-making
Champ in-the-making
Yea, I know that, but is there way that Activiti checks if all needed variables are passed and if not, doesn't start the process?

jbarrez
Star Contributor
Star Contributor
No, Activiti has no such mechanism, that will need to be done in a custom rest api that wraps the activiti java api.