-
1. Re: Some Questions about Spring JBPM4 Integration
jbarrez Jul 9, 2009 10:27 AM (in response to rmoskal)I'm curious as to what else can be passed to the java object. Like I'd like to get a copy of the actual Execution.
Afaik, there is no easy way to just inject the actual executions, since
* There are potentially many many executions active
* Spring injects dependencies when the appCtx is built, so injecting a new object would mean that every dependant must be re-initialized, which is not happening in SpringAlso will it be possible to declare nodes that pull from the Spring context?
Yes, this will be in the 4.0 release and is already documented in the devguide of that release. You can use decisions, custom, etc nodes which are completely defined in Spring.I'm super excited about the combination of Spring/jBPM4.
I'm very happy to hear that! (we are too very excited ;-) -
2. Re: Some Questions about Spring JBPM4 Integration
rmoskal Jul 9, 2009 6:10 PM (in response to rmoskal)Thanks for replying!
You may have misunderstood me, I don't want to inject an Execution into the context. But I would want to pass it as a variable to say a entity. The existing Spring demo shows a HistorySession being passed as an argument to a method. I imagine there must be a way to pass something like the current Execution to a node so I can tell what node I'm at, for example.
Thanks,
Rob -
3. Re: Some Questions about Spring JBPM4 Integration
ainze Jul 10, 2009 3:05 AM (in response to rmoskal)"rmoskal" wrote:
Thanks for replying!
You may have misunderstood me, I don't want to inject an Execution into the context. But I would want to pass it as a variable to say a <java/> entity. The existing Spring demo shows a HistorySession being passed as an argument to a method. I imagine there must be a way to pass something like the current Execution to a node so I can tell what node I'm at, for example.
Thanks,
Rob
Rob,
An excellent question! :)
Joram, when invoking a spring bean from the process, only one execution is active. Can't we get it from an or something? -
4. Re: Some Questions about Spring JBPM4 Integration
jugglingcats Jul 10, 2009 8:05 AM (in response to rmoskal)As Joram said you can use spring beans as the class behind a custom or decision node, in which case it implements the respective interface and is passed the execution in the call. Does this answer the question?
eg. -
5. Re: Some Questions about Spring JBPM4 Integration
rmoskal Jul 10, 2009 10:13 AM (in response to rmoskal)I see how it's done. The current execution can be passed as a method parameter like so:
This will be great once I figure out how to get it to work with grroovy or jython. -
6. Re: Some Questions about Spring JBPM4 Integration
rmoskal Jul 10, 2009 10:25 AM (in response to rmoskal)I guess the instant reply doesn't like code.
<java expr="#{echoService}" g="140,176,92,52" method="sayHelloWithExecution" name="echo2"> <arg> <object expr="#{execution}"/> </arg> <transition g="-70,-22" name="accept" to="join1"/> </java>