commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <>
Subject Re: [SCXML] questions on event ids and finalize
Date Wed, 05 Sep 2007 18:06:56 GMT
On 9/4/07, Cook, Dennis <> wrote:
> I have a few questions
> 1.      The spec indicates that an invoked service must return a
> ''id.Done' event , (where the 'id' is the id for this invocation).  But
> I noticed the SimpleSCXMLInvoker is returing a "id.invoke.done" event
> when done and a "id.invoke.cancel.response" event in response to the
> cancel.  The spec indicates that format as TBD.  So what is the proper
> format for the done event.  Is it "id.Done" as spec'ed or
> "id.invoked.done" as the SimpleSCXMLInvoker uses?

We won't know until the spec has the TBD there. But IMO, it clearly
shouldn't be "id.done" since that already has a (different) meaning --
in particular, it indicates that a final substate has been reached for
a composite state. Therefore, "id.invoke.done" was used in the Commons
implementation (and it is subject to change based on spec changes).

> 2.      I cannot figure out how to get a <finalize> block to execute any
> content.  I have tried a <log> entry, but it never seems to be executed.
> I  found a test case
> which also includes a <final> element.  This is not getting executed
> either.  Is this a known bug?

Thanks for taking time to look at the test cases, it makes the
discussion easier. The particular test case you mention
[testInvoke01Sample() in the file above] is a bit incomplete in terms
of <finalize> (it is complete in terms of what its testing -- which is
ensuring the context of the invoked state machine is populated
correctly). In order to execute the <finalize> block, the invoked
state machine needs to run to completion. That can be done by adding
the following line as the last statement of the try block:

 SCXMLTestHelper.fireEvent(exec, "");

This will drive the invoked state machine (invoked-01.xml) to
completion, cause the <finalize> to execute, the corresponding
"id.invoke.done" event to be triggered and the gating transition to be
followed to the "end" state.


> Dennis Cook
> Motorola - Home & Network Mobility
> Sr. Staff Software Engineer
> (o) (408) 235-5874
> (c) (408) 515-4799

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message