Few more doubts - participants.rb

2 views
Skip to first unread message

pranav

unread,
Jun 5, 2009, 1:21:07 AM6/5/09
to Ruote (OpenWFEru) users
Hi,
I am using production environment to work with Ruote-web2
I am trying to run the LeaveRequest example.
I have created 3 users for launcher, boss and assistant.
Now when I launch the process with a user(other than admin) it
successfully launches.
But I have to register this user in participants.rb in order to make
it go ahead.
The problem is when I register two or more participants. It says
process launch failed. Although it prints the messages written in
these participants.
I checked the production logs. There seems to be no indication of any
error.
So if I remove the participants(and keep single participant) from
participants.rb, the same process gets launched.
I am not sure as to what needs to be written there.
It would be of great help if you could suggest how could I deal with
problem and successfully "proceed" through a simple LeaveRequest
"sequence" example.

Thanks & Regards
Pranav

John Mettraux

unread,
Jun 5, 2009, 1:34:13 AM6/5/09
to openwfe...@googlegroups.com
On Fri, Jun 5, 2009 at 2:21 PM, pranav <rpra...@gmail.com> wrote:
>
> I am using production environment to work with Ruote-web2
> I am trying to run the LeaveRequest example.
> I have created 3 users for launcher, boss and assistant.
> Now when I launch the process with a user(other than admin) it
> successfully launches.
> But I have to register this user in participants.rb in order to make
> it go ahead.

Hi Pranav,

please define the meaning of "make user go ahead"...

> The problem is when I register two or more participants. It says
> process launch failed. Although it prints the messages written in
> these participants.

I don't understand. Are you implying flatly that adding participants
to your engine by editing config/initializers/participants.rb and
restarting the web application makes any subsequent process launch
fail ?

> I checked the production logs. There seems to be no indication of any
> error.

Did you check log/production.log and log/ruote_production.log ?

> So if I remove the participants(and keep single participant) from
> participants.rb, the same process gets launched.
> I am not sure as to what needs to be written there.

> It would be of great help if you could suggest how could I deal with
> problem and successfully "proceed" through a simple LeaveRequest
> "sequence" example.

Please read this text : http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

Then provide me with detailed steps on how to reproduce your issue.


Best regards.

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

pranav

unread,
Jun 5, 2009, 3:06:24 AM6/5/09
to Ruote (OpenWFEru) users
Hi John,

Thanks for that interesting read :))
What I meant by "make user go ahead" was - Once I hit the proceed
button the workitem is cleared from my workitems list but the control
still seems to be in the same participant and the next user/
participant in sequence does not receive any workitem. This is not the
case if I have the user/participant(only one) registered in config/
initializers/participant.rb
Secondly, if I have two or more participants registered.. I am not
able to launch the process definition any more.
I checked log/ruote_production.log. I could not site any error
messages there.
Steps that I am following -

1. Create users
2. Change values of assistant and boss in the leave_request1.rb file
to the newly created user
3. Register participants in config/initializers/participant.rb
4. Launch the process with user corresponding to employee..

Hope this helps and sorry for the previously written incomplete
report.

Please suggest.


Thanks,
Pranav


On Jun 5, 10:34 am, John Mettraux <jmettr...@openwfe.org> wrote:

John Mettraux

unread,
Jun 5, 2009, 3:15:37 AM6/5/09
to openwfe...@googlegroups.com
On Fri, Jun 5, 2009 at 4:06 PM, pranav <rpra...@gmail.com> wrote:
>
> Thanks for that interesting read :))

...

> What I meant by "make user go ahead" was - Once I hit the proceed
> button the workitem is cleared from my workitems list but the control
> still seems to be in the same participant and the next user/
> participant in sequence does not receive any workitem. This is not the
> case if I have the user/participant(only one) registered in config/
> initializers/participant.rb

Does the process page (http://localhost:3000/processes/{wfid} where
wfid is the workflow isntance id of your process) indicate an error in
the process ?

> Secondly, if I have two or more participants registered.. I am not
> able to launch the process definition any more.

Please define "not able to launch the process definition any more". Do
your arms suddenly fall ?

> I checked log/ruote_production.log. I could not site any error
> messages there.
> Steps that I am following -
>
> 1. Create users

What are their names ?

> 2. Change values of assistant and boss in the leave_request1.rb file
> to the newly created user
> 3. Register participants in config/initializers/participant.rb

Please paste copy of participants.rb after "registration".

> 4. Launch the process with user corresponding to employee..

It seems you are describing two issues here, the problem is that you
are mixing the descriptions. Furthermore your descriptions are very
vague.

If you really want help please remember that a) I'm not sitting next
to you b) I can't read your mind c) I'm an engineer...

John Mettraux

unread,
Jun 5, 2009, 6:36:13 AM6/5/09
to openwfe...@googlegroups.com
On Fri, Jun 5, 2009 at 4:06 PM, pranav <rpra...@gmail.com> wrote:
>
> Steps that I am following -
>
> 1. Create users
> 2. Change values of assistant and boss in the leave_request1.rb file
> to the newly created user
> 3. Register participants in config/initializers/participant.rb
> 4. Launch the process with user corresponding to employee..

