Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: (OT) Work flow in Web based applications

by Ryszard (Priest)
on Nov 07, 2002 at 09:39 UTC ( [id://211025]=note: print w/replies, xml ) Need Help??


in reply to (OT) Work flow in Web based applications

This will need a little bit of working thru' but how about something like this as a starting point:
sub workflow { get workflow step from button or link selected. if (not step1) { %existing_detail = get stored details identified by unique session id of user %existing_detail .= new details $self->store(\%existing_detail) } my $page = $self->draw_page(page => workflowstep, params =>\%existing_detail); return $page } sub draw_page { my $wrkflwObj = Workflow->new(step=>$step, param=>\%existing_details +); return $wrkflwObj->output; #return the html }

So, the logic of your workflow's belong in your templates. You get to aggreate all the information the user supplies, and know which step the user wants to go to next. If the user wants to add a product, and the contact doesnt exist, you can take them to a step in the contact workflow, then return them to back to where they need to go.

Flexible, as you can extend the workflow in arbitrary ways.

draw_page could potentially call a library with the method being the step in the workflow, the library would then know exactly what information is needed then return back the html page.

Not really a down side, but you'd have to be careful how you manage the expiry of each set of \%existing_detail, ie if someone doesnt click the cancel button and walks away, then comes back a day later - should their day-old data be restored?

Potential downside, you'll have to be carefull how you manage multiple incomplete "actions" per user, ie if they are 1/2 way thru' the add product action and they want to go to the modify product workflow, what do you do?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://211025]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (8)
As of 2024-04-24 12:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found