# Workflow plugin?

**URL:** <https://www.ruby-forum.com/t/workflow-plugin/135419>\
**Category:** Rails\
**Created:** [April 22, 2008, 1:49am UTC](https://www.ruby-forum.com/t/workflow-plugin/135419 "2008-04-22T01:49:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [April 22, 2008, 1:49am UTC](https://www.ruby-forum.com/t/workflow-plugin/135419/1 "2008-04-22T01:49:48Z")

</div>

Hi,

Is there a workflow plugin that exists for Rails? That is something  
that  
provides a workflow framework around how to manage state changes for an  
object/model (i.e. think of a complex state diagram that represents  
states  
and possible paths between states for a specific object/model).

Tks

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [April 22, 2008, 1:53am UTC](https://www.ruby-forum.com/t/workflow-plugin/135419/2 "2008-04-22T01:53:19Z")

</div>

Greg -

On 21-Apr-08, at 7:49 PM, Greg H. wrote:

> Hi,
> 
> Is there a workflow plugin that exists for Rails? That is something  
> that provides a workflow framework around how to manage state  
> changes for an object/model (i.e. think of a complex state diagram  
> that represents states and possible paths between states for a  
> specific object/model).
> 
> Tks

This will get you most of the way there -

[http://agilewebdevelopment.com/plugins/acts\_as\_state\_machine](http://agilewebdevelopment.com/plugins/acts_as_state_machine)

Jodi

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [April 22, 2008, 5:02am UTC](https://www.ruby-forum.com/t/workflow-plugin/135419/3 "2008-04-22T05:02:19Z")

</div>

thanks - I’m looking for something that supports creating validations  
back  
to the user if they try to make an update that doesn’t satisfy state  
criteria. For example if I have a model for personal expenses  
(“Expense”)  
and that if I want to transition it from PAID to BANK\_RECONCILED then I  
was  
to make sure that the BANK\_RECONCILED\_DATE field is populated before  
allowing this to proceed. So perhaps I really want something like:

- User updates an Expense and changes the status to BANK\_RECONCILED but  
doesn’t add a BANK\_RECONCILED\_DATE

- model update sees change in status and calls the “bank\_reconciled!”  
action

- this action either works, or else provides a set of validations back

Is this a reasonable approach? Or do people think it would be best to  
handle this with the normal Rails basic validation approach (i.e. and  
not  
use “acts\_as\_statemachine”)

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [April 22, 2008, 6:32am UTC](https://www.ruby-forum.com/t/workflow-plugin/135419/4 "2008-04-22T06:32:27Z")

</div>

On Tue, Apr 22, 2008 at 3:01 PM, Greg H.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> - this action either works, or else provides a set of validations back
> 
> Is this a reasonable approach? Or do people think it would be best to  
> handle this with the normal Rails basic validation approach (i.e. and not  
> use “acts\_as\_statemachine”)

Maybe this will provide some functionality you are looking for.

[http://openwferu.rubyforge.org/](http://openwferu.rubyforge.org/)
