-
1. Re: jbpm 4.1 - Task assignment
tcr Sep 23, 2009 12:05 PM (in response to makarandk502)Hi,
do you need to send the task to a limited number of users of dynamic number of users?
If fixed you could use a fork-task (1-n)- join combination. Each user would get a separate instance:<fork ...> <transition to="taskA"> <transition to="taskB"> <transition to="taskC"> <transition to="taskD"> </fork> <task name="taskA" formName="XYZ" assignee=""${nameofuser1}> <transition to="theJoin"> </task> .... [B,C,D] similar... <join> <transition to="end"> </join>
If you are looking for a dynamic solution you will probably need to implement some custom steps (this is what we are planning for a customer right now).
Maybe the following post helps:
http://www.infoq.com/articles/jBPM-user-interaction-patterns
Let me know if this helps.
Regards
Torsten -
2. Re: jbpm 4.1 - Task assignment
makarandk502 Sep 23, 2009 10:40 PM (in response to makarandk502)Hi,
Thanks for the reply.
I have tried exactly same fork/join approach using jBPM 4.1, JBOSS 5.0 etc
Can you please guide me in this ?
I am getting following errororg.jboss.resteasy.spi.UnhandledException: org.hibernate.LazyInitializationException: could not initialize proxy - no Session org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319) org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230) org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) root cause org.hibernate.LazyInitializationException: could not initialize proxy - no Session org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:86) org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:140) org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190) org.jbpm.pvm.internal.model.ExecutionImpl_$$_javassist_4.getId(ExecutionImpl_$$_javassist_4.java) org.jbpm.integration.console.ModelAdaptor.adoptTask(ModelAdaptor.java:147) org.jbpm.integration.console.TaskManagementImpl.adoptTasks(TaskManagementImpl.java:69) org.jbpm.integration.console.TaskManagementImpl.getAssignedTasks(TaskManagementImpl.java:49) org.jboss.bpm.console.server.TaskListFacade.getTasksForIdRef(TaskListFacade.java:99) sun.reflect.GeneratedMethodAccessor278.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117) org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260) org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232) org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166) org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) note The full stack trace of the root cause is available in the JBoss Web/2.1.1.GA logs. -------------------------------------------------------------------------------- JBoss Web/2.1.1.GA
jpdl attached :<?xml version="1.0" encoding="UTF-8" ?> - <process name="SubProcessFill" xmlns="http://jbpm.org/4.0/jpdl"> - <start g="214,171,31,24" name="start1"> <transition g="-43,-18" name="to fork1" to="fork1" /> </start> - <fork g="215,273,44,34" name="fork1"> <transition g="-44,-18" name="to task1" to="task1" /> <transition g="-44,-18" name="to task2" to="task2" /> <transition g="-44,-18" name="to task3" to="task3" /> </fork> <end g="229,568,33,16" name="end1" /> - <task assignee="peter" form="tcs/com/java/giveAppDetails.ftl" g="101,379,66,29" name="task1"> <transition g="-41,-18" name="to join1" to="join1" /> </task> - <task assignee="peter" form="tcs/com/java/giveAppDetails.ftl" g="222,378,47,27" name="task2"> <transition g="-41,-18" name="to join1" to="join1" /> </task> - <task assignee="peter" form="tcs/com/java/giveAppDetails.ftl" g="342,378,63,26" name="task3"> <transition g="-41,-18" name="to join1" to="join1" /> </task> - <join g="227,465,39,35" name="join1"> <transition g="-42,-18" name="to end1" to="end1" /> </join> </process>
----
-Regards
Makarand -
3. Re: jbpm 4.1 - Task assignment
tcr Sep 24, 2009 4:14 AM (in response to makarandk502)Hi,
one thing I see is that your end - state is missing. The join has a transition to "end1" which is not in your process def.
When does this exception come up? When you start the process, when completing a task?
Regards
Torsten -
4. Re: jbpm 4.1 - Task assignment
makarandk502 Sep 24, 2009 10:35 AM (in response to makarandk502)Hi,
Mistake from my part. New process definition with end-state is attached below. Still same error is coming.
After starting a process through jbpm console when I login as "peter" in jbpm-console, immediately I get the exception pasted in my previous message.
I could see that there is some issue with respect to fork to n tasks with taskforms in user forum discussions before but error was not the same which i have reported.
Please help me in this regard<?xml version="1.0" encoding="UTF-8"?> <process name="SubProcessFill" xmlns="http://jbpm.org/4.0/jpdl"> <start g="214,171,31,24" name="start1"> <transition g="-43,-18" name="to fork1" to="fork1"/> </start> <fork g="215,273,44,34" name="fork1"> <transition g="-44,-18" name="to task1" to="task1"/> <transition g="-44,-18" name="to task2" to="task2"/> <transition g="-44,-18" name="to task3" to="task3"/> </fork> <task assignee="peter" form="tcs/com/java/giveAppDetails.ftl" g="101,379,66,29" name="task1"> <transition g="-41,-18" name="to join1" to="join1"/> </task> <task assignee="peter" form="tcs/com/java/giveAppDetails.ftl" g="222,378,47,27" name="task2"> <transition g="-41,-18" name="to join1" to="join1"/> </task> <task assignee="peter" form="tcs/com/java/giveAppDetails.ftl" g="342,378,63,26" name="task3"> <transition g="-41,-18" name="to join1" to="join1"/> </task> <join g="227,465,39,35" name="join1"> <transition g="-42,-18" name="to end1" to="end1"/> </join> <end g="229,555,31,26" name="end1"/> </process>
-
5. Re: jbpm 4.1 - Task assignment
sebastian.s Sep 24, 2009 2:14 PM (in response to makarandk502)I cannot find the JIRA issue right now but this is an issue with the console which has been already fixed in the trunk. The fix will go into the 4.2 release I think.
-
6. Re: jbpm 4.1 - Task assignment
sebastian.s Sep 24, 2009 2:17 PM (in response to makarandk502)Okay, found it:
https://jira.jboss.org/jira/browse/JBPM-2544
Please check if this matches your problem. -
7. Re: jbpm 4.1 - Task assignment
makarandk502 Sep 24, 2009 11:54 PM (in response to makarandk502)Hi,
Thanks.
It is the same problem mentioned in
https://jira.jboss.org/jira/browse/JBPM-2544
I am in the development phase and deadlines are strict in my case.
Can I get patch/workaround for this issue ? It seems like that it is fixed and will be available in 4.2. But then due to strict deadlines, I can't wait for much time
-Regards
Makarand -
8. Re: jbpm 4.1 - Task assignment
sebastian.s Sep 25, 2009 1:58 AM (in response to makarandk502)As I understand there are 2 bugs which affect your problem. The problem wtih the engine which Joram mentioned in one of the comments here:
https://jira.jboss.org/jira/browse/JBPM-2544
Seems to be a a rather small change in the code. So you could get the 4.1 sources, make this change manually since you do not want the other changes which are in trunk and afterwards build from source.
As Joram mentioned this should make the exception gone away but as long as you do not update to console 1.2 you won't be able to see the process instances and tasks.
Regarding your deadline: I saw the date somehere, 4.2 is supposed to be released on November 1st I think. -
9. Re: jbpm 4.1 - Task assignment
kukeltje Sep 25, 2009 4:10 AM (in response to makarandk502)And you can always use the latest source from trunk, run all tests, do a functionality test on your application and if it works, just use that. Why not?
-
10. Re: jbpm 4.1 - Task assignment
sebastian.s Sep 25, 2009 5:48 AM (in response to makarandk502)Sure, if Ronald tells you so you can do this as well. Why not. :) I personally did not feel comfortable (not enough information, experience) about advising to use the trunk and gladly leave this to people with more competence like Ronald.
-
11. Re: jbpm 4.1 - Task assignment
kukeltje Sep 25, 2009 6:02 AM (in response to makarandk502)But keep in mind that this is my personal opinion, not one of the jBPM team.
I did it several times with different projects and it saved a lot of time patching and stuff...
BUT.... always go over the jira issues (open and closed) since it might be that a 'nightly' version can run when used in a clean install, but that it might *not* run as an upgrade.
The latter unfortunately currently is the case as Tom is working on replacing the id generator from 'native' to a provided one as I just found out. -
12. Re: jbpm 4.1 - Task assignment
makarandk502 Sep 25, 2009 9:15 AM (in response to makarandk502)Hi,
I am also not comfortable in using trunk.
Anyway will this problem solve if I run this process outside console ?
I mean using APIS.
Can I get this code so that I can get it done in my local version ?
Also is their any chance to get console 1.2 ?
-Regards
Makarand -
13. Re: jbpm 4.1 - Task assignment
sebastian.s Sep 25, 2009 9:27 AM (in response to makarandk502)As understood from Joram's description there won't be any exceptions but theire will be process instances and tasks missing which should be in their respective lists.
-
14. Re: jbpm 4.1 - Task assignment
kukeltje Sep 25, 2009 11:29 AM (in response to makarandk502)Funny, that many people are afraid of using trunk when all unit test are green, but do want to take a chance (and put (a lot of ) effort in it) to get an official release, try to find patches/diffs which might depend on other things solved (or not) and user that. But that is up to ecerybody else to decide.