Hi John,

I wanted to make sure I was using the latest versions so this is what I did...

1. ruote-rest project: git pull (no changes)
2. rake ruote:install
3. launch the following process definition:

class Test0 < OpenWFE::ProcessDefinition
  sequence do
    participant :ref => "alpha"
    cancel_process :if => '${f:_action} == cancel'
    concurrence do
      participant :ref => "bravo"
      participant :ref => "charly"
    end
  end
end

4. proceed the first participant (3 different cases)


    4-1. NOT providing "_action" field in the workitem produces this
trace in 'logs/ruote_development.log':

    OpenWFE::CancelProcessExpression - do_eval_condition() e :
    parse error on value s("==") (tEQ)
    OpenWFE::CancelProcessExpression - to_boolean() o is _false_ => false
    OpenWFE::ConcurrenceExpression - new() merge_type is 'mix'
    OpenWFE::ConcurrenceExpression - ready() called by  (fei Test 0
20090918-gedadenodi 0.0.2 concurrence)  0 wi waiting



    4-2. providing "_action":"cancel" in the workitem, seems to work
properly, process is canceled, and the log shows:

    OpenWFE::CancelProcessExpression - to_boolean() o is _true_ => true
    OpenWFE::ExpressionPool 's_expression_pool' - cancel_process()
'20090918-genojuyodo'
    OpenWFE::ExpressionPool 's_expression_pool' - cancel() for  (fei
Test 0 20090918-genojuyodo 0 process-definition)
    OpenWFE::ExpressionPool 's_expression_pool' - cancel() for  (fei
Test 0 20090918-genojuyodo 0.0 sequence)
    OpenWFE::ExpressionPool 's_expression_pool' - cancel() for  (fei
Test 0 20090918-genojuyodo 0.0.1 cancel-process)



    4-3. providing "_action":"cancel2" in the workitem produces this trace:

    OpenWFE::CancelProcessExpression - do_eval_condition() e :
undefined local variable or method `cancel2' for
#<OpenWFE::CancelProcessExpression:0x204d470>
    OpenWFE::CancelProcessExpression - to_boolean() o is _false_ => false
    OpenWFE::ConcurrenceExpression - new() merge_type is 'mix'
    OpenWFE::ConcurrenceExpression - ready() called by  (fei Test 0
20090918-genurapeba 0.0.2 concurrence)  0 wi waiting


The behaviour in all cases seems to be ok. The engine only cancels a
process when the "_action" fields is provided and its value is
"cancel". But we wonder if the traces (case 4-1 and 4-3) showing
"parse error..." and "undefined local..." are ok or are engine errors.


Hope you can reproduce this.
Thanks for your help.

Best regards,

Gonzalo.




On Fri, Sep 18, 2009 at 5:38 AM, John Mettraux <[email protected]> wrote:
>
> On Fri, Sep 18, 2009 at 1:24 AM, Gonzalo <[email protected]> wrote:
>>
>> I have a process with the following code in it:
>>
>> [...]
>>  _cancel_process :if => "${f:_action} == cancel"
>> [...]
>>
>> If I don't provide in the workitem the field "_action", when this
>> expression is evaluated, the following line appears in 'logs/
>> ruoterest_development'
>>
>> OpenWFE::CancelProcessExpression - do_eval_condition() e :
>> parse error on value s("==") (tEQ)
>>
>> I don't know if this is an error or just the right behaviour of the
>> engine.
>
> Hello Gonzalo,
>
> thanks for reporting this issue.
>
> I have added two tests about it
>
>  http://github.com/jmettraux/ruote/commit/b346bad8b00571bb9df0e0eb68c082eccab2b352
>
> but unfortunately, the tests do behave as expected, I can't reproduce
> your issue. Maybe you have an older version of ruote 0.9.x. The code
> showing the bad behaviour hasn't changed since March.
>
>  http://github.com/jmettraux/ruote/commits/master/lib/openwfe/expressions/condition.rb
>  http://github.com/jmettraux/ruote/commits/master/lib/openwfe/expressions/fe_cancel.rb
>
> I have tried as well to assign the nil value to the _action field as
> well as an empty string, but still, "cancel_process" is not triggered.
>
>
> Best regards,
>
> --
> John Mettraux   -   http://jmettraux.wordpress.com
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to