Jörn Nettingsmeier schrieb:
Andreas Hartmann wrote:
Jörn Nettingsmeier schrieb:
Should the creation of a document require a workflow transition?

i did not talk about a transition, but a default state.

The versions are bound to transitions, not to states. I.e., a
version is only created when a transition is executed.

well, no need to change that. just extend this definition with "...or when the document is initially created." just one local change in the default document creator.

and, um, creation is a transition from non-being into being. all nice and constistent. (/me runs and hides)

:)

http://en.wikipedia.org/wiki/Deterministic_finite_state_machine

T : S × Σ → S

(if the Unicode doesn't make it: T : S x Sigma -> S)

But that's just a detail, the actual change doesn't affect the
state machine (it's just about internal version storage).

[...]

* someone edits it, and the workflow implementation figures, hey, someone is editing it, let's initiate a state transistion. oh wait, there is no state yet.

No, it is in the initial state.

i see. but that's even nicer. then nothing at all has to change in the workflow implementation. only the document creator has to be extended to create a state in it (which has to be the one with initial="true" in the workflow.xml of the document module). or am i missing something?

It's even easier. With the current implementation, the document is
automatically in the initial state. It just doesn't have a version
entry, which means the same. What we want instead is a version entry
which should be added automatically when a document is created, e.g.
the DocumentManagerImpl should invoke some initialize() method on
the DocumentWorkflowable. This doesn't change anything to the fact
that the document is in the initial workflow state, but it adds the
information when and who by [1] it was created.

[1] or "by whom" or whatever

-- Andreas


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

Reply via email to