How to "proceed" to next participant in ruote-web2

9 views
Skip to first unread message

pranav

unread,
May 21, 2009, 6:50:15 AM5/21/09
to Ruote (OpenWFEru) users
Hi John,

Now that I was able to launch a process definition -
http://groups.google.com/group/openwferu-users/browse_thread/thread/4d7fcb0cab66e363
I have one more doubt..
How do I "proceed" to the next participant once my process definition
is launched? It sits in the first participant after the launch. The
workitems page does not show any activity associated or any other
mechanism to move ahead.
My process definition is -

class ProcDef < OpenWFE::ProcessDefinition

description "WELCOME TO THE DESERT OF REAL"

sequence do
participant :first_participant
participant :second_participant
end

engine = OpenWFE::Engine.new(:remote_definitions_allowed => true)
engine.register_participant 'first_participant' do |workitem|
puts 'first participant'
workitem.fields['message'] = 'hello from first participant !'
end
engine.register_participant 'second_participant' do |workitem|
puts 'second participant'
puts "the message says '#{workitem.fields['message']}'"
end

end


I am new to this so please tell me if I am missing anything
fundamental. Also, I am trying to understand how the overall scheme of
ruote-web2 + process definition + users + groups is working..

Thanks in advance,
Pranav

John Mettraux

unread,
May 21, 2009, 7:04:22 AM5/21/09
to openwfe...@googlegroups.com

Hi Pranav,

why are you embedding an engine instantantiation + participant
registration inside of a process definition ? There are no such
examples in the documentation... Ruote is an interpreter for process
definition, it's not the task of the process definition to instantiate
the engine.

Since you are using ruote-web2, ruote-web2 does the job of running the
ruote engine for you.

If you need to register participants, you can do it under
config/initializers/participants.rb but that will require a restart of
ruote-web2.


> I am new to this so please tell me if I am missing anything
> fundamental. Also, I am trying to understand how the overall scheme of
> ruote-web2 + process definition + users + groups is working..

In ruote-web2, participants names are automatically mapped to user or
group names. If for example of have a user "alice" and a group
"authors", this process definition :

---8<---
OpenWFE.process_definition :name => 'sample' do
sequence do
alice
authors
end
end
--->8---

Will deliver a workitem to Alice and then to the authors group. You
won't need to register any participant as long as the the user and the
group exist.

Not that for proceeding a workitem in ruote-web2, you simply locate
the workitem under /workitems, click on it, then hit the "proceed"
button.


Best regards,

--
John Mettraux - http://jmettraux.wordpress.com

pranav

unread,
May 21, 2009, 7:57:04 AM5/21/09
to Ruote (OpenWFEru) users
Hi John,

I was basically trying to get it running.. Now, I know what should go
inside the process definition.
So, I have created a user pranav and a process definition -
OpenWFE.process_definition :name => 'sample' do
sequence do
pranav
end
end
Once I launch this process definition and login as pranav, I see it
in /workitems but I don't get a proceed button..
Im missing something conceptually fundamental.. Please help..

Pranav

On May 21, 4:04 pm, John Mettraux <jmettr...@openwfe.org> wrote:
> On Thu, May 21, 2009 at 7:50 PM, pranav <rprana...@gmail.com> wrote:
>
> > Now that I was able to launch a process definition -
> >http://groups.google.com/group/openwferu-users/browse_thread/thread/4...

John Mettraux

unread,
May 21, 2009, 8:29:33 AM5/21/09
to openwfe...@googlegroups.com
On Thu, May 21, 2009 at 8:57 PM, pranav <rpra...@gmail.com> wrote:
>
> Once I launch this process definition and login as pranav, I see it
> in /workitems but I don't get a proceed button..
> Im missing something conceptually fundamental.. Please help..

Hello Pranav,

you have to click on the workitem to enter into /workitems/xxxxx/yyy

The proceed button is in that screen.

pranav

unread,
May 21, 2009, 9:14:37 AM5/21/09
to Ruote (OpenWFEru) users
Hi John,

I had done the exact same thing.. I am at http://localhost:3000/workitems/20090521-homiruhoga
I should be able to see a proceed button here.. All that I get is
wfid workflow since expid store participant
activity 1 workitems
20090521-homiruhoga sample 0 19m 0.0.0 pranav pranav
If I click on to workflow i.e. sample 0 then I get the following error
-

