[Design of JBoss jBPM] - Re: Register EventListener on JbppmContext
by camunda
Damn it, submitted too early, now in the train (with a bit of fresh air in between) I had two additional thoughts:
1.) I think the single listener would enough. If we want to have something like a dispatcher it can be configured as Listener knowing a list of other listener it notifies.
2.) The EventListener is maybe really not important at the moment. I think the same thing is already supported by hook in an own LoggingService. This LoggingService gets all important events as Log as well, right? Or does anybody already dived deeper into it and knows something which is missing there?
So I can extend the LoggingService to serve as EventListener... I think for my purposes at the moment it should be sufficient. I will check that out on Monday morning....
So I think I started an unnecessary discussion, sorry for that! But finally it helped at least me to come to a solution ;-) Keep you posted about how I meet our BAM requirements...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4191376#4191376
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4191376
15 years, 7 months
[Design of JBoss jBPM] - Re: Register EventListener on JbppmContext
by camunda
Okay, here my proposal.
Add to GraphElement:
| /**
| * notify configured external event listeners of fired event.
| *
| * The notification is done BEFORE the event gets processed by jbpm
| * internally (meaning actions are executed), so it is visible
| * to the listeners even if exceptions occur inside of the actions
| * causing the stacktrace to abort
| */
| private void notifyListenerOfEvent(String eventType, ExecutionContext executionContext) {
| EventListenerUtil.notifyListenerOfEvent(eventType, executionContext);
| }
|
and call this method inside of the "fireAndPropagateEvent" method.
Now my first thought was, that the EventListenerUtil looks up jbpm.cfg.xnml via JbpmConfiguration to see if there is a bean "jbpm.event.listener" configured, e.g.
| <bean name="jbpm.event.listener" class="MyEventListener">
|
Or to create some kind of jbpm event dispatcher to support a list of listeners:
| <bean name="jbpm.event.dispatcher" class="org.jbpm.NN">
| <field name="listeners">
| <list>
| <bean class="MyEventListener1" />
| <bean class="MyEventListener2" />
| </list>
| </field>
| </bean>
|
The code isn't hard there, just check in the JbpmConfiguration if the listener is/the listeners are set and if then call the listener.
What do you guys think? What would you prefer, simple one listener (so people with multiple listeners have to implement that themselvers) or multiple listeners?
This is a really powerfull machnism to hook into jbpm and to develop generic solutions around it, e.g. for BAM.... And it is not a big deal. I would like to start on this next week, hopefully we can come to some conclusions here. When finished I can also blog about how I use this to generate the BAM events we need in the project...
Cheers and have a nice weekend
Bernd
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4191350#4191350
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4191350
15 years, 7 months
[Design of JBoss jBPM] - jBPM 3.3 GA feedback in the user forum
by kukeltje
Guys,
There is some feedback coming in in the user forum regarding jBPM 3.3 GA. Basically it focuses around the installer and to some extend related to the docs. Some remarks:
- The 3.3 release is not in line with the getting started docs.
- People expect to be able to use jBPM out of the box when the installer has run.
- - Database correctly configured
- - Database populated
- How to install on a headless server
The first item is already in Jira as Thomas reopened https://jira.jboss.org/jira/browse/JBPM-1727.
Regarding the database, I tend to agree with the users. It is not really visible in any warning or doc (at least not that I found). This could be partly solved by the previous item, but in my opinion, we should provide a screen in the installer that asks for username, password and e.g. database url and preconfigure that and populate the database (as is the case with HSQLDB, but not done via sql scripts
An option for a headless install is another one. The fact that the automatic install script can be used for this with e.g. just changing the install path in the generated file and how to use it should be documented.
I'll make Jira issues of these in the weekend, but thought I'd initially share them here.
Stay tuned for (hopefully not) more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4191218#4191218
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4191218
15 years, 7 months