Andreas Hartmann wrote:

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.


maybe I misunderstand, but shouldn't the workflow be a singleton and
and displayed should the current committed stated, which means if
a usecase is in transaction (e.g. authoring --> review), then authoring
should be displayed and not review.

Makes sense?

Michi


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]




--
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
[EMAIL PROTECTED]                        [EMAIL PROTECTED]


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

Reply via email to