OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

tamie-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: <catch> and @tryfor


Hi all,

Regarding the catch/@tryfor attribute, I would like to raise a few questions.
The "catch timeout" handling for XTemp / "Live mode" is about to be implemented in edtf, so I would like to clarify some uncertainties that I have.

Let's take a simple example:
---
<catch eb="POs" tryfor="P3DT12H" >
   <match event="PO"<condition>...</condition></match>
</catch>
---
In the above case, this means that <catch> will block for the specified duration. Crystal clear.

Now we take a more complex example (although the below is not currently supported by edtf), which contains more <match> elements:
---
<catch eb="POs" tryfor="P3DT12H" >
   <match event="PO"<condition>...</condition></match>
   <match event="POresponse" after="PO"<condition>...</condition></match>
   <match event="POreceipt" after="POresponse"<condition>...</condition></match>
</catch>
---
For the above <catch>, lets assume "PO" is catched at T0, Does this imply that POresponse should be catched in P3DT12H or (P3DT12H - T0) ?

In XTemp spec, section 4.7.3, Step 2, the answer seems to be pretty clear:  "the event occurs before the catch timeout (@tryfor)" (i.e. in the 2nd example, POresponse should be catched in P3DT12H).
This means that if POresponse will be catched at T1 and POreceipt will not be catched, the event pattern was not found (total time spent = P3DT12H + T1 + P3DT12H) and a new event pattern will be initiated with "PO".

But long time ago when I first saw a <catch> with @tryfor, it was in an XTemp script.
Only by looking at the <catch> (and without reading the spec), I had a (high) expectation that @tryfor applies for the entire <catch> (i.e. in the 2nd example, POresponse should be catched in P3DT12H - T0).
This expectation came from the fact that @tryfor was a <catch> attribute, not a <match> attribute.
So, if this feeling is shared by more of us, I would kindly ask if either one of the below can be an option for the future..
 - make @tryfor available only as part of the <match>, which would give the user extra flexibility in specifying timeouts inside a catch or
 - leave @tryfor where it is now and make it also available for <match>, which would make things backward compatible at a syntactic level but not on a semantic one (as catch/@tryfor timeout will apply to all <match> statements cumulatively) or
 - change @tryfor name to better reflect the fact that the timeout applies for each <match>

Thank you in advance for your answers.

Best regards,
Marius Plavan







[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]