cancel
Showing results for 
Search instead for 
Did you mean: 

Using Activiti process between two different java processes

atul_sh
Champ in-the-making
Champ in-the-making
Greetings Everybody!

I'm exploring Activiti and trying one simple example wherein i'm using Activiti process between two different java processes.

I have an Activiti process in which there are following four Start Form Properties:
- no1
- no2
- operation
- result

I want to invoke this Activiti process from a Java class by passing the Start Form properties from this Java class, so is this possible in Activiti?

Second, I want to access the "result" form property calculated from the process and pass it to second Java class to print it, is this possible?

Please provide your valuable inputs.
Thanks!


Atul Shinkar
4 REPLIES 4

frederikherema1
Star Contributor
Star Contributor
Look in the user guide to the "Java Service Task", you can use your class and access the process-variables and do what you want with them in there.

atul_sh
Champ in-the-making
Champ in-the-making
Hi Frederik,

Thank you for your reply!

I've already gone through the Java Service Task section in the user guide, and I'm able to access the process variables in the Java class that implements JavaDelegate. I've tried accessing the Start Form Properties from the Java class which is not a Java delegate.

I'm able to access the Start Form Properties using the StartFormData.getFormProperties API, but I'm not able to set the values for these properties as only getter API is available.

Can you tell me how to set the values here?

Thanks!


Regards,
Atul Shinkar

frederikherema1
Star Contributor
Star Contributor
http://activiti.org/javadocs/index.html


formService.submitStartFormData(…)

atul_sh
Champ in-the-making
Champ in-the-making
Thanks Frederik, now able to submit the start for data populated with the form properties.