James.Strachan wrote:
>
> 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
>
>
In my case, they are orderless. So, I probably need write a lot of
statements like this:
b.starts().after(a.completes())
.expectWithin(seconds(1))
.errorIfOver(seconds(10)).to("activemq:overdue.b");
However, I've found out that the Aggregator might help me out of this. It
has a time window. It needn't Spring's support, which makes it more doable
for us.
Thanks anyway. :)
--
View this message in context:
http://www.nabble.com/How-to-monitor-more-than-two-activities--tf4784149s22882.html#a13812087
Sent from the Camel - Users mailing list archive at Nabble.com.