[jboss-jira] [JBoss JIRA] Commented: (BPEL-301) getVariableData function does not return the actual value even for simple typed variables
Alejandro Guizar (JIRA)
jira-events at lists.jboss.org
Mon Sep 8 16:59:38 EDT 2008
[ https://jira.jboss.org/jira/browse/BPEL-301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12428657#action_12428657 ]
Alejandro Guizar commented on BPEL-301:
---------------------------------------
The BPEL 1.1 specification simply states that the function extracts the value of the variable. It says nothing about how the variable value is manifested. Even BPEL 2.0 does not mandate a specific manifestation*:
"If a WS-BPEL implementation chooses to manifest a simple type variable as an XML infoset, the infoset SHOULD consist of a DII that contains exactly one child, which is an EII referenced by the document element property. The properties of the document element, specifically the namespace name and local name properties, are undefined by this specification. An implementation MUST specify a namespace name/local name value. However the children of the document element MUST exclusively consist of a series of Character Information Items (CIIs) that represent the simple type value. A WS-BPEL implementation MAY choose to map simple type variables to non-XML-infoset data-models defined in the expression/query language being used (e.g. Boolean in XPath 1.0)."
In jBPM BPEL a simple type variable is manifested as a DII that contains exactly one child, the document element. Said EII exclusively consists of a series of CIIs. jBPM BPEL chose not to map simple type variables to non-XML-infoset data models. Still it contradicts neither BPEL 1.1 nor BPEL 2.0.
A portable process should not assume variables are mapped to the data model defined in the expression language. In XPath 1.0, conversion functions should always be used whenever the return type of a function is undetermined.
$array[number($var)]
(*) http://docs.oasis-open.org/wsbpel/2.0/OS/wsbpel-v2.0-OS.html#_Toc164738495
> getVariableData function does not return the actual value even for simple typed variables
> -----------------------------------------------------------------------------------------
>
> Key: BPEL-301
> URL: https://jira.jboss.org/jira/browse/BPEL-301
> Project: JBoss jBPM BPEL
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Engine
> Affects Versions: jBPM BPEL 1.1 GA
> Reporter: Jay Yan
> Assignee: Alejandro Guizar
> Original Estimate: 1 week
> Remaining Estimate: 1 week
>
> According to BPEL 1.1 Spec, the function getVariableData should behave in this way:
> "When only the first argument is present, the function extracts the value of the variable, which in this case must be defined using an XML Schema simple type or element. Otherwise, the return value of this function is a node set containing the single node..."
> However, even when a variable is defined using a simple type such as type="xsd:int", getVariableData () call on that variable still return the node instead of the numeric value. As the result, array[getVariableData(var)] does not work, while array[position()=getVariableData(var)] and array[number(getVariableData(var))] both work.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list