things that might not be consistent in Ruote

25 views
Skip to first unread message

Marco Sehrer [ninjaconcept.com]

unread,
Jun 18, 2012, 5:19:18 AM6/18/12
to openwfe...@googlegroups.com
Hi John, 

after working for some time with ruote, I found some things, I think, might not be that consistent as they could be. 
Maybe I missed a concept, I'm sure you will have answers :-) 

1)
Queries on a specific participant are not scoped to that participant

For example

RuoteKit.engine.participant('picklist_processor').all.map {|wi| wi.participant_name}
-> returns all workitems/partipant_names .. 

the same as doing

RuoteKit.engines.storage_participant.all.map {|wi| wi.participant_name}

Intuitively I would expect that calling a query on a participant, will scope/prefilter that query ..

2)

An _if block is not implicit sequential ?  
It makes a difference, at least for my test-suite if I do 

_if ".." do
    exp1
    exp2
    exp3
end

or

_if ".." do
  sequence do
    exp1
    exp2
    exp3
  end
end

I ended to prevent to use _if at all and use a cursor :if=>".." expression instead

cursor :if => ".." do
    part1
    part2
    part3
end


Thank you, 
Marco

Mario Camou

unread,
Jun 18, 2012, 5:29:26 AM6/18/12
to openwfe...@googlegroups.com
Hi Marco,

Regarding _if, the second expression is the "implied else". So if you do:

_if "2 == 1" do
  exp1
  exp2
end

exp2 will be executed. The way I think about it is that "sequence do... end" takes the place of the braces { } in C-family languages. What can trip you is if you're accustomed to Ruby's use of if where no braces are necessary.
  

Mario Camou | Co-Founder
http://abstra.cc

Tanto este mensaje como todos los posibles documentos adjuntos al mismo, son confidenciales y están dirigidos exclusivamente a los destinatarios de los mismos. Por favor, si Usted no es uno de dichos destinatarios, notifíquenos este hecho y elimine el mensaje de su sistema. Queda prohibida la copia, difusión o revelación de su contenido a terceros sin el previo consentimiento por escrito de “ABSTRA CC FACTORIA SOFTWARE, S.A.”. En caso contrario, vulnerará la legislación vigente. Sus datos figuran en un fichero propiedad de "ABSTRA CC FACTORIA SOFTWARE, S.A.". Si desea acceder a sus datos, rectificarlos, cancelarlos u oponerse a su tratamiento, diríjase por escrito a "ABSTRA CC FACTORIA SOFTWARE, S.A.", C/ Boix y Morer, 6, 7 planta de Madrid, CP-28003.

Both this message and all possible documents attached to it, are confidential and are intended exclusively to recipients of them. Please, if you are not one of those recipients, notify us of this fact and delete the message from your system. Copying, dissemination or disclosure of their contents to third parties without the prior written consent of "ABSTRA CC FACTORIA SOFTWARE, S.A." is prohibited. Otherwise, you violate the legislation in force. Your data are contained in a file property of "ABSTRA CC FACTORIA SOFTWARE, S.A.". If you want to access your data, rectify them, cancel them or oppose its processing, submit in writing to "ABSTRA CC FACTORIA SOFTWARE, S.A.", C/ Boix y Morer, 6, 7 floor Madrid, CP-28003.



--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to openwfe...@googlegroups.com
to unsubscribe : send email to openwferu-use...@googlegroups.com
more options : http://groups.google.com/group/openwferu-users?hl=en

Marco Sehrer [ninjaconcept.com]

unread,
Jun 18, 2012, 5:39:28 AM6/18/12
to openwfe...@googlegroups.com
Hi Mario,

Ahh ok, thank you for opening my eyes :-)
I think that the problem with simple concepts like an 'if statement' are so inherent to any developer, that specialities like having an implicit 'else' are easily overlooked.

Now I can stop searching for the _else statement too ;-)

Thank you!
Marco

John Mettraux

unread,
Jun 18, 2012, 6:14:19 PM6/18/12
to openwfe...@googlegroups.com

On Mon, Jun 18, 2012 at 11:39:28AM +0200, Marco Sehrer [ninjaconcept.com] wrote:
>
> Ahh ok, thank you for opening my eyes :-)
> I think that the problem with simple concepts like an 'if statement' are so inherent to any developer, that specialities like having an implicit 'else' are easily overlooked.

Hello,

not really a speciality, more like a consequence of ruote playing with low
level syntax trees.

You can devise a higher level language with an explicit 'else' that "compiles"
to the trees that ruote understands.


Best regards,

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

John Mettraux

unread,
Jun 18, 2012, 6:18:35 PM6/18/12
to openwfe...@googlegroups.com

On Mon, Jun 18, 2012 at 11:19:18AM +0200, Marco Sehrer [ninjaconcept.com] wrote:
>
> after working for some time with ruote, I found some things, I think, might not be that consistent as they could be.
> Maybe I missed a concept, I'm sure you will have answers :-)
>
> 1)
> Queries on a specific participant are not scoped to that participant
>
> For example
>
> RuoteKit.engine.participant('picklist_processor').all.map {|wi| wi.participant_name}
> -> returns all workitems/partipant_names ..
>
> the same as doing
>
> RuoteKit.engines.storage_participant.all.map {|wi| wi.participant_name}
>
> Intuitively I would expect that calling a query on a participant, will scope/prefilter that query ..

Yes, you are right, that's not consistent. As you've seen with the tag query,
I still have work to do with the StorageParticipant.

I'm glad I have someone that complains about those issues.

Please give me some time to rethink the storage participant, rewrite its
interface and then let the storage implementations adapt.


Thanks,

Marco S

unread,
Jun 19, 2012, 3:00:03 AM6/19/12
to ruote
its a pleasure for me.
Would be great if you would improve that scoping concerns.
Reply all
Reply to author
Forward
0 new messages