Using Domain Objects in the Process

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2011 08:30 AM
Hi
I have an “Investigate Customer” process where flows in the business process use information from the Customer domain object to make decisions as to the path the process should follow e.g. amount owed, country region, manual or electronic etc.
This customer object is a pre-existing and very complex object, persisted to/from an already existing database.
What is the best practice in terms of the information that I pass around the process? Should I pass the huge “Customer” object to the process as a variable or create another object that only contains the variables that the process needs to interrogate?
Another thought was to create the process with the “Customer Number” as the business key which would allow me to lookup and retrieve the current state of the customer, or possibly a process variable containing just the customer identifier. Any examples on how best to do this if it is the best approach?
Thanks,
James
I have an “Investigate Customer” process where flows in the business process use information from the Customer domain object to make decisions as to the path the process should follow e.g. amount owed, country region, manual or electronic etc.
This customer object is a pre-existing and very complex object, persisted to/from an already existing database.
What is the best practice in terms of the information that I pass around the process? Should I pass the huge “Customer” object to the process as a variable or create another object that only contains the variables that the process needs to interrogate?
Another thought was to create the process with the “Customer Number” as the business key which would allow me to lookup and retrieve the current state of the customer, or possibly a process variable containing just the customer identifier. Any examples on how best to do this if it is the best approach?
Thanks,
James
Labels:
- Labels:
-
Archive
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2011 10:25 AM
There is no wrong or one right way to do this. For JPA entities Activiti has a 'solution' where only the id is stored in activiti and the entity is loaded via the entitimanager it belongs to. In other cases you can mimic this by also storing the id (and maybe the class type) and having an el resolver that does the actual work, or load things in a base class of a service (which gets the id from a process variable)
But storing only those parts in the engine that are relevant often works very wel. So it is up to you
Just some random thoughts
But storing only those parts in the engine that are relevant often works very wel. So it is up to you
Just some random thoughts

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2011 10:44 AM
Thanks Ronald,
Any idea where I can find an example of how this is done?
Thanks,
James
… For JPA entities Activiti has a 'solution' where only the id is stored in activiti and the entity is loaded via the entitimanager it belongs to.
Any idea where I can find an example of how this is done?
Thanks,
James
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2011 03:44 AM
Would you be surprised if I said, read the fine manual? Oh and full examples are….. in the activiti examples…

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2011 03:55 AM
Hi Ronald,
Yea I know…lazy person here spotted that 10 minutes after putting up the post. Bit of a RTFM fault you might say.
Sorry forgot to update post and thanks again for the help,
James
Yea I know…lazy person here spotted that 10 minutes after putting up the post. Bit of a RTFM fault you might say.
Sorry forgot to update post and thanks again for the help,
James
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2011 05:33 AM

