cancel
Showing results for 
Search instead for 
Did you mean: 

Can we pass variable number of parameters to a java delegate??

sushantmahajan
Champ in-the-making
Champ in-the-making
Hi,

I have a use case where i want to use one common Java Delegate implementation to work for a few service tasks, each passing different number of parameters. Is it possible to do that?

I am actually working on migration to Activiti from jbpm, where there used to be a provision to simply provide the name of the method of a particular bean that is to be executed. I don't want to change much at the code level and therefore rather than implementing the Java Delegate interface for each bean, I am trying to maintain a single java delegate that accepts the bean object and method name as the parameter along with a arguments and then use Java Reflection to invoke the method.

Please help!!
1 REPLY 1

trademak
Star Contributor
Star Contributor
Hi Sushant,

You could pass the DelegateExecution to your bean and retrieve any variable from that object.

Best regards,