On 10/11/2007, Jeffery <[EMAIL PROTECTED]> wrote:
>
> We have 4 activities to monitor. I can't figure out how to put them together
> in one TemporalRule, say for example, to expect four of them happening
> within a time constraint. It works with two, as described in the example.
Is there a well defined activity that starts first? If say A starts
first then you could do say..
b.starts().after(a.completes())
.expectWithin(seconds(1))
.errorIfOver(seconds(10)).to("activemq:overdue.b");
c.starts().after(a.completes())
.expectWithin(seconds(1))
.errorIfOver(seconds(10)).to("activemq:overdue.b");
d.starts().after(a.completes())
.expectWithin(seconds(1))
.errorIfOver(seconds(10)).to("activemq:overdue.b");
I guess we could do much better in the DSL though to specify b, c, d
all within some time periond.
Another idea is we could maybe say that a, b, c, d should all complete
within a time period of the entire process starting (whichever
activity comes first).
e.g. maybe something like this?
expectActivities(a, b, c, d).
.expectWithin(seconds(1))
.errorIfOver(seconds(10)).to("activemq:overdue.b");
so you could say that however a process is started, you expect all
activities to complete with 10 seconds
--
James
-------
http://macstrac.blogspot.com/
Open Source SOA
http://open.iona.com