Hi Lenya devs,

we have a problem in the current transaction handling.

Imagine the following scenario:

- A document is in the workflow state "authoring".

- Alice invokes a usecase which alters the workflow.

- The menubar is displayed on the workflow screens.

- The usecase comprises several steps, it is committed
  only after the last step.

- On the second screen, the workflow state of the document has
  already been changed to "review".

- This means that the menu item "publish" can be invoked,
  because the identity map is attached to the request and
  accessed by all components (no isolation of the active usecase).

- Invoking the menu item results in an error because the usecase
  hadn't been committed.


I see two solutions:

a) Do not allow to show the menu during usecase execution
   (equivalent to a model dialog box).

b) Don't access the repository documents via sources, but directly
   (a separate repository session for the active usecase).
   The RepositorySource wouldn't implement ModifiableSource anymore.

IMO (a) is just a workaround, (b) is the way to go.

WDYT?

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to