State diagrams use



State diagrams use

From: octavian patrascoiu ^lt;opatrascoiu@yahoo.com>
Date: Sun 23 Apr 2006 - 15:05:54 BST
Message-ID: <20060423140554.74670.qmail@web37901.mail.mud.yahoo.com>
All,

I have encountered a less common use of state
diagrams. To me it looks at least strange. Here it
goes:

The system has the following behaviour:

1. The System needs to authorise every change that is
executed on a Business Entity A.
2. For create operations,  user inspects the 'new'
value and authorises the creation.
3. For update operations,a user inspects the 'new'
value and the 'old' value and authorises the
amendment.
4. For delete operations, a user looks at the 'old'
value and authorises the deletion.

So far so good. In order to describe the behaviour,
the modeller has attached the following states to A:
1. AWAITING_AUTHORISATION_CREATE
2. AWAITING_AUTHORISATION_AMEND
3. AWAITING_AUTHORISATION_DELETE
4. AUTHORISED.
The states look fine to me, it's just the the modeller
wants to attached them only to only to 'old' instances
and not to 'new' instances. This looks odd to me, as
there could be stateless instances of class A.

It seems more natural to wrap the 'old' and the 'new'
values in a Change and associate the state to it. This
will make the description of pre and post conditions
more natural. For example, for creations

pre: old = null (undefined), new = X
post: old = X, new = X or null (undefined) if it's
removed from the system.

Looking forward to your comments.

Octavian

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Received on Sun Apr 23 15:06:21 2006