Re: svn commit: r781696 - /ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r781696 - /ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml

Adrian Crum
Vikas,

This is the correct way to fix the UEL problem with numeric IDs used as
Map keys. I'm pointing this out so that other developers can take note.

-Adrian

[hidden email] wrote:

> Author: mor
> Date: Thu Jun  4 09:39:05 2009
> New Revision: 781696
>
> URL: http://svn.apache.org/viewvc?rev=781696&view=rev
> Log:
> Fixed UEL exception in picking screen in facility with the solution proposed by Adrian. Issue reported by Arun Patidar in
> jira issue OFBIZ-2513 (https://issues.apache.org/jira/browse/OFBIZ-2513)
>
> Modified:
>     ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml
>
> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml?rev=781696&r1=781695&r2=781696&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml (original)
> +++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml Thu Jun  4 09:39:05 2009
> @@ -347,16 +347,16 @@
>  
>                                  <!-- pick now, or needs stock move first? -->
>                                  <!-- put in pick or move lists for the groupName prepared according to selected options by user -->
> -                                <if-empty field="pickMoveInfoMap.${groupName}.${groupName}">
> -                                    <get-related-one value-field="orderItemShipGroup" relation-name="ShipmentMethodType" to-value-field="pickMoveInfoMap.${groupName}.${groupName}.shipmentMethodType"/>
> +                                <if-empty field="pickMoveInfoMap[groupName][groupName]">
> +                                    <get-related-one value-field="orderItemShipGroup" relation-name="ShipmentMethodType" to-value-field="pickMoveInfoMap[groupName][groupName].shipmentMethodType"/>
>                                  </if-empty>
>                                  <if-compare field="needsStockMove" operator="equals" value="Y">
> -                                    <field-to-list field="orderHeaderInfo" list="pickMoveInfoMap.${groupName}.orderNeedsStockMoveInfoList"/>
> +                                    <field-to-list field="orderHeaderInfo" list="pickMoveInfoMap[groupName].orderNeedsStockMoveInfoList"/>
>                                      <if-compare field="orderHeader.isRushOrder" operator="equals" value="Y">
>                                          <field-to-list field="orderHeaderInfo" list="rushOrderInfo.orderNeedsStockMoveInfoList"/>
>                                      </if-compare>
>                                  <else>
> -                                    <field-to-list field="orderHeaderInfo" list="pickMoveInfoMap.${groupName}.orderReadyToPickInfoList"/>
> +                                    <field-to-list field="orderHeaderInfo" list="pickMoveInfoMap[groupName].orderReadyToPickInfoList"/>
>                                      <if-compare field="orderHeader.isRushOrder" operator="equals" value="Y">
>                                          <field-to-list field="orderHeaderInfo" list="rushOrderInfo.orderReadyToPickInfoList"/>
>                                      </if-compare>
> @@ -368,10 +368,10 @@
>                                      <calcop field="numberSoFar" operator="add"><number value="1"/></calcop>
>                                  </calculate>
>                                  <log level="info" message="Added order #${orderHeader.orderId} to pick list [${numberSoFar} of ${parameters.maxNumberOfOrders}] - ${pickThisOrder} / ${allPickStarted}"/>
> -                                <set field="pickMoveInfoMap.${groupName}.groupName" from-field="groupName"/>
> -                                <set field="pickMoveInfoMap.${groupName}.groupName1" from-field="groupName1"/>
> -                                <set field="pickMoveInfoMap.${groupName}.groupName2" from-field="groupName2"/>
> -                                <set field="pickMoveInfoMap.${groupName}.groupName3" from-field="noOfOrderItems"/>
> +                                <set field="pickMoveInfoMap[groupName].groupName" from-field="groupName"/>
> +                                <set field="pickMoveInfoMap[groupName].groupName1" from-field="groupName1"/>
> +                                <set field="pickMoveInfoMap[groupName].groupName2" from-field="groupName2"/>
> +                                <set field="pickMoveInfoMap[groupName].groupName3" from-field="noOfOrderItems"/>
>                              </then>
>                              <else>
>                                  <log level="info" message="Order #${orderHeader.orderId} was not added to pick list [${numberSoFar} of ${parameters.maxNumberOfOrders}] - ${pickThisOrder} / ${allPickStarted}"/>
> @@ -404,8 +404,8 @@
>  
>          <!-- find all groupName, for each one get the value from the pickMoveInfoMap and add it to the pickMoveInfoList -->
>          <iterate list="groupNames" entry="groupName">
> -            <if-not-empty field="pickMoveInfoMap.${groupName}">
> -                <field-to-list field="pickMoveInfoMap.${groupName}" list="pickMoveInfoList"/>
> +            <if-not-empty field="pickMoveInfoMap[groupName]">
> +                <field-to-list field="pickMoveInfoMap[groupName]" list="pickMoveInfoList"/>
>              </if-not-empty>
>          </iterate>
>          <clear-field field="groupNames"/>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r781696 - /ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml

Jacques Le Roux
Administrator
Thanks to Adrian, it's also explained with more details at http://docs.ofbiz.org/x/Hhk
But I guess anyone knows that now :o)

