Business Processes
Linas Vepstas
linas@linas.org
Sun, 25 Nov 2001 17:23:03 -0600
On Sun, Nov 25, 2001 at 05:13:37PM -0600, Linas Vepstas was heard to remark:
> On Sun, Nov 25, 2001 at 05:17:33PM -0500, Derek Atkins was heard to remark:
> >
> > The hard part is the your
> > is the state machine that walks users through the
> > various screens to enter the various (necessary) information into the
> > system.
>
> Lets see if I can cook up an example:
>
> # here is a list of states
> DEFINE STATES "Ordering_process"
> STATE "NewOrderForm"
> STATE "Approval"
> STATE "EditInvoice"
> STATE "EditBillOfLading"
> STATE "Close"
> END DEFINE STATES
>
> #maybe these are 'groups' not 'users'
> DEFINE USERS
> USER "Clerk"
> USER "Boss_Man"
> USER "Loading_Dock_Muscle"
> END DEFINE USERS
>
> # state transition rules.
> # I should define separate ACL's for viewing, as opposed to editing.
> # "" means 'start here' and * means wildcard.
> DEFINE TRANSITIONS
> FROM "" TO "NewOrderForm" GUI "MyGladeForm" ALLOW "Clerk", "Boss_Man"
> FROM "NewOrderForm" TO "Approval" GUI "GladeApproval" ALLOW "Boss_Man"
> FROM "Approval" TO "EditInvoice" GUI "GladeEditInv" ALLOW "Clerk", "BossMan"
> FROM "Approval" TO "EditBillOfLading" GUI "GladeLading" ALLOW "Loading_Dock_Muscle"
> FROM "Approval" TO "Close" GUI "CancelOrFinishGUI" ALLOW "Clerk"
> FROM "EditBillOfLading" TO "Close" GUI "FinishGUI" ALLOW "Loading_Dock_Muscle"
> FROM "Close" TO "EditInvoice" GUI "OoopsGUI" ALLOW *
> END DEFINE TRANSITIONS
I forgot to mention: although I wrote this as it it were an
ASCII config file, it doesn't have to be. It could be just
straight C. It would look just like
src/register/ledger-core/split-register-layout.c
Something that is so regular, so repetitive, so uniform, that its
begging to be a config file.
Of course, if you implement it as a C file, not a config file,
then gnucash would not be 'configurable'.
--linas
--
pub 1024D/01045933 2001-02-01 Linas Vepstas (Labas!) <linas@linas.org>
PGP Key fingerprint = 8305 2521 6000 0B5E 8984 3F54 64A9 9A82 0104 5933