cancel
Showing results for 
Search instead for 
Did you mean: 

Java class access from Process

ad1
Champ in-the-making
Champ in-the-making
I am a newbie to Activiti, so this question may sound stupid. please excuse me.

I have process with set of  service task activities. I make calls to different methods in one Java a class using expression in these  service task stages.

My question is .. will these calls go into different instances of the Java class or to the same one. I want all the call to go into a single java instance class per process. How can i do this? Each Process flow instance should be mapped to a unique java class instance as i have variable set in the java class at each service task stage.

Thank you in advance for your replies

Andat
2 REPLIES 2

jbarrez
Star Contributor
Star Contributor
If you're using activiti:class, each will be one instance / step in the process.

If you want only one instance, you either must make sure you keep a singleton yourself in the class implementation, or using the activiti:delegateExpresison with for example Spring (where the default is singleton)

ad1
Champ in-the-making
Champ in-the-making
Thanks @jbarrez I will take the singleton class approach