Results 1 to 2 of 2

Thread: Configurable Workflows

  1. #1

    Thread Starter
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Configurable Workflows

    While researching on configurable workflows, I went through some readymade tools such as Windows Workflow or other opensource BPM/Workflow management tools. However one of my seniors suggested a (seemingly) simpler approach.

    Start with a file based configuration of how the workflow should be. For an order management module, at a very simple state, this includes storing the present state and the next state. Based on the present state of an order, it could be pushed into the next state or cancelled.

    This much is easy to implement. Now there's another requirement: When pushing an order from one state to another, there may be several things to be done. For e.g. generate an invoice, email the generated invoice to the client, make an entry in some table and so on and so forth. So there's the core action of updating the order state, and the supporting actions which make a complete business/use case.

    One of the ways the senior told us is to simply write the necessary method names in the configuration file. So if the order has to move from created state to the approved state, the file would also capture a list of methods (maybe fully qualified) to execute before the state changed, or after the state changed.

    How do I manage this?

    An example can be of a csv file with the following columns:

    ExistingState,NextState,MethodsToCallAfterStateChange
    Created,Approved,Order.AfterApproval()

    I know this is complex, but I need some simple way of getting this to work. The ensuing complexity can then be managed.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  2. #2
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,902

    Re: Configurable Workflows

    I'd be a little cautious about this statement:-
    "Based on the present state of an order, it could be pushed into the next state or cancelled"
    In my experience there may well be several possible "next states". Or it could loop back to a previous state. Workflows are generally directed graphs rather than linear functions. That said, if you can keep yours purely linear you'll make your life much easier so pitch for that if you can.

    How do I manage this?
    Achieve what?

    Are you asking how to lay it out in the file? If so I'd recommend a format that has some hierarchical structure e.g. xml because you're going to need to store an indefinite number of actions for each state transtion (as well as an indefinite number of condtions, outcomes and destination states if you find you need to implemet a directed graph). In fact I'd probably go further and store it in a DB if it was me but I'm probably biased by the fact that dbs are my strong point.

    Are you asking how to take that configuraton and run the apropriate method, in which case you want to bone up on reflection.

    Or are you asking something else I haven't thought of.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width