-
1. Re: Scheduled TaskInstances within a ProcessInstance?
kukeltje Mar 23, 2007 6:15 AM (in response to perrylucas)the jpdl processdefinition can be extended by custom elements. You can e.g. add an attribute 'estimatedManHours' to a task element and retrieve the processdefinition runtime and get this parameter. You currently have to turn of validation on the server side for this as the processdefinitionparser is not namespace aware (yet I hope, as does Koen and Tom but not Gavin).
-
2. Re: Scheduled TaskInstances within a ProcessInstance?
perrylucas Mar 23, 2007 8:50 AM (in response to perrylucas)Hmm, yeah I guess that makes sense... for some reason I had it set in my mind that since all the task instances for a process instance weren't created from the get go, that I wasn't going to be able to plan ahead, but obviously the process definition itself could be accessed runtime!
Thanks for the reminder. -
3. Re: Scheduled TaskInstances within a ProcessInstance?
kukeltje Mar 23, 2007 11:07 AM (in response to perrylucas)I'm going to propose to make the processdefinition parser namespace aware, so it can parse it's normal jpdl tags, but allows custom namespaces, so
<jpdl:task cust:estimatedManHours="10h"> ... </jpdl:task>
will be possible
Than, in the near future, Koen kan also add his gpd elements/attributes to it<jpdl:task gpd:x="10" gpd:y="20" cust:estimatedManHours="10h"> ... </jpdl:task>
-
4. Re: Scheduled TaskInstances within a ProcessInstance?
perrylucas Mar 23, 2007 9:26 PM (in response to perrylucas)it seems like a common thing to want to be able to do... for now i have tried adding the attributes i need to Task and that seems to be working well.
-
5. Re: Scheduled TaskInstances within a ProcessInstance?
kukeltje Mar 24, 2007 6:52 PM (in response to perrylucas)great that it works, could you make a small wiki page describing how you exactely achieved this? We'd appreciate that very much.
Ronald -
6. Re: Scheduled TaskInstances within a ProcessInstance?
perrylucas Mar 25, 2007 4:32 PM (in response to perrylucas)Ok - you should be able to find a mini tutorial here now: http://wiki.jboss.org/wiki/Wiki.jsp?page=CustomTasks
(Linked from the jbpm home wiki page under jbpm 3) -
7. Re: Scheduled TaskInstances within a ProcessInstance?
kukeltje Mar 26, 2007 4:56 AM (in response to perrylucas)Cool, thanks, I edited the page a little for readability.
Some small remarks: What you did now is extend the jbpm core in such a way that you have to manually change this each time a new jbpm core comes out.
It can be done in a non-intrusive way.
What you can do is just turn of validation on the server side when parsing processdefinitions (I don't know by hart how to do this) and runtime read the processdefinition from the database. It is a string then which can be converted to an xml document and custom attributes can be read. I'll try and find more on this tonight and add it to the wiki -
8. Re: Scheduled TaskInstances within a ProcessInstance?
wjm Mar 26, 2007 7:06 AM (in response to perrylucas)"perrylucas" wrote:
Ok - you should be able to find a mini tutorial here now: http://wiki.jboss.org/wiki/Wiki.jsp?page=CustomTasks
(Linked from the jbpm home wiki page under jbpm 3)
Thanks for doing that, it looks like a good start.
I'm wondering if it makes sense to mention something about an associated change of the jpdl xsd (jpdl-3.2.xsd) file to support the new element? -
9. Re: Scheduled TaskInstances within a ProcessInstance?
kukeltje Mar 26, 2007 9:54 AM (in response to perrylucas)Maybe not needed, but I'd like to point out that this is NOT default jbpm functionality (maybe not yet). So an xsd that supports this should be custom made as well.
-
10. Re: Scheduled TaskInstances within a ProcessInstance?
avbentem Mar 27, 2007 10:56 AM (in response to perrylucas)"kukeltje" wrote:
What you did now is extend the jbpm core in such a way that you have to manually change this each time a new jbpm core comes out. [..] What you can do is [..] runtime read the processdefinition from the database. It is a string then which can be converted to an xml document and custom attributes can be read.
Or, alternatively, does anyone know if there's a way to define "MyTask extends org.jbpm.taskmgmt.def.Task", and then make jBPM use that custom class rather than the original?
Arjan. -
11. Re: Scheduled TaskInstances within a ProcessInstance?
avbentem Mar 27, 2007 11:08 AM (in response to perrylucas)"kukeltje" wrote:
an xsd that supports this should be custom made as well
To disable validation see 18.4.1. Validation:When parsing a jPDL XML document, jBPM will validate your document against the jPDL schema when two conditions are met: first, the schema has to be referenced in the XML document like this
<process-definition xmlns="urn:jbpm.org:jpdl-3.2"> ... </process-definition>
And second, the xerces parser has to be on the classpath.
Arjan. -
12. Re: Scheduled TaskInstances within a ProcessInstance?
kukeltje Mar 27, 2007 11:10 AM (in response to perrylucas)Thank you....... there is even more in the docs than I am aware of :-)