Hello, I am working on a project refactoring that I believe will benefit from ruote + state_machine. At a high level this application is a message broker between two systems that are sending Order information between each other. Orders originate from a Store, and are destined for a Warehouse. Communications is usually via WebService calls.
There are many Stores, and many Warehouses within the system, each having their own endpoint. Here is an overview of the Order lifecycle, annotated with the various states of the order. # 1. Cron job, pull orders from Store every 5 min, persist to db => 'New' # 2. Kick off workflow engine (send to Warehouse) # Step 1: Process order (business logic, filterning/transformations) => 'Processed' # Step 2: Send order to Warehouse => 'Sent to Fulfillment' # Step 3. Acknowledge (to Store) order sent => 'Open' # 3. Cron Job, pull order status from Warehouse every 15 minutes, presist tracking => 'Shipped' # 4. Kick off workflow engine (send to Store) # Step 1. Send tracking information to Store => 'Notified Shipped' # Step 2. Acknowledge (to Store) order closed => 'Closed' With the exception of the 'Process Order' step, there is no human interaction required, the system just runs in the background. The 'Process Order' step may require human interaction if there is a failure within this step. So, after reading through many of the docs there are a couple questions that I have. 0. Is the lifecycle I've described a good use case for Ruote? It seems to address some of the limitation I was seeing when trying a pure state_machine approach. 1. Would this be considered a single Process definition or two distinct definitions? Who/What would be the Participants? It seems like Participants describe tasks/actions and not Players, since there can only be one action. 2. How can I handle error workflows. Say that an order fails at a particular step, how can I send an e-mail alert? 3. I am a bit confused about how threading works for the Workers. Say for example, I have 10 orders, that are at various points within the life-cycle. Is there any blocking happening? What I am concerned about is the throughput of completing a workflow given that there is minimal human interaction. 4. Would this be an acceptable implementation for a Participant to send an Order to a Warehouse? 5. Is it recommended that I run the ruote engine within a Rails application, or kick it out into its own process? How would that change the interaction of the participants since it still needs to access data which is in the rails application? def on_workitem Warehouse.find(workitem.fields['warehouse_id']).send_order(workitem.fields['order_id']) end Thanks, Karl -- you received this message because you are subscribed to the "ruote users" group. to post : send email to [email protected] to unsubscribe : send email to [email protected] more options : http://groups.google.com/group/openwferu-users?hl=en
