-
1. Re: Global Event
jacob.orshalick Jun 18, 2008 4:28 PM (in response to damianharvey.damianharvey.gmail.com)It may be a bit heavy weight for the needs of your application, but you may consider looking into jBPM with jPDL business process definitions. A group of users can participate in a business process and a bean scoped to the business process context could observe the event.
As another advantage, I have been using Spring Web Flow on a recent project (which has a very similar flow definition to jPDL) and have really become quite fond of these types of pageflow definitions. The syntax feels very natural when defining flows.
Hope it helps.
-
2. Re: Global Event
damianharvey.damianharvey.gmail.com Jun 18, 2008 4:57 PM (in response to damianharvey.damianharvey.gmail.com)Thanks Jacob.
I'm using jBPM elsewhere in my app (mostly for Tasks), however this situation doesn't really lend itself towards being in a business process. If I was just using the BP Context as a holder for the Bean, I can't see how users can join it when they log in. Would you envisage the process being kicked off by the first user to request the Bean? How would subsequent users join the process?
I suppose one way to achieve what I'm after would be something like pub-sub using JMS. I could publish a message containing the event (eg.
schedule.changed
) and then my subscribing MDB could just fire whatever event it receives.Cheers,
Damian.
-
3. Re: Global Event
jacob.orshalick Jun 18, 2008 6:03 PM (in response to damianharvey.damianharvey.gmail.com)
I'm using jBPM elsewhere in my app (mostly for Tasks), however this situation doesn't really lend itself towards being in a business process.Yeah, if it really does not fit a business process then you would certainly have to use some ugly work-arounds to make use of the BP context.
I suppose one way to achieve what I'm after would be something like pub-sub using JMS.Seems reasonable and would certainly be less invasive than hacking into a broader scope. I will chew on this a bit more and see if I can think of another option. An interesting problem ;)
-
4. Re: Global Event
coralfe Sep 29, 2008 3:05 PM (in response to damianharvey.damianharvey.gmail.com)What was your eventual solution to this?
I have the same requirement in that several users can work on the same set of data.I am trying the JMS route, but cannot find a way to get the incoming message to the individual session beans/users(in my case page scope beans.)
-
5. Re: Global Event
coralfe Nov 3, 2008 1:30 PM (in response to damianharvey.damianharvey.gmail.com)I am now trying jBPM as a possible solution to my dilemma, but have a few questions.
I was thinking of transitioning to an edit node on opening the modal and than to cancel or update (with the resulting global event) on closing the dialog.
My concern is that if the user navigates away or there is an error the workflow wont end.1) Since the app doesn't really lend itself to workflow I was wondering if there was a way to always enter the worflow from the start node. Or to phrase differently can I make sure the user doesn't get stuck halfway through the process. My user would be in a modal panel and if navigating away (or and error) reentering the dialog should restart the process.
2) Is it possible to use jBPM without long term storage (database)
Would really appreciate some direction here, I don't know where to start.
-
6. Re: Global Event
coralfe Nov 4, 2008 10:58 AM (in response to damianharvey.damianharvey.gmail.com)<process-definition name="StrategyMap" xmlns="urn:jbpm.org:jpdl-3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jbpm.org:jpdl-3.2 http://jbpm.org/xsd/jpdl-3.2.xsd" > <start-state name="alterStrategyBubble"> <transition to="editStrategy"/> </start-state> <task-node name="editStrategy"> <task name="edit" description="Prepare for changes"> <assignment actor-id="#{actor.id}"/> </task> <transition name="notify" to="notify"> </transition> <transition name="cancel" to="cancelled"/> </task-node> <task-node name="notify"> <task name="reloadPage" description="check and update page if situation permits"> <assignment pooled-actors="#{identity.userGroup.name}" /> NEED WAY TO NOTIFY ALL USERS WITH SAME groupActorIds HERE and close task </task> <transition name="complete" to="complete"> </transition> </task-node> <end-state name="complete"/> <end-state name="cancelled"/> </process-definition>
Trying to notify a4j push component for each user in a particular group
@Observer("reload_requireed") public void changeRequired(){ synchronized (listener) { List<TaskInstance> instanceList = taskInstanceList.getTaskInstanceList(); if (instanceList!=null && !instanceList.isEmpty()) { //update a4j:push listener.onEvent(new EventObject(this)); } } } Please anyone. Not coming right with documentation