-
1. Re: jBPM or pages.xml overloading / extending / composition
avbentem Jun 28, 2007 3:49 AM (in response to utiba_davidr)utiba_davidr Joined: Sat Jun 23, 2007 08:52 AM
First of all: welcome to the JBoss forums. The subject of your question is promising!
But...
I don't know about the other members, but in general I have a strong objection against posting the very same question in multiple forums. A usenet-like "cross-posting" might be alright to some, but is different than posting the very same thing as separate topics in multiple forums. The latter implies that people might spend their time typing the very same answer that someone else already gave elsewhere. Or, for your own benefit: it may also imply that wrong answers are not noticed by people who only read the topic in the other forum(s).
So, I guess this very topic should continue at the very same topic in the Seam forum, in which a few replies have already been given, posted Wed Jun 27, 2007 23:35 PM.
Cheers,
Arjan. -
2. Re: jBPM or pages.xml overloading / extending / composition
avbentem Jun 28, 2007 4:09 AM (in response to utiba_davidr)Oops, excuse me for my previous reply. I did not yet dive into the posts in the Seam forum, and apparently in that specific topic you and Gavin King decided that this question was better asked in the jBPM forum -- and you even linked here. Good!
So: I hope you'll find your answer here. At least my erroneous comments make your topic move up in the list of topics...
Sorry,
Arjan. -
3. Re: jBPM or pages.xml overloading / extending / composition
kukeltje Jun 28, 2007 4:59 AM (in response to utiba_davidr)Don't know about extending and overloading but pageflow composition (http://jira.jboss.com/jira/browse/JBSEAM-157 ?) would be an option. What I personnaly would like is a dynamic processcomposition. This way you can have one big main process, but runtime decide which subprocess to load for a specific user. Would that solve your problem or would overloading/extending of subprocesses still be required?
-
4. Re: jBPM or pages.xml overloading / extending / composition
damianharvey Jun 28, 2007 5:04 AM (in response to utiba_davidr)Dynamic process composition would be very useful. Is this something that is being worked on? Is there any way to achieve the same effect with the current release?
Thanks,
Damian. -
5. Re: jBPM or pages.xml overloading / extending / composition
kukeltje Jun 28, 2007 5:08 AM (in response to utiba_davidr)"damianharvey" wrote:
No
Dynamic process composition would be very useful. Is this something that is being worked on?"damianharvey" wrote:
Is there any way to achieve the same effect with the current release?
No, not as far as i know
Please file a jira issue for this. -
6. Re: jBPM or pages.xml overloading / extending / composition
kukeltje Jun 28, 2007 7:07 AM (in response to utiba_davidr)Correction.... there is something like a customsubprocessresolver... that can be used to achieve this. Look at the testcases in the source!!!
-
7. Re: jBPM or pages.xml overloading / extending / composition
kukeltje Jun 28, 2007 8:57 AM (in response to utiba_davidr)But.... see
http://jira.jboss.com/jira/browse/JBPM-1004
I already implemented this... committing will be tonight -
8. Re: jBPM or pages.xml overloading / extending / composition
kukeltje Jun 28, 2007 9:06 AM (in response to utiba_davidr)if you want it now, apply this patch to the source of 3.2.1
### Eclipse Workspace Patch 1.0 #P jbpm.3-clean Index: jpdl/jar/src/main/java/org/jbpm/graph/node/ProcessState.java =================================================================== RCS file: /cvsroot/jbpm/jbpm.3/jpdl/jar/src/main/java/org/jbpm/graph/node/ProcessState.java,v retrieving revision 1.3 diff -u -r1.3 ProcessState.java --- jpdl/jar/src/main/java/org/jbpm/graph/node/ProcessState.java 15 Nov 2006 12:51:07 -0000 1.3 +++ jpdl/jar/src/main/java/org/jbpm/graph/node/ProcessState.java 28 Jun 2007 13:04:57 -0000 @@ -62,6 +62,7 @@ import org.jbpm.graph.exe.Token; import org.jbpm.graph.log.NodeLog; import org.jbpm.graph.log.ProcessStateLog; +import org.jbpm.jpdl.el.impl.JbpmExpressionEvaluator; import org.jbpm.jpdl.xml.JpdlXmlReader; import org.jbpm.jpdl.xml.Parsable; @@ -147,9 +148,14 @@ ) { SubProcessResolver subProcessResolver = getSubProcessResolver(); List attributes = new ArrayList(); - attributes.add(new FlyweightAttribute("name", subProcessName)); + String subProcessNameResolved = (String) JbpmExpressionEvaluator.evaluate(subProcessName, executionContext); + if (log.isDebugEnabled()) { + log.debug("SubProcessName after eval: " + subProcessNameResolved); + } + attributes.add(new FlyweightAttribute("name", subProcessNameResolved)); Element subProcessElement = new DefaultElement("sub-process"); subProcessElement.setAttributes(attributes); + usedSubProcessDefinition = subProcessResolver.findSubProcess(subProcessElement); }
-
9. Re: jBPM or pages.xml overloading / extending / composition
kukeltje Jun 28, 2007 9:11 AM (in response to utiba_davidr)ahh... what the h.... already committed, INCLUDING a testcase
-
10. Re: jBPM or pages.xml overloading / extending / composition
damianharvey Jun 28, 2007 9:19 AM (in response to utiba_davidr)Thanks. Speedy stuff.
-
11. Re: jBPM or pages.xml overloading / extending / composition
kukeltje Jun 28, 2007 9:26 AM (in response to utiba_davidr)This is all due to the very flexible design of jbpm (and it will be even better for the 4.0 release). Docs still need updating though... (but that is also true for the late binding etc..
-
12. Re: jBPM or pages.xml overloading / extending / composition
kukeltje Jun 28, 2007 9:29 AM (in response to utiba_davidr)uhmm... one thing... this is only for subprocesses in jpdl... not for pageflow yet!!!
-
13. Re: jBPM or pages.xml overloading / extending / composition
utiba_davidr Jul 1, 2007 9:07 PM (in response to utiba_davidr)Does this mean that there is not as yet a solution to my problem? Or does it mean I should tackle my problem differently in the mean time? If so, would you be able to kindly provide an example of how you would tackle based on the following scenario:
At the product layer we have say, a page that allows you to update a customers details. The outcomes are "update", "delete" and "view history". A particular client wants to redefine the process and page flow slightly: They want to; add a new outcome to the page "add note", remove an outcome "view history" and modify the process/page flow for the delete outcome to capture a deletion reason (so, an interim page in the flow for that other process). Essentually:
Change:/user_info.seam -> update -> delete -> confirm (/delete_user_confirm.seam) -> view history (/view_user_history.seam)
To:/user_info.seam -> update -> delete -> delete reason (/site/delete_user_reason.seam) -> confirm (/delete_user_confirm.seam) -> add note (/site/add_user_note.seam)
It's a fairly stupid example, and would probably be tackled differently/better in a real layout - But, the example demonstrates all layers that I need to be able to override.
Cheers,
David -
14. Re: jBPM or pages.xml overloading / extending / composition
utiba_davidr Jul 1, 2007 9:08 PM (in response to utiba_davidr)Also, thanks for being so helpful and responsive. Sorry to have taken so long to respond, things have been a little hectic.
Cheers,
David