version field in wf_process

1 view
Skip to first unread message

vince

unread,
Jun 22, 2009, 10:19:49 AM6/22/09
to sarasvati-wf-dev
Hi Paul,

Can you explain the purpose of that field?

Thanks
Vincent

Paul Lorenz

unread,
Jun 22, 2009, 11:28:56 AM6/22/09
to sarasvat...@googlegroups.com
Sure. It's there for optimistic locking. Hibernate has a facility where you can mark a numeric field as the 'version'. It will then make sure that the version is the same on update as it was when the entity was read in. If it's not, someone else has update the entity while you were working with it, and a StaleObjectException will be thrown.

You can do the same thing with regular jdbc, update wf_process set ... version=n+1 where version = n and if you get back 0 rows updated, you know the row was updated or deleted by someone else in the meantime.

cheers,
Paul

Vincent Kirsch

unread,
Jun 23, 2009, 2:40:51 AM6/23/09
to sarasvat...@googlegroups.com
Hi Paul,

Thanks. I thought it was some kind of versioning field like in the wf_graph table and that didn't really make sense to me :)

A quick update: sorry I was kind of mute for so long, but as you can guess I work on other things as well (integrating Sarasvati is just one of my tasks at work). That being said, I've kept working on it, but I shifted my attention a little bit from DB access issues (it's well under way but not finished yet) to process definition handling. Indeed, working with XML files as input doesn't fit with what I want to do, so I tweaked Sarasvati to be able to work with pretty much anything as input. Here again, it's not completely done but it's well under way too. That means I changed quite a few things in GraphLoader, XmlProcessDefinition and all of the XmlNode, XmlArc etc classes. The basic behaviour of the Xml... didn't change though. When I have a little more time I'll try to explain my ideas and what's done so far so you (I mean both of you) can possibly give some input on it. What I'll also probably do - if that's okay with you - is a kind of intermediary commit so you can see for yourself. Maybe I could create a temporary branch so we're sure that doesn't disrupt everything (it shouldn't but you're never too careful), because there are a certain number of classes that were changed and also created.

Let me know if you already have some remarks at this stage!

Cheers
Vincent

2009/6/22 Paul Lorenz <plo...@gmail.com>

Paul Lorenz

unread,
Jun 23, 2009, 10:10:19 AM6/23/09
to sarasvat...@googlegroups.com
Hi Vincent,
   Making Sarasvati more flexible in what input formats it allows certainly sounds like a reasonable goal. Whenever you're ready, just push it into a temporary branch, we'll run it through the review wringer :) and get it merged into trunk. Depending on how long I take with the documentation updates, we can probably get it into either RC3 or RC4.

Paul
Reply all
Reply to author
Forward
0 new messages