Jacques

From: "Adrian Crum" <[hidden email]>

> Vikas,
>
> This is the correct way to fix the UEL problem with numeric IDs used as Map keys. I'm pointing this out so that other developers
> can take note.
>
> -Adrian
>
> [hidden email] wrote:
>> Author: mor
>> Date: Thu Jun  4 09:39:05 2009
>> New Revision: 781696
>>
>> URL: http://svn.apache.org/viewvc?rev=781696&view=rev
>> Log:
>> Fixed UEL exception in picking screen in facility with the solution proposed by Adrian. Issue reported by Arun Patidar in jira
>> issue OFBIZ-2513 (https://issues.apache.org/jira/browse/OFBIZ-2513)
>>
>> Modified:
>>     ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml
>>
>> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml?rev=781696&r1=781695&r2=781696&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml (original)
>> +++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml Thu Jun  4 09:39:05 2009
>> @@ -347,16 +347,16 @@
>>  <!-- pick now, or needs stock move first? -->
>>                                  <!-- put in pick or move lists for the groupName prepared according to selected options by
>> user -->
>> -                                <if-empty field="pickMoveInfoMap.${groupName}.${groupName}">
>> -                                    <get-related-one value-field="orderItemShipGroup" relation-name="ShipmentMethodType"
>> to-value-field="pickMoveInfoMap.${groupName}.${groupName}.shipmentMethodType"/>
>> +                                <if-empty field="pickMoveInfoMap[groupName][groupName]">
>> +                                    <get-related-one value-field="orderItemShipGroup" relation-name="ShipmentMethodType"
>> to-value-field="pickMoveInfoMap[groupName][groupName].shipmentMethodType"/>
>>                                  </if-empty>
>>                                  <if-compare field="needsStockMove" operator="equals" value="Y">
>> -                                    <field-to-list field="orderHeaderInfo"
>> list="pickMoveInfoMap.${groupName}.orderNeedsStockMoveInfoList"/>
>> +                                    <field-to-list field="orderHeaderInfo"
>> list="pickMoveInfoMap[groupName].orderNeedsStockMoveInfoList"/>
>>                                      <if-compare field="orderHeader.isRushOrder" operator="equals" value="Y">
>>                                          <field-to-list field="orderHeaderInfo"
>> list="rushOrderInfo.orderNeedsStockMoveInfoList"/>
>>                                      </if-compare>
>>                                  <else>
>> -                                    <field-to-list field="orderHeaderInfo"
>> list="pickMoveInfoMap.${groupName}.orderReadyToPickInfoList"/>
>> +                                    <field-to-list field="orderHeaderInfo"
>> list="pickMoveInfoMap[groupName].orderReadyToPickInfoList"/>
>>                                      <if-compare field="orderHeader.isRushOrder" operator="equals" value="Y">
>>                                          <field-to-list field="orderHeaderInfo" list="rushOrderInfo.orderReadyToPickInfoList"/>
>>                                      </if-compare>
>> @@ -368,10 +368,10 @@
>>                                      <calcop field="numberSoFar" operator="add"><number value="1"/></calcop>
>>                                  </calculate>
>>                                  <log level="info" message="Added order #${orderHeader.orderId} to pick list [${numberSoFar} of
>> ${parameters.maxNumberOfOrders}] - ${pickThisOrder} / ${allPickStarted}"/>
>> -                                <set field="pickMoveInfoMap.${groupName}.groupName" from-field="groupName"/>
>> -                                <set field="pickMoveInfoMap.${groupName}.groupName1" from-field="groupName1"/>
>> -                                <set field="pickMoveInfoMap.${groupName}.groupName2" from-field="groupName2"/>
>> -                                <set field="pickMoveInfoMap.${groupName}.groupName3" from-field="noOfOrderItems"/>
>> +                                <set field="pickMoveInfoMap[groupName].groupName" from-field="groupName"/>
>> +                                <set field="pickMoveInfoMap[groupName].groupName1" from-field="groupName1"/>
>> +                                <set field="pickMoveInfoMap[groupName].groupName2" from-field="groupName2"/>
>> +                                <set field="pickMoveInfoMap[groupName].groupName3" from-field="noOfOrderItems"/>
>>                              </then>
>>                              <else>
>>                                  <log level="info" message="Order #${orderHeader.orderId} was not added to pick list
>> [${numberSoFar} of ${parameters.maxNumberOfOrders}] - ${pickThisOrder} / ${allPickStarted}"/>
>> @@ -404,8 +404,8 @@
>>  <!-- find all groupName, for each one get the value from the pickMoveInfoMap and add it to the pickMoveInfoList -->
>>          <iterate list="groupNames" entry="groupName">
>> -            <if-not-empty field="pickMoveInfoMap.${groupName}">
>> -                <field-to-list field="pickMoveInfoMap.${groupName}" list="pickMoveInfoList"/>
>> +            <if-not-empty field="pickMoveInfoMap[groupName]">
>> +                <field-to-list field="pickMoveInfoMap[groupName]" list="pickMoveInfoList"/>
>>              </if-not-empty>
>>          </iterate>
>>          <clear-field field="groupNames"/>
>>
>>
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r781696 - /ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml

