commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Woonsan Ko <woon_...@yahoo.com.INVALID>
Subject Re: [scxml] passing datamodel elements into method call
Date Mon, 06 Oct 2014 20:19:36 GMT
Hi Rinke,

I think you would get a node if you used DataNode function instead:

<cs:var name="treatment1Name"  expr="DataNode(treatmentData,'treatments/treatment[1]/name')"
/>

Could you try that?

Regards,

Woonsan



On Thursday, October 2, 2014 3:53 AM, R.C. Hoekstra <r.c.hoekstra@erasmusmc.nl> wrote:
 

>
>
>Hi list, Hi people @ scxml commons,
>
>Can I pass datamodel nodes to a rootContext var, in order to process it in java?
>
>like this:
><target event="bla" cond="agent.check(datamodelNodeRef)" .../>,
>where:
>* agent is an object of a java class made available to the RootContext, having a check
method returning Boolean. I want this check method to evaluate the datamodelNode, in order
to return true or false depending on elements.
>* datamodelNodeRef is a reference to some node in the datamodel.
>
>I managed to pass final nodes as string here, like this:
>
><cs:var name="treatment1Name"  expr="Data(treatmentData,'treatments/treatment[1]/name')"
/>,
><transition ... cond="agent.check(treament1Name)"...
>
>where the treatments/treatment[1]/name is a final node.
>
>
>However, I would like to pass non final nodes of the datamodel, but everything seems to
be evaluated as strings first, before it is passed into the method of the context var.
>
>Hope you can give me a clue.
>
>And, if these kind of constructions are possible, how would they do in terms of performance?
>
>thanks, Rinke
>
>
>
>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message