cancel
Showing results for 
Search instead for 
Did you mean: 

CDI and ProcessInstanceId

tdtappe
Confirmed Champ
Confirmed Champ
I am using Activiti 5.16.3 with CDI extension in a JBoss 7.1.4 (clustered). Sometimes I run into the following problem.
Referencing a named CDI bean within a workflow definition works just fine. But sometimes I don't get the process instance id via injection in that named bean:


@Inject
@ProcessInstanceId
protected String processInstanceId;


The processInstanceId is just null. Why is that? Any idea?

–Heiko
4 REPLIES 4

tdtappe
Confirmed Champ
Confirmed Champ
Anybody? This one's still chasing me.

–Heiko

jbarrez
Star Contributor
Star Contributor
No, no idea … it's very hard to say something about something that happens 'sometimes' …

tdtappe
Confirmed Champ
Confirmed Champ
Well, 'sometimes' actually is not correct. On the clustered production system it happens fairly often. On my standalone development windows system it hardly ever occurs.
And it doesn't seem to make any difference if I use EL and pass in the process-instance id as a parameter like this:
${myBean.myFunction(execution.processInstanceId)}

jbarrez
Star Contributor
Star Contributor
'fairly often' is the same as 'sometimes' .. there must be a situation that triggers it, computers cannot randomly do things … but no idea what is causing it for you.