[ 
https://issues.apache.org/jira/browse/XALANJ-2564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510840#comment-13510840
 ] 

Nash commented on XALANJ-2564:
------------------------------

Below is the code snippet from OSMprepareOrderForActivation.xsl where the value 
for "fulfillmentItem_index" gets set:

<xsl:template name="voice_template">
                <!-- xsl:param name="mdn_index"/ -->
                <xsl:param name="mdnId"/>
                <xsl:param name="oldmdnId"/>
                <xsl:param name="minId"/>
                <xsl:param name="oldminId"/>
                <xsl:param name="imsi"/>
                <xsl:param name="non_mts_imsi"/>
                <xsl:param name="old_imsi"/>
                <xsl:param name="portedInFlag"/>
                <xsl:param name="deviceESN"/>
                <xsl:param name="old_deviceESN"/>
                <xsl:param name="deviceMEID"/>
                <xsl:param name="old_deviceMEID"/>
                <xsl:param name="pseudoESN"/>
                <xsl:param name="old_pseudoESN"/>
                <xsl:param name="pagerCAP"/>
                <xsl:param name="radioSN"/>
                <xsl:param name="POS"/>
                <xsl:param name="cdmaSIM"/>
                <xsl:param name="customerGroup"/>
                <xsl:param name="previousMDNType"/>
                <xsl:param name="sip_uim_realm"/>
                <xsl:param name="sip_uim_old_realm"/>
                <xsl:param name="sip_uim_realm_delete"/>
                <xsl:param name="sip_mip_group_id"/>
                <xsl:param name="sip_mip_group_id_delete"/>
                <xsl:param name="sip_mip_old_group_id"/>
                <xsl:param name="apn_id"/>
                <xsl:param name="apn_id_old"/>
                <xsl:param name="apn_id_delete"/>               
                <xsl:variable name="void16" select="java:info($log, 
'PrepareOrderForActivation: *************Begin voice_template *****')"/>
                <xsl:for-each 
select="oms:Services/oms:Voice/oms:FulfillmentItems/oms:FulfillmentItem">
                        <xsl:variable name="fulfillmentItem_index">
                                <xsl:value-of select="@index"/>
                        </xsl:variable>
                                                <xsl:variable name="void17" 
select="java:info($log, concat('PrepareOrderForActivation: ', 
oms:FulfillmentItemCode))"/>
                        <Add 
path="/Wireless/MDN/Services/Voice/FulfillmentItems/FulfillmentItem[@index='{$fulfillmentItem_index}']/Attributes">


For order#243193, wrong value was set for variable "fulfillmentItem_index" 
during the 1st iteration of the for-loop. For consecutive iterations, correct 
value was set. Transformed output is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<OrderDataUpdate xmlns="http://www.metasolv.com/OMS/OrderDataUpdate"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
        <Add xmlns="" path="1353944898394']/Attributes">
                <Attribute>
                        <name>HLR-MSISDN</name>
                        <value>2045731730</value>
                </Attribute>
                <Attribute>
                        <name>HLR-IMSI</name>
                        <value>302660397124421</value>
                </Attribute>
                <Attribute>
                        <name>HLR-NON_MTS_IMSI</name>
                        <value>302370397124421</value>
                </Attribute>
        </Add>
        <Add xmlns="" 
path="/Wireless/MDN/Services/Voice/FulfillmentItems/FulfillmentItem[@index='1353944898409']/Attributes">
                <Attribute>
                        <name>HLR-MSISDN</name>
                        <value>2045731730</value>
                </Attribute>
                
> variable value calculated incorrectly within for-each in xsl transformation 
> output
> ----------------------------------------------------------------------------------
>
>                 Key: XALANJ-2564
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2564
>             Project: XalanJ2
>          Issue Type: Bug
>      Security Level: No security risk; visible to anyone(Ordinary problems in 
> Xalan projects.  Anybody can view the issue.) 
>    Affects Versions: 2.7
>         Environment: Weblogic 9.2 MP3 on HP-UX Itanium(B.11.31). 
> Multi-threaded environment. 
> Xalan 7.0. 
> Hardware: 
> Processors: 4
> architecture: IA64N
> Java: 1.5
> Physical Memory: 32G
>            Reporter: Nash
>            Assignee: Steven J. Hathaway
>         Attachments: Incorrect Transformation.zip
>
>
> We are encountering a strange issue in Production environment which we are 
> not able to replicate in any environments. The Order Process & Management 
> application which generates this error processes thousands of orders in a day 
> avg. 4000 order. The order xmls are transformed using various xslt to update 
> order data. There is no XLS transformation exception thrown but the xml 
> output is not what is expected which leads to an "OrderUpdateException" being 
> thrown by the application API. 
> When this exception occurs, there are always 2 orders involved i.e. 2 
> different order xmls being transformed at the same time(same timestamp) using 
> same xslt. The resulting XML transformation output for both the orders are 
> also well-formed but due to incorrect value evaluated by a variable declared 
> inside <xsl:for-each, wrong path information is being supplied to <Add 
> instruction for updating the order. Morever, the issue seems to go away on 
> retry of order task from the application web client. As a result, the orders 
> get updated and processing continues. Here retry means applying the same 
> transformation again on order xml. The input order xmls were not modified 
> whatsoever during retry.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to