Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 48A4A17AE1 for ; Wed, 8 Oct 2014 09:31:31 +0000 (UTC) Received: (qmail 6853 invoked by uid 500); 8 Oct 2014 09:31:29 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 6744 invoked by uid 500); 8 Oct 2014 09:31:29 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 6733 invoked by uid 99); 8 Oct 2014 09:31:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Oct 2014 09:31:29 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of r.c.hoekstra@erasmusmc.nl designates 156.83.10.12 as permitted sender) Received: from [156.83.10.12] (HELO rbox2.erasmusmc.nl) (156.83.10.12) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Oct 2014 09:31:24 +0000 Received: from localhost (localhost [127.0.0.1]) by rbox2.erasmusmc.nl (Postfix) with ESMTP id C379A1F772 for ; Wed, 8 Oct 2014 11:31:02 +0200 (CEST) X-Virus-Scanned: amavisd-new at erasmusmc.nl Received: from rbox2.erasmusmc.nl ([127.0.0.1]) by localhost (rbox2.erasmusmc.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id M_XrzPYY5Gw7 for ; Wed, 8 Oct 2014 11:31:02 +0200 (CEST) Received: from EXCH-HE04.erasmusmc.nl (exch-he04.erasmusmc.nl [10.185.35.19]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by rbox2.erasmusmc.nl (Postfix) with ESMTPS id A5BF31F503 for ; Wed, 8 Oct 2014 11:31:02 +0200 (CEST) Received: from EXCH-HE01.erasmusmc.nl ([fe80::ec75:ae70:da:2acd]) by EXCH-HE04.erasmusmc.nl ([::1]) with mapi id 14.02.0318.004; Wed, 8 Oct 2014 11:31:02 +0200 From: "R.C. Hoekstra" To: "user@commons.apache.org" Subject: Re: Re: [scxml] passing datamodel elements into method call Thread-Topic: Re: [scxml] passing datamodel elements into method call Thread-Index: Ac/i2HjOVlBVW6tNQ6iEnY7BeF6rdQ== Date: Wed, 8 Oct 2014 09:31:01 +0000 Message-ID: <521542E73D0D214AB9D88954DDC2FB606AA2109B@EXCH-HE01.erasmusmc.nl> Accept-Language: en-US, nl-NL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.191.97.22] Content-Type: multipart/alternative; boundary="_000_521542E73D0D214AB9D88954DDC2FB606AA2109BEXCHHE01erasmus_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_521542E73D0D214AB9D88954DDC2FB606AA2109BEXCHHE01erasmus_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > Hi Rinke, > I think you would get a node if you used DataNode function instead: > > Could you try that? > > Regards, Woonsan > Hi Woonsan, thanks for your answer. But are you sure about that? If I use it like that, I get an "unknown, ambiguous or inaccessible method = dataNode" error. I found the dataNode method in Builtin.java. Its javadoc says: "Manifests within location attribute of element, for Commons JEXL = and Commons EL based documents." So what I get from it, is that dataNode can only be used to assign somethin= g to a dataNode via . That is not what I want. I want to pass a dataNode including subElements to= some java object via the cond attribute, so I can write a java method whic= h is able to check conditions with use of the passed dataNode. So: is there a way in which I can pass a dataNode to a java object in the c= ontext which is used in a cond attribute? Data obviously doesn't work, as I= can see in the Builtin code that it always is parsed to Double or String. best regards, Rinke > On Thursday, October 2, 2014 3:53 AM, R.C. Hoekstra 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: > > , > > 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 evalu= ate 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: > > > > , > > > > > where the treatments/treatment[1]/name is a final node. > > > > > > However, I would like to pass non final nodes of the datamodel, but eve= rything seems to be evaluated as strings first, before it is passed into th= e 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 --_000_521542E73D0D214AB9D88954DDC2FB606AA2109BEXCHHE01erasmus_--