ActiveRecord::ActiveRecordError: Unknown column 'ar_workitems.wf_name'
in 'where clause': SELECT * FROM `ar_workitems` WHERE
(`ar_workitems`.`store_name` IN ('pranav','unknown','team a') AND
`ar_workitems`.`wf_name` = 'sample') ORDER BY dispatch_time DESC
LIMIT 0, 30

Clicking on any other item, same screen is shown :(
Please help..

Pranav

On May 21, 5:29 pm, John Mettraux <jmettr...@openwfe.org> wrote:

John Mettraux

unread,
May 21, 2009, 9:25:43 AM5/21/09
to openwfe...@googlegroups.com
On Thu, May 21, 2009 at 10:14 PM, pranav <rpra...@gmail.com> wrote:
>
> I had done the exact same thing.. I am at http://localhost:3000/workitems/20090521-homiruhoga
> I should be able to see a proceed button here.. All that I get is
> wfid                    workflow        since   expid   store   participant
>        activity        1 workitems
> 20090521-homiruhoga     sample 0        19m     0.0.0   pranav  pranav

you really don't see any "show | edit | pick" buttons ? Does an error
appear in the Rails log when this page gets rendered ?


> If I click on to workflow i.e. sample 0 then I get the following error
>

> ActiveRecord::ActiveRecordError: Unknown column 'ar_workitems.wf_name'
> in 'where clause': SELECT * FROM `ar_workitems` WHERE
> (`ar_workitems`.`store_name` IN ('pranav','unknown','team a') AND
> `ar_workitems`.`wf_name` = 'sample')  ORDER BY dispatch_time DESC
> LIMIT 0, 30
>
> Clicking on any other item, same screen is shown :(

OK, I fixed this "wf_name" issue :

http://github.com/jmettraux/ruote-web2/commit/93dffd25cd61dd3f97f40fb224c783fadc948eef

Thanks a lot for reporting it.

pranav

unread,
May 22, 2009, 2:51:24 AM5/22/09
to Ruote (OpenWFEru) users
Hi John,

This is kinda surprising.. I was able to launch process definition and
was facing the above mentioned error.. Then I downloaded this patch
and tried to get the proceed button.. But instead the "ActiveRecord no
connection" error has returned to haunt me.. I don't think it would be
this patch as it was a minor fix. But still I reverted back to the
previous version and tried to setup an entirely new project. But that
also didn't help.
So, I was wondering if the "no connection" error had been actually
resolved. If not, then how come it was working for some time and now
it is not..
Is it something to do with my jdbcmysql adapter? What is causing this
unstable behavior(Sometimes /workitems page comeup.. sometimes it
shows the error page)?


Please help

Thanks
Pranav

On May 21, 6:25 pm, John Mettraux <jmettr...@openwfe.org> wrote:
> On Thu, May 21, 2009 at 10:14 PM, pranav <rprana...@gmail.com> wrote:
>
> > I had done the exact same thing.. I am athttp://localhost:3000/workitems/20090521-homiruhoga
> > I should be able to see a proceed button here.. All that I get is
> > wfid                    workflow        since   expid   store   participant
> >        activity        1 workitems
> > 20090521-homiruhoga     sample 0        19m     0.0.0   pranav  pranav
>
> you really don't see any "show | edit | pick" buttons ? Does an error
> appear in the Rails log when this page gets rendered ?
>
> > If I click on to workflow i.e. sample 0 then I get the following error
>
> > ActiveRecord::ActiveRecordError: Unknown column 'ar_workitems.wf_name'
> > in 'where clause': SELECT * FROM `ar_workitems` WHERE
> > (`ar_workitems`.`store_name` IN ('pranav','unknown','team a') AND
> > `ar_workitems`.`wf_name` = 'sample')  ORDER BY dispatch_time DESC
> > LIMIT 0, 30
>
> > Clicking on any other item, same screen is shown :(
>
> OK, I fixed this "wf_name" issue :
>
>  http://github.com/jmettraux/ruote-web2/commit/93dffd25cd61dd3f97f40fb...

John Mettraux

unread,
May 22, 2009, 8:07:06 AM5/22/09
to openwfe...@googlegroups.com
On Fri, May 22, 2009 at 3:51 PM, pranav <rpra...@gmail.com> wrote:
>
> This is kinda surprising.. I was able to launch process definition and
> was facing the above mentioned error.. Then I downloaded this patch
> and tried to get the proceed button.. But instead the "ActiveRecord no
> connection" error has returned to haunt me.. I don't think it would be
> this patch as it was a minor fix. But still I reverted back to the
> previous version and tried to setup an entirely new project. But that
> also didn't help.

Hello,

as I said in one of my emails, I could reproduce your "no connection"
issue, but had not had time to investigate it yet. I was quite
surprised and happy the error vanished for you. Now it's back, I guess
I will try again (but for personal reasons, I won't probably be able
to do much before next month).

> So, I was wondering if the "no connection" error had been actually
> resolved. If not, then how come it was working for some time and now
> it is not..
> Is it something to do with my jdbcmysql adapter? What is causing this
> unstable behavior(Sometimes /workitems page comeup.. sometimes it
> shows the error page)?

I have no idea. I will investigate.


Best regards,

pranav

unread,
May 25, 2009, 2:11:17 AM5/25/09
to Ruote (OpenWFEru) users
Hi John,

Could you give me some pointers to investigate?
I will try to see if I could also find some solution.

Thanks
Pranav

On May 22, 5:07 pm, John Mettraux <jmettr...@openwfe.org> wrote:

John Mettraux

unread,
May 25, 2009, 9:08:41 AM5/25/09
to openwfe...@googlegroups.com
On Mon, May 25, 2009 at 3:11 PM, pranav <rpra...@gmail.com> wrote:
>
> Could you give me some pointers to investigate?
> I will try to see if I could also find some solution.

Sorry, I'm afraid the only pointer I can give you is the error message
you are receiving.


Good luck,

pranav

unread,
May 28, 2009, 5:06:53 AM5/28/09
to Ruote (OpenWFEru) users
Hi John,

Good news!!
The entire setup is working fine with MS SQL Server w/o any errors
ONLY in "Production Environment"
I am clueless and I believe only you can infer.

Thanks and Regards,
Pranav


On May 25, 6:08 pm, John Mettraux <jmettr...@openwfe.org> wrote:

John Mettraux

unread,
May 28, 2009, 8:47:47 AM5/28/09
to openwfe...@googlegroups.com
On Thu, May 28, 2009 at 6:06 PM, pranav <rpra...@gmail.com> wrote:
>
> Good news!!
> The entire setup is working fine with MS SQL Server w/o any errors
> ONLY in "Production Environment"
> I am clueless and I believe only you can infer.

Excellent piece of information. I will take a look at the jdbc / mysql
adapter maybe.


Thanks !

pranav

unread,
May 28, 2009, 9:53:23 AM5/28/09
to Ruote (OpenWFEru) users
It is working fine even with MySQL.
I see that the problem is only with 'development' environment setup.

Pranav

On May 28, 5:47 pm, John Mettraux <jmettr...@openwfe.org> wrote:

pranav

unread,
May 29, 2009, 5:56:09 AM5/29/09
to Ruote (OpenWFEru) users
Hi,

Now that the setup is complete, I am able to launch a process and see
the proceed button
Firstly my setup -
I have created a user pranav and have defined the following process -

OpenWFE.process_definition :name => 'TwoStep' do
sequence do
pranav
bob
end
end

I have some doubts -
1. Can a user, other than admin, launch a process instance defined by
admin or possibly someone else? In the current setup launch link is
not active for a user.
2. Once I launch the process and hit the "proceed" button the workitem
is cleared from the workitems list but it does not move to next
participant until I login as an admin and cancel the expression
associated with the participant. I have less information about ruote-
expression and I haven't written anything inside the expression except
for print. How can I avoid this cancellation of expression? What
should I write in the expression field of user(mapped to a participant
in ruote-web2) pranav? Or even in the case of LeaveRequest example..
How should the control move from employee to assistant without admin
canceling the expression associated with employee?

Thanks & Regards,
pranav

John Mettraux

unread,
May 29, 2009, 8:14:10 AM5/29/09
to openwfe...@googlegroups.com
On Fri, May 29, 2009 at 6:56 PM, pranav <rpra...@gmail.com> wrote:
>
> Hi,
>
> Now that the setup is complete, I am able to launch a process and see
> the proceed button
> Firstly my setup -
> I have created a user pranav and have defined the following process -

Hello Pranav,

I would really appreciate if you would ask your question in a new
thread since it's not directly related to your initial issue.

Doing so will make it easier for the other people reading the list to
find information.


Thanks in advance.

Reply all
Reply to author
Forward
0 new messages