cancel
Showing results for 
Search instead for 
Did you mean: 

DelegateExpression not resolving

billdoor
Champ in-the-making
Champ in-the-making
Hello,

before i get into a legthy explanation of my setup and problem, i made a jpeg that pretty much says it all. (Project-tree, files and error-log message).
cdR8Rest has a project dependency to cdR8 Processes with compile-time scope (gradle managed).

I want to use EJB or CDI-Bean to be called by activiti:delegateExpression, but it does not work.
I tested if the beans are present in the context of the application, they are. Its just activiti that does not want to find them.

I am not all to familliar with CDI, EJB, WIldfly and the least with activities core, to i thought before i spend another 4 hours fidling around with what i think probably has a trivial solution, i thought i#d leave this question here for the weekend Smiley Happy.
<img>
http://s29.postimg.org/tmiknudjb/problem.jpg
</img>


Thanks for any help in advance,

BillDoor
2 REPLIES 2

trademak
Star Contributor
Star Contributor
Hi,

A JavaDelegate in Activiti is instantiated using reflection so no annotation will get processed on that class. You have to do a lookup of the EJB via the InitialContext instead.

Best regards,

billdoor
Champ in-the-making
Champ in-the-making
It is instantiated using reflection if i use activiti:class="com.example.classname".

There is a whole component of activiti (activiti-cdi) that takes care of injection. The chapter "Contextual Process Execution with CDI" in the userguide states for example:
"…Activiti-cdi exposes CDI beans to activiti El, using a custom resolver. This makes it possible to reference beans from the process…"

This is exactly what i need - in forumposts here i found during my research i also read that this "custom resolver" is in place for CDI beans out of the box - as opposed to EJB, which are not supported.

What does this mean, if not what i am trying to do?

Thanks for the quick answer,
Regards,

BillDoor