Hello,

the timers feature has been implemented and merged in the ruote 2.2.1 master.

It behaves as previously described in this thread. It's backward compatible.

It lead to the inclusion of a new common attribute, :flank.

       | replies to parent ? | cancellable ? |
-------+---------------------+---------------+
forget | immediately         | no            |
lose   | never               | yes           |
flank  | immediately         | yes           |

(sorry if the ascii table doesn't render properly in your email client).

Timers are "flanking" the expression to which they are tied.

---8<---
sequence :timers => '2d: first_reminder, 3d: final_reminder, 4d: timeout' do
  # ...
end
--->8---

(where first_reminder and final_reminder are participants or subprocesses).

Since they replied immediately upon being triggered, the expression keeps track 
of its "flanks". When an expression is cancelled, its flanks are cancelled as 
well, they thus shouldn't outlive their expression.

Since :flank is a common attribute, you can write

---8<---
sequence do
  sequence :flank => true do
    bob :task => 'side work'
  end
  alice :task => 'main work'
end
--->8---

Where bob is given a task as long as alice is performing the "main work" task.

This could previously be achieved with something like

---8<---
concurrence :count => 1 do
  sequence :lose => true do
    bob :task => 'side work'
  end
  alice :task => 'main work'
end
--->8---

which I explained many times in this mailing list.

I'm not sure "flank" is the right word, I wanted to use "side" or "wing", but 
well, to flank / a flank, to side / a side, to wing, ... It's flank for now, 
many someone has a convincing suggestion.

I hope the :flank pattern is more readable than its concurrence :count => 1 
original.

I will probably make an expression for flank, so that

---8<---
sequence do
  flank do
    bob :task => 'side work'
    charly : task => 'side work, part 2'
  end
  alice :task => 'main work'
end
--->8---

(forget and lose also have their own expressions).

Now I have to document that.

I hope to release 2.2.1 soon, I have troubles with the CI setting for now.


Comments and suggestions are welcome, thanks to Lucas (Howcast) for triggering 
this work and sharing his ideas during the inception.

Best regards,

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

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