Hi Rudy,
from-query is only for use with variables, like this:
<bpel:from variable="BPELVariableName" part="NCName"?>
<bpel:query queryLanguage="anyURI"?>?
queryContent
</bpel:query>
</bpel:from>
Since you want to select only the result of a XPath expression, you
should use this construct:
<bpel:from expressionLanguage="anyURI"?>expression</bpel:from>
So,
<bpel:from
expressionLanguage="expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"?>current-dateTime()</bpel:from>
should actually work.
HTH,
Tammo
On 16.02.2012 13:11, Rudy Commenge wrote:
> Ok, thanks.
> I'm not in a replayer scenario, so I tried to use :
> <bpel:copy>
> <bpel:from>
> <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
> expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
> <![CDATA[current-dateTime()]]>
> </bpel:query>
> </bpel:from>
> <bpel:to>...</bpel:to>
> </bpel:copy>
>
> But during deployment, I have the following error :
> null:817: error: [XPathSyntax] The string "" is not a valid XPath 1.0
> expression
>
> Do you know why ?
>
>
> 2012/2/15 Tammo van Lessen <[email protected]>
>
>> Hi,
>>
>> first, the currentEventDateTime variable only works when using the
>> replayer functionality. Second, it is currently only available when
>> using XPath 2.0, so you need to make sure that the expression language
>> is set to XPath 2.0 (urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0).
>>
>> HTH,
>> Tammo
>>
>> On 15.02.2012 17:11, Rudy Commenge wrote:
>>> Hi,
>>>
>>> I have developed a BPEL process.
>>> I have declared ode namespace : xmlns:ode="
>>> http://www.apache.org/ode/type/extension"
>>>
>>> Now I try to get current dateTime like that :
>>> <bpel:copy>
>>> <bpel:from>
>>> <![CDATA[$ode:currentEventDateTime]]>
>>> </bpel:from>
>>> <bpel:to>.....</bpel:to>
>>> </bpel:copy>
>>>
>>> But during deployment I have the following error :
>>> null:468: error: [UndeclaredVariable] Attempt to reference undeclared
>>> variable "currentEventDateTime".
>>>
>>> So, how to use "currentEventDateTime" ODE extension ?
>>>
>>> Best regards,
>>>
>>> Rudy
>>>
>>
>> --
>> Tammo van Lessen - http://www.taval.de
>>
>
--
Tammo van Lessen - http://www.taval.de