Vikas Mayur-3
Thanks to both of you, especially Adrian for helping on this issue.

Vikas

On Jun 4, 2009, at 9:00 PM, Jacques Le Roux wrote:

> Thanks to Adrian, it's also explained with more details at http://docs.ofbiz.org/x/Hhk
> But I guess anyone knows that now :o)
>
> Jacques
>
> From: "Adrian Crum" <[hidden email]>
>> Vikas,
>>
>> This is the correct way to fix the UEL problem with numeric IDs  
>> used as Map keys. I'm pointing this out so that other developers  
>> can take note.
>>
>> -Adrian
>>
>> [hidden email] wrote:
>>> Author: mor
>>> Date: Thu Jun  4 09:39:05 2009
>>> New Revision: 781696
>>>
>>> URL: http://svn.apache.org/viewvc?rev=781696&view=rev
>>> Log:
>>> Fixed UEL exception in picking screen in facility with the  
>>> solution proposed by Adrian. Issue reported by Arun Patidar in  
>>> jira issue OFBIZ-2513 (https://issues.apache.org/jira/browse/OFBIZ-2513 
>>> )
>>>
>>> Modified:
>>>    ofbiz/trunk/applications/product/script/org/ofbiz/shipment/
>>> picklist/PicklistServices.xml
>>>
>>> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/
>>> shipment/picklist/PicklistServices.xml
>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml?rev=781696&r1=781695&r2=781696&view=diff
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> ====================================================================
>>> --- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/
>>> picklist/PicklistServices.xml (original)
>>> +++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/
>>> picklist/PicklistServices.xml Thu Jun  4 09:39:05 2009
>>> @@ -347,16 +347,16 @@
>>> <!-- pick now, or needs stock move first? -->
>>>                                 <!-- put in pick or move lists for  
>>> the groupName prepared according to selected options by user -->
>>> -                                <if-empty field="pickMoveInfoMap.$
>>> {groupName}.${groupName}">
>>> -                                    <get-related-one value-
>>> field="orderItemShipGroup" relation-name="ShipmentMethodType" to-
>>> value-field="pickMoveInfoMap.${groupName}.$
>>> {groupName}.shipmentMethodType"/>
>>> +                                <if-empty  
>>> field="pickMoveInfoMap[groupName][groupName]">
>>> +                                    <get-related-one value-
>>> field="orderItemShipGroup" relation-name="ShipmentMethodType" to-
>>> value-field="pickMoveInfoMap[groupName]
>>> [groupName].shipmentMethodType"/>
>>>                                 </if-empty>
>>>                                 <if-compare field="needsStockMove"  
>>> operator="equals" value="Y">
>>> -                                    <field-to-list  
>>> field="orderHeaderInfo" list="pickMoveInfoMap.$
>>> {groupName}.orderNeedsStockMoveInfoList"/>
>>> +                                    <field-to-list  
>>> field="orderHeaderInfo"  
>>> list="pickMoveInfoMap[groupName].orderNeedsStockMoveInfoList"/>
>>>                                     <if-compare  
>>> field="orderHeader.isRushOrder" operator="equals" value="Y">
>>>                                         <field-to-list  
>>> field="orderHeaderInfo"  
>>> list="rushOrderInfo.orderNeedsStockMoveInfoList"/>
>>>                                     </if-compare>
>>>                                 <else>
>>> -                                    <field-to-list  
>>> field="orderHeaderInfo" list="pickMoveInfoMap.$
>>> {groupName}.orderReadyToPickInfoList"/>
>>> +                                    <field-to-list  
>>> field="orderHeaderInfo"  
>>> list="pickMoveInfoMap[groupName].orderReadyToPickInfoList"/>
>>>                                     <if-compare  
>>> field="orderHeader.isRushOrder" operator="equals" value="Y">
>>>                                         <field-to-list  
>>> field="orderHeaderInfo"  
>>> list="rushOrderInfo.orderReadyToPickInfoList"/>
>>>                                     </if-compare>
>>> @@ -368,10 +368,10 @@
>>>                                     <calcop field="numberSoFar"  
>>> operator="add"><number value="1"/></calcop>
>>>                                 </calculate>
>>>                                 <log level="info" message="Added  
>>> order #${orderHeader.orderId} to pick list [${numberSoFar} of $
>>> {parameters.maxNumberOfOrders}] - ${pickThisOrder} / $
>>> {allPickStarted}"/>
>>> -                                <set field="pickMoveInfoMap.$
>>> {groupName}.groupName" from-field="groupName"/>
>>> -                                <set field="pickMoveInfoMap.$
>>> {groupName}.groupName1" from-field="groupName1"/>
>>> -                                <set field="pickMoveInfoMap.$
>>> {groupName}.groupName2" from-field="groupName2"/>
>>> -                                <set field="pickMoveInfoMap.$
>>> {groupName}.groupName3" from-field="noOfOrderItems"/>
>>> +                                <set  
>>> field="pickMoveInfoMap[groupName].groupName" from-
>>> field="groupName"/>
>>> +                                <set  
>>> field="pickMoveInfoMap[groupName].groupName1" from-
>>> field="groupName1"/>
>>> +                                <set  
>>> field="pickMoveInfoMap[groupName].groupName2" from-
>>> field="groupName2"/>
>>> +                                <set  
>>> field="pickMoveInfoMap[groupName].groupName3" from-
>>> field="noOfOrderItems"/>
>>>                             </then>
>>>                             <else>
>>>                                 <log level="info" message="Order #$
>>> {orderHeader.orderId} was not added to pick list [${numberSoFar}  
>>> of ${parameters.maxNumberOfOrders}] - ${pickThisOrder} / $
>>> {allPickStarted}"/>
>>> @@ -404,8 +404,8 @@
>>> <!-- find all groupName, for each one get the value from the  
>>> pickMoveInfoMap and add it to the pickMoveInfoList -->
>>>         <iterate list="groupNames" entry="groupName">
>>> -            <if-not-empty field="pickMoveInfoMap.${groupName}">
>>> -                <field-to-list field="pickMoveInfoMap.$
>>> {groupName}" list="pickMoveInfoList"/>
>>> +            <if-not-empty field="pickMoveInfoMap[groupName]">
>>> +                <field-to-list field="pickMoveInfoMap[groupName]"  
>>> list="pickMoveInfoList"/>
>>>             </if-not-empty>
>>>         </iterate>
>>>         <clear-field field="groupNames"/>
>>>
>>>
>>>
>
>


smime.p7s (3K) Download Attachment