Quick note : you don't have to register participants for users.
Creating a group or a participant immediately allocates a "virtual"
participant for that person / group of persons.

You shouldn't need touching config/initializers/participants.rb

pranav

unread,
Jun 5, 2009, 8:08:03 AM6/5/09
to Ruote (OpenWFEru) users
Hi John,

Thanks a lot for the suggestion. Now we have setup everything afresh.
We haven't touched participants.rb mentioned.

For the below mentioned leave request process(leave_request1.rb), I am
facing some issues.

1. We have created users pranav, rekha, soham using admin login. Using
pranav , we are able to launch the process.
But problem which we are facing is that it doesn't proceed further
after emplyoee task ( even after clicking "proceed" button ). It is
showing "Wi" at Emplyoee task.

----------------------------------------------
#
# an example of a Ruby process definition, for a small
# leave request application.
#
class LeaveRequest1 < OpenWFE::ProcessDefinition

description "requesting some time off"
set :v => "employee", :value => "${launcher}"
set :v => "boss", :value => "soham"
set :v => "assistant", :value => "rekha"

sequence do

#
# the first participant is the employee (the user who
# launched the process)
#
employee

#
# now setting some fields that the assistant and perhaps
# the boss will fill.
#
set :f => "granted", :value => "false"
set :f => "not_enough_info", :value => "true"
set :f => "boss_should_have_a_look", :value => "false"

assistant

#
# if the assistant set the field 'boss_should_have_a_look',
# then the process will head to the boss desk
#
boss :if => "${f:boss_should_have_a_look}"

#
# employee gets the answer to his request
#
employee
end
end

-------------------------------------------
ruote_production.log has the following.

OpenWFE::FsPersistedEngine 's_engine' - new() --- engine started ---
1452
OpenWFE::ExpressionPool 's_expression_pool' - reschedule()
initiating...
OpenWFE::ExpressionPool 's_expression_pool' - reschedule() for (fei
0.9.21 engine ee ee 0 0 environment 0)...
OpenWFE::ExpressionPool 's_expression_pool' - reschedule() done. (took
9.99999046325684 ms)
OpenWFE::FsPersistedEngine 's_engine' - build_scheduler() version is
1.0.13
OpenWFE::CacheExpressionStorage 's_expression_storage' - new() size is
5000
OpenWFE::FsPersistedEngine 's_engine' - new() --- engine started ---
1452
OpenWFE::ExpressionPool 's_expression_pool' - reschedule()
initiating...
OpenWFE::ExpressionPool 's_expression_pool' - reschedule() for (fei
0.9.21 engine ee ee 0 0 environment 0)...
OpenWFE::ExpressionPool 's_expression_pool' - reschedule() for (fei
0.9.21 engine C:/Makarand/NetBeansProjects/RailsApplication2/public/
defs/leave_request1.rb LeaveRequest 1 20090605-hikajutoga employee
0.4.0)...
OpenWFE::ExpressionPool 's_expression_pool' - reschedule() for (fei
0.9.21 engine C:/Makarand/NetBeansProjects/RailsApplication2/public/
defs/leave_request1.rb LeaveRequest 1 20090605-hikajutoga environment
0)...
OpenWFE::ExpressionPool 's_expression_pool' - reschedule() done. (took
20.0002193450928 ms)
OpenWFE::ExpressionPool 's_expression_pool' - cancel() cannot cancel
missing (fei LeaveRequest 1 20090605-hikajutoga 0.3 set)
OpenWFE::ExpressionPool 's_expression_pool' - do_apply_reply() :reply
but cannot find (fei 0.9.21 engine C:/Makarand/NetBeansProjects/
RailsApplication2/public/defs/leave_request1.rb LeaveRequest 1
20090605-hikajutoga employee 0.4.)
OpenWFE::ExpressionPool 's_expression_pool' - do_apply_reply() :reply
but cannot find (fei 0.9.21 engine C:/Makarand/NetBeansProjects/
RailsApplication2/public/defs/leave_request1.rb LeaveRequest 1
20090605-hikonabopa employee 0.4.)

Thanks & Regards,
Pranav


On Jun 5, 3:36 pm, John Mettraux <jmettr...@openwfe.org> wrote:

John Mettraux

unread,
Jun 5, 2009, 8:12:59 AM6/5/09
to openwfe...@googlegroups.com
On Fri, Jun 5, 2009 at 9:08 PM, pranav <rpra...@gmail.com> wrote:
>
> Hi John,
>
> Thanks a lot for the suggestion. Now we have setup everything afresh.
> We haven't touched participants.rb mentioned.
>
> For the below mentioned leave request process(leave_request1.rb), I am
> facing some issues.
>
> 1. We have created users pranav, rekha, soham using admin login. Using
> pranav , we are able to launch the process.
> But problem which we are facing is that it doesn't proceed further
> after emplyoee task ( even after clicking "proceed" button ). It is
> showing "Wi" at Emplyoee task.

Does the process list an error ?

(cf http://groups.google.com/group/openwferu-users/msg/a7f35c40ef12d84e )

Reply all
Reply to author
Forward
0 new messages