graph loading

6 views
Skip to first unread message

Paul Lorenz

unread,
Jul 19, 2009, 11:21:52 PM7/19/09
to sarasvat...@googlegroups.com
Hi all,
 I have an idea for graph loading I wanted to see if anyone had feedback on.

Problem:
  Ensure that the latest process definitions are loaded when your application starts up.

Solution:
  Add a custom_id field to wf_graph Populate it with the hash of the process definition file. On startup, iterate over the process definitions files and compare their hashes with the hashes in the database. If the hash doesn't match, load the process definition.

Variation:
  Try to create a canonical form of the xml first, so that ordering, whitespace and line endings don't affect the hash.

cheers,
Paul

Paul Lorenz

unread,
Jul 20, 2009, 5:36:11 PM7/20/09
to sarasvat...@googlegroups.com
I implemented the variation, where the hash is built off of the XML objects. There is now a method on GraphLoader#loadNewAndChanged, that given a base directory, will load all process definitions that are new or have changed, in addition to any process definitions that rely on the new or updated process definitions.

cheers,
Paul
Reply all
Reply to author
Forward
0 new messages