[JBoss jBPM] - Re: How to best control access from multiple threads to a Pr
by jse
Ronald
I am fairly new to jBpm and am just looking for the appropriate "jBpm way" of solving the problem.
I think, perhaps, my first post was a bit too abstract to be clear. So... here is a more concrete example.
Lets envisage that jBpm (J) is responsible for escalating a problem with external system P. The means of escalation is email, using external emailing system E. All interaction with the external systems is via http. E(mail) will provide J(bpm) with delivery notification and read receipt information via http callbacks. These delivery notfifications and red receipts need to be sent to the P(roblem) system via http callback. So... as a sequence diagram we have:
| P J E
| |
|
| |
| |--http post-->|
| |
| (thread J1)
| |
| |--http post-->|
| |
| |<---200 OK----|
| |
| |<---200 OK----|
|
|
| | (recv delivery receipt)
| |<--http post--|
| |
| (thread J2)
| |
| |<--http post--|
| |
| |----200 OK--->|
| |----200 OK--->|
|
|
|
| | (recv read receipt)
| |<--http post--|
| |
| (thread J3)
| |
| |<--http post--|
| |
| |----200 OK--->|
| |----200 OK--->|
|
This could be modelled in jBpm like this
|
| start
| |
| |
| V
| send email via http
| |
| |
| V
| wait for delivery receipt
| |
| |
| V
| send delivery receipt via http
| |
| |
| V
| wait for read receipt
| |
| |
| V
| send read receipt via http
| |
| |
| V
| end
|
The challenge here is that if Thread J2 gets blocked (perhaps because system P is a bit slow), and thread J3 receives the read receipt whilst thread J2 is still in progress, I need to ensure that thread J3 does not acquire the process instance until thread J2 has released it.
I think that you are saying that I could model this in a different way, using tokens to ensure that the two async events are handled correctly (i.e. thread J2 will signal the "delivery" token and thread J3 will signal the "read" token. For example:
|
| start
| |
| |
| V
| send email via http
| |
| |
| V
| +------------------fork------------------+
| | |
| V V
| wait for delivery receipt wait for read receipt
| | |
| | |
| V V
| send delivery receipt via http send read receipt via http
| | |
| | |
| +------------------join------------------+
| |
| |
| V
| end
|
Have I understood you correctly?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197517#4197517
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197517
16 years, 2 months
[JBoss jBPM] - Gwt-console documentation Pls..
by mr.sathya
Hi All..
I am trying to develope a workflow for my client based on gwt-console.
For that i installed jbpm-3.3.0 using jbpm-installet-3.3.0.GA.
and i selected gwt-console as optional and server as jboss-4.2.3 GA
and mysql database.I created the users using scripts and after that i
am able to login jbpm-console.but not able login in Gwt-console.
Here is the Exception Box is coming after i entered username and password.
| Authentication failed.
| Not found
| The requested URL /gwt-console-server/rs/user/roles was not found on this server
|
1.whether i have to add any war or jar files for this logging?
2.Is any one has succeeded in this?
3.Is any documentation is there for this?
Pls guide me by giving proper suggestions or solutions..
sorry for reposting same questions bcoz i didnt get the solution...
Thanks in advance...
Regards,
Sathya
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197508#4197508
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197508
16 years, 2 months
[JBoss jBPM] - Using LDAP: can't assign tasks to users in group ...
by ardavan
Hi,
I am trying to hook up LDAP with jbpm. Therefore I have my own implementation of the ExpressionSession interface.
I also have an AssignmentHandler which extends ExpressionAssignmentHandler.
My problem: my task using: swimlane="manager" is assigned to 'null'.
This is how I set up my swimlanes in my processdefinition file:
<swimlane name="client">
| <assignment class='com.brighthorizons.jbpm.identity.ldap.MyLdapAssignmentHandler'>
| <expression>user(ardi)</expression>
| </assignment>
| </swimlane>
|
| <swimlane name="manager">
| <assignment class='com.brighthorizons.jbpm.identity.ldap.MyLdapAssignmentHandler'>
| <expression>group(groupTest)</expression>
| </assignment>
| </swimlane>
With the <expression>user(ardi)</expression> I have no issues but when I want to assign my task to the users in a group using <expression>group(groupTest)</expression> - jbpm assigns the taskInstance to null.
I have a public Group getGroupByName(String groupName) method that searches and finds the right group (LDAP)
then creates the group group = new Group(groupName, "");
Then lists all the members of that group and adds membership
| Attribute memberAttr = groupAttrs.get("uniquemember");for (NamingEnumeration memberValues = memberAttr.getAll(); memberValues.hasMore();)
| {
| String memberValue = memberValues.next().toString();
|
| User user;
| user = getUser(memberValue);
| System.out.println("user name from group:" + user.getName());
| Membership.create(user, group);
| System.out.println("membership created between:" + user.getName() +" and " + group.getName());
| }
|
I don't know what's wrong - I think I still don't understand the identity component of jbpm.
please help.
thank you
Ardi
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197455#4197455
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197455
16 years, 2 months
[JBoss jBPM] - Re: serialization or parallel in a tasknode
by kukeltje
anonymous wrote : but what they do are almost same. so i want to do it in one task-node, as co-signing does. If difficult to implement, i will change it to one person one task-node. Is it the correct way?
Again... you say you *want* it, but what is the process requirement...AND you say *almost* the same... then it is definitely not the the same task.
What you could try (but then you hide the sequence/parallel) stuff in code (which I do strongly advise against, since you could as well create all task individually via the api from plain javacode) is to not create all tasks at the same moment. but if one task finishes, on the task-end event create another task for someone new.... Again this is really dirty and I would not use a processdefinition for this but the api on a low level
anonymous wrote : I read JBPM doc, but i cant get any useful stuff in such situation.
| Could you tell me more?
Because what you want to do is dirty, uncommon, error-prone, hides 'flow' in javacode etc.... But I was not talking about this specific co-signing thing, I was talking about the fact that you could not see you could place a subprocess or something else in the foreachforkhandler....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197413#4197413
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197413
16 years, 2 months