How to start a case for a process with contracts using AngularJS

hello
I am building a Angular + Bonita application.

I am able to start a case with the http://localhost:8080/bonita/API/bpm/process/6911839711750862830/instantiation . 
If I pass the Http POST body as empty string , I am able to start a case.

But Now i need to start the same with some contract value. If I pass a JSON variable with request body then I get error 415.
Please suggest how can I initialize a process which has contacts defined at process level.
I am using Angular to call the REST API and pass the parameter.

 

thanks

1 Like

That is good that you've found the answer on your own.

But yes for future reference: the body being JSON you need to make sure to set the right Content-Type:

header.append("Content-Type", "application/json");

 

Captain Bonita

Hi , after passing   header.append("Content-Type", "application/json"); 
i was able to resolve my issue.

 

Regards

Hi , after passing   header.append("Content-Type", "application/json"); 
i was able to resolve my issue.

 

Regards