Trimming copious amounts to keep message size manageable ...
On 4/20/06, Nestor Urquiza <[EMAIL PROTECTED]> wrote:
> --- Rahul Akolkar <[EMAIL PROTECTED]> wrote:
<snip/>
>
> I am implementing state oriented business application
> protocol ("scxml engine" + "bridge") that in fact will
> be used between others by http calls ("system") not
> relevant the way ... it can be GET/POST/REST/SOAP or
> whatever terminology someone can come for the same
> "Receiving calls from a client and answering them via
> HTTP".
>
<snap/>
Thanks for that level set.
>
> Could you think about an option to avoid action
> states?
>
<snip/>
Yes, as you point out below ;-)
> > While you can hack most state machines to fit many
> > topologies (such as
> > by having side-effects in guard conditions), the
>
> Interesting, given the fact that jexl supports method
> invocation ... don't you think this is a way to avoid
> to much descriptive information in the scxml file?
>
<snap/>
It somewhat comes down to a matter of personal taste in readability,
or how it was modeled. I can see the need for both usages, and have
seen (and used) both.
> Consider the jexl expression for example:
> "validVar eq true and
> contextObjectUsingTheEventName.execute()"
>
> Because of the simple and there you could ensure that
> only if the first part is true (pre-cond) you call the
> execute method of an object that is supposed to be in
> the context and you know its name because it maps to
> the state machine event-name and the http-call. The
> result is a boolean that will complete the
> post-condition and therefore you do not need an action
> state.
>
<snip/>
Yup, makes sense, but Commons SCXML cannot make any guarantees about
things such as whether the underlying EL used short-circuits compound
boolean expressions etc.
> In other words this is maybe answering the alternative
> way I am looking for. And it is important to
> understand that I am not after a side-effect but
> specific-code in my case.
>
> Where I can see an example or information about
> implementing such a mechanism? This is having jexl
> expression that executes some java code that returns
> boolean and can be used for a condition. I opened
> another thread and I see I have responses so let me
> check out them ... it is precisely related to the
> context that I thought I need to use for this scenario
> in order to set up the object that the sate machine is
> supposed to use.
>
> Is it something the engine is doing already or will
> do?
>
<snap/>
As you state, JEXL already does that. So Commons SCXML does that too
by transitivity if you use JEXL for expressions. If
"contextObjectUsingTheEventName" from the above snippet is available
in the Context, then JEXL will take care of the method invocation. We
do have examples of JSF method binding expressions in SCXML documents
in the usecases, but probably none of JEXL method invocation. But
there is nothing more to it than your snippet above.
-Rahul
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]