Differences between revisions 3 and 4
Revision 3 as of 2008-09-30 12:36:01
Size: 1568
Editor: abr
Comment:
Revision 4 as of 2008-09-30 12:41:49
Size: 1640
Editor: abr
Comment:
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
The STATE datastream, present in all data objects are the key. To emulate a transaction, follow these steps:
Line 11: Line 10:
The transition between these three states can be seen here

attachment:StateTransition.jpeg



== Multiobject transactions ==

To emulate a transaction, follow these steps:

How to work without transactions

Fedora has no concept of transactions. There are situations where this is simply not good enough for the DOMS system. To get around this, we have built a system which gives us the most nessesary benefits of transactions.

Each data object must have a STATE datastream. This datastream has just one element, having one of three values.

  • published - The object is finished, and should be valid in regards to datamodel. The object can be harvested or indexed by other services
  • intermediate - The object is not ready for public dissemination. The validator will regard it as a valid object of any content models the object subscribes to, so relations to this object will be valid. The object will not be available for indexing or harvesting directly, but could be included in a bundle from another object.
  • draft - The object has just been made. Same as intermediate.

The transition between these three states can be seen here

attachment:StateTransition.jpeg

Multiobject transactions

To emulate a transaction, follow these steps:

  1. Ingest any new objects, with STATE=draft
  2. change the STATE of all involved objects with STATE=published to STATE=intermediate
  3. Perform all changes that must be performed
  4. Change the objects back to STATE=published. This will provoke a validation of the objects by the DOMS system. If the objects failed the validation, the STATE will not change

DOMS only try to enforce a structure on objects with STATE=published. By marking objects as intermediate, the system will disregard them, without losing the relations to them.

FedoraTransactionsReplacement (last edited 2010-03-17 13:08:49 by localhost)