ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafal Rusin <ra...@intalio.com>
Subject Re: Date manipulation functions in BPEL
Date Wed, 11 Aug 2010 11:43:03 GMT
On Wed, Aug 11, 2010 at 12:58 PM, Josef Bajada <Josef.Bajada@go.com.mt> wrote:
> I am trying to use ODE for some simple BPEL proof-of-concepts and I have
> stumbled upon some difficulties to manipulate dates and times.
>
> I have managed to call current-dateTime() through XPath 2.0 as follows:
>
>
>
>                <bpel:from part="payload" variable="output">
>
>                    <bpel:query
> queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"><![CDATA[
> current-dateTime()]]></bpel:query>
>
>                </bpel:from>
>
>
>
> However, I haven't managed to perform a simple addition like this:
>
>
>
>                <bpel:from part="payload" variable="output">
>
>                    <bpel:query
> queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"><![CDATA[
> current-dateTime() + xs:dayTimeDuration('P1D')]]></bpel:query>
>
>                </bpel:from>

Such thing worked for me:

xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            <bpws:copy>
                <bpws:from
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"><![CDATA[current-dateTime()
+ xsd:dayTimeDuration('P1D')]]></bpws:from>
                <bpws:to><![CDATA[$response.body/hello:text]]></bpws:to>
            </bpws:copy>

Please try to make it pass first.

>
>
>
>
> I also don't have any idea how to call an XSLT function such as
> format-dateTime().
>
>
>
> I wish to do something like the following, but I have no idea how to do
> it in BPEL. When I try the following I get an error saying that I cannot
> use format-dateTime() in a non-XSLT context:
>
>
>
> format-dateTime(current-dateTime(), "Y-M-D H:m:s"))
>
>
>
> thanks,
>
> Josef
>
>



-- 
Regards,
Rafał Rusin
http://rrusin.blogspot.com

Mime
View raw message