[Catalyst] Catalyst + Class::Workflow

Tomas Doran bobtfish at bobtfish.net
Wed Feb 27 08:13:07 GMT 2008


On 26 Feb 2008, at 20:07, Christopher H. Laco wrote:
> That's where I struggle. Two seperate workflows makes sense to me.  
> But on the flip side, if it's one workflow, you have the ability to  
> look at 'temp' orders and find out where people bailed in the  
> checkout process based on the state of that order. But it's a  
> little harder to do the same if the checkout process is never saved  
> like an order is...even an incomplete order. It also brings more  
> possibilities to send people emails about un-submitted orders when  
> parts in that order go on sale, etc.

In $ork's schema a cart is just an order which doesn't have an order  
number yet.

This is totally crack-fuelled schema design IMO, however it *does*  
have all the advantages above (and means that people in a call center  
can pick up a customer's basket when they phone up, which is really  
important to us).

The best thought that I've had is that you need to be able to stack  
workflows into one another, so that a workflow can enter a state  
where it will delegate to the sub-workflow until you enter an 'exit'  
state in the sub-workflow...

This would enable you to have a parent 'what has to happen in an  
order' workflow, but allow you to plugin various different sub- 
workflows (e.g. getting the user's address from their pre-existing  
login or getting them to enter it so that you don't have to register  
to checkout). The value being that you can compose various different  
sub-workflows together trivially to create a custom 'shopping cart'  
work flow.

$ork's code, unfortunately, doesn't however do anything quite this  
smart or flexible in real life - most of the configurability is  
instead by having multiple possible states within the same workflow,  
and the state transitions / available states being changed on  
different sites to give an effect similar to this. This works, but is  
less flexible than it could be (e.g. you can't trivially pull one  
component out (e.g. address book) and replace it with another  
implementation).

Hope my random rambling sparks some thoughts/discussion, or is in  
some way useful ;)

Cheers
Tom




More information about the Catalyst mailing list