Reporting against process task progress

39 views
Skip to first unread message

Damon Torgerson

unread,
May 4, 2012, 1:35:25 AM5/4/12
to openwfe...@googlegroups.com
Hi,

I've been looking for a few hours and can't seem to find what is probably very basic.

I would like to report on all the processes that are currently in a particular state.

For example, given this process defintion

    p = Ruote.process_definition :name => 'Transfer' do
      sequence do
        reviewer :task => 'verify information', :description => 'Verify basic information'
        approver :task => 'assign transfer', :description => "Select the location"
        reviewer :task => 'confirm transfer', :description => 'Admin approval or denial.'
        email_system :task => 'email approval letter', :if => '${f.state} == approved', :description => 'Approval email'
      end
    end

I would like to know how many processes are waiting to have information verified, a transfer assigned, or a transfer confirmed.

Eg.

verify information: 20,
assign transfer: 30,
confirm transfer: 40

It seems that using the by_field method in storage participant helps me achieve this outcome but I can't figure it out. It seems like this is pretty straightforward stuff. What am I missing?

Really enjoying Ruote and all the efforts put into the project!

Sincerely,
Damon

John Mettraux

unread,
May 4, 2012, 3:18:14 AM5/4/12
to openwfe...@googlegroups.com

On Thu, May 03, 2012 at 10:35:25PM -0700, Damon Torgerson wrote:
>
> I would like to report on all the processes that are currently in a
> particular state.
>
> (...)
>
> I would like to know how many processes are waiting to have information
> verified, a transfer assigned, or a transfer confirmed.
>
> (...)
>
> It seems that using the by_field method in storage participant helps me
> achieve this outcome but I can't figure it out. It seems like this is
> pretty straightforward stuff. What am I missing?
>
> Really enjoying Ruote and all the efforts put into the project!

Hello Damon,

I've played with a gist: https://gist.github.com/2592808

Effectively, you can't state "params.task" has the #by_field first argument.

I will add a #by_param to the storage participant. For your first question
I'd suggest using the technique shown in the gist.

Please tell me if it doesn't match your requirements or if your storage is
unhappy with that.


I hope it will help, best regards,

--
John Mettraux - http://lambda.io/jmettraux

Damon Torgerson

unread,
May 4, 2012, 7:54:36 PM5/4/12
to openwfe...@googlegroups.com
John,

Thank you so much for this! I was really just looking for a pointer to an existing function or "it doesn't exist...sorry" and would have been happy to muddle through. Not only did you go above and beyond but you provided me an improved understanding of ruote.

Thanks again!

Sincerely,
Damon
Reply all
Reply to author
Forward
0 new messages