-
1. Re: Design, Business model and Jbpm integration
kukeltje May 22, 2007 7:09 AM (in response to jeanbobby)In 3.2 a businesskey can be added to the processinstance. So you can do it both ways. Add add the processinstance id (and maybe tokens if there is some forking) as a fk to your domain model or the other way around. Both work. I would only add a status to the domain if it is independent of the processes. e.g. getting a mortgage is a process (status: under request). Having one isn't (status: assigned(?), changing it is (status: choose one...) ;-))
-
2. Re: Design, Business model and Jbpm integration
jeanbobby May 22, 2007 8:12 AM (in response to jeanbobby)Thanks Ronald,
I checked the code and saw the key you're refering to :
public ProcessInstance loadProcessInstance(ProcessDefinition processDefinition, String key);
So, if I remove the status from the domain, and use that business key attribute to materialize the link between domain and process instance, what would be the elegant way of searching all the ITEMs in 'toBeValidated' Status (ie Node) ? :
Call a custom query on Jbpm, get the matching nodes and use the associated business keys to load the corresponding domain entities ?
I see that the API is rather Task oriented so I wonder if that would be a hint to another way of thinking this workflow integration.
Thanks for you advices,
Olivier -
3. Re: Design, Business model and Jbpm integration
jeanbobby May 24, 2007 10:48 AM (in response to jeanbobby)Up.
Any realworld experience with modeling and exploiting a domain entity' status as token's current state ? (including search/agregation, joining to the model and performance issues...) any feedback would be apreciated.
Thanks