1 Reply Latest reply on Jan 4, 2006 3:49 PM by Alejandro Guizar

    Where can I found expression functions?

    Roy Forever Newbie

      Excuse me,

      I am using expression to add int with double and then assign to string
      the problem is the result is not preferred.

      The inputs are "123" and "123.456", the output is "246.45600000000002"
      Therefore I would like to trunc the output, but I don't know what functions are available.

      The expression

      <bpws:assign>
       <bpws:copy>
       <bpws:from expression="
       bpws:getVariableData('inputVariable', 'payload1', '/payload1/input1') +
       bpws:getVariableData('inputVariable', 'payload1', '/payload1/input2')"/>
       <bpws:to variable="outputVariable" part="payload2" query="/payload2/result"/>
       </bpws:copy>
      </bpws:assign>
      


      Would you like to point me where I can found out some documents?

      Thank you very much ^^
      Roy

        • 1. Re: Where can I found expression functions?
          Alejandro Guizar Master

          As required in section 9.2.4 of the BPEL spec, core XPath 1.0 and BPWS function libraries are available in expressions.

          The XPath 1.0 recommendation describes the core functions in chapter 4. The function library is quite minimalist, but you can achieve your purpose with:

          substring-before(
           bpws:getVariableData('inputVariable', 'payload1', '/payload1/input1') +
           bpws:getVariableData('inputVariable', 'payload1', '/payload1/input2'),
           ".")

          The output should be "246".