cancel
Showing results for 
Search instead for 
Did you mean: 

CDI Injection for JavaDelegate

joshb1
Champ in-the-making
Champ in-the-making
Hi,

This is a follow up to the post for http://forums.activiti.org/en/viewtopic.php?f=6&t=3798&p=15043&hilit=CDI+javaDelegate#p15043

I'm having trouble getting the Delegate to wire up using CDI.  I've tried using @Named but it doesn't seem to be working.  Regardless, I would have expected Activiti to fetch the delegate using CDI, so that you wouldn't have to use a delegateExpression, but rather the java class.  Has there been any further work on this, or should I file a Jira, or am I just wrong!?

Thanks in advance, and keep up the great work!
4 REPLIES 4

joshb1
Champ in-the-making
Champ in-the-making
Just to follow up, I've been reading more online, and I would like to get a little clarification of the difference in support for CDI  between plain Activiti and the camunda fox version.  Should these examples work in vanilla Activiti?  I haven't yet downloaded the camunda fox version to play with.

meyerd
Champ on-the-rise
Champ on-the-rise
Hi joshb,

please take a look at this example:
https://bitbucket.org/camunda/fox-showcases/src/7dacdfb55b38/versicherungsantrag

it has two maven profiles, one to work with camunda fox and one to work with "plain activiti".

(unfortunately it is only available in German)

meyerd
Champ on-the-rise
Champ on-the-rise

joshb1
Champ in-the-making
Champ in-the-making
Daniel,

thanks for the reply.  I was able to get it up and running..doing a little debugging, I was able to determine that it wasn't using the CdiResolver.  Checking with the example you gave, I was using the programatic config and was using the JtaProcessEngineConfiguration instead of the CdiJtaProcessEngineConfiguration.

A follow up question - is there a reason that the plain Java Class type / JavaDelegate doesn't work?  I like that in the designer it allows you to "select class", and it is the way I would have expected it to work with CDI.  Now that its working though, I am a pretty happy camper.

I have looked at several BPM options, and Activiti is the first one that I really think we could use.  You have done a great job, and keep up the great work!