cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to serialize RuntimeService instance

yatish
Champ in-the-making
Champ in-the-making
Hi,

Due to some tricky requirement, I needed to pass the Runtime Service from my driver program(jUnit) to a JavaDelegate. We know that we are breaking some activiti rules here. But we need to do it for now. I wrote a wrapper serializable class around Runtime Service, and tried to pass it in a map. But it returned me an ActivitiException "coudn't deserialize value 'com.activiti.dell.vistasks.common.VISWorkFlowCallable@f8395f' in variable 'WF1'". VISWorkFlowCallable is my callable and serializable class which holds runtimeService handle.

Is there a way to pass RuntimeService to JavaDelegate? I can not keep a singleton instance of RuntimeService for my application.

I am actually writing a Custom Task that needs RuntimeService. From my Custom task, I want to create java threads, that instantiates workflows.

Thanks,
Yatish
2 REPLIES 2

jbarrez
Star Contributor
Star Contributor
That is very tricky…. can't you use dependency injection for your custom service?

yatish
Champ in-the-making
Champ in-the-making
Thanks for the reply,

we did that,