Re: svn commit: r1133343 - /ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml

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

Re: svn commit: r1133343 - /ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml

Adrian Crum-3
This change wouldn't be necessary if the correct Java type was specified
in the service definition. In other words, the service engine should
convert the parameter to the correct Java data type before the simple
method is executed.

-Adrian

On 6/8/2011 12:06 PM, [hidden email] wrote:

> Author: ashish
> Date: Wed Jun  8 11:06:46 2011
> New Revision: 1133343
>
> URL: http://svn.apache.org/viewvc?rev=1133343&view=rev
> Log:
> Bug fix. Type(Timestamp) must be mentioned in the createBOMAssoc service for the fromDate field which is currently set as a String. Thanks Suprit.
>
> Modified:
>      ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml
>
> Modified: ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml?rev=1133343&r1=1133342&r2=1133343&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml (original)
> +++ ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml Wed Jun  8 11:06:46 2011
> @@ -30,7 +30,7 @@ under the License.
>           <set field="searchDuplicatedAncestorContext.productId" from-field="parameters.productId"/>
>           <set field="searchDuplicatedAncestorContext.productIdTo" from-field="parameters.productIdTo"/>
>           <if-not-empty field="parameters.fromDate">
> -<set field="searchDuplicatedAncestorContext.fromDate" from-field="parameters.fromDate"/>
> +<set field="searchDuplicatedAncestorContext.fromDate" from-field="parameters.fromDate" type="Timestamp"/>
>           </if-not-empty>
>           <set field="searchDuplicatedAncestorContext.productAssocTypeId" from-field="parameters.productAssocTypeId"/>
>           <call-service service-name="searchDuplicatedAncestor" in-map-name="searchDuplicatedAncestorContext">
>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1133343 - /ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml

Ashish Vijaywargiya
Yes I agree and we were thinking to go by this route only. In service
definition "auto-attributes" tag is being used for pk and non-pk fields so
we can't mention field type over there.
Thanks Adrain for your comment.

--
Ashish

On Wed, Jun 8, 2011 at 5:11 PM, Adrian Crum <
[hidden email]> wrote:

> This change wouldn't be necessary if the correct Java type was specified in
> the service definition. In other words, the service engine should convert
> the parameter to the correct Java data type before the simple method is
> executed.
>
> -Adrian
>
>
> On 6/8/2011 12:06 PM, [hidden email] wrote:
>
>> Author: ashish
>> Date: Wed Jun  8 11:06:46 2011
>> New Revision: 1133343
>>
>> URL: http://svn.apache.org/viewvc?rev=1133343&view=rev
>> Log:
>> Bug fix. Type(Timestamp) must be mentioned in the createBOMAssoc service
>> for the fromDate field which is currently set as a String. Thanks Suprit.
>>
>> Modified:
>>
>> ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml
>>
>> Modified:
>> ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml?rev=1133343&r1=1133342&r2=1133343&view=diff
>>
>> ==============================================================================
>> ---
>> ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml
>> (original)
>> +++
>> ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml
>> Wed Jun  8 11:06:46 2011
>> @@ -30,7 +30,7 @@ under the License.
>>          <set field="searchDuplicatedAncestorContext.productId"
>> from-field="parameters.productId"/>
>>          <set field="searchDuplicatedAncestorContext.productIdTo"
>> from-field="parameters.productIdTo"/>
>>          <if-not-empty field="parameters.fromDate">
>> -<set field="searchDuplicatedAncestorContext.fromDate"
>> from-field="parameters.fromDate"/>
>> +<set field="searchDuplicatedAncestorContext.fromDate"
>> from-field="parameters.fromDate" type="Timestamp"/>
>>          </if-not-empty>
>>          <set field="searchDuplicatedAncestorContext.productAssocTypeId"
>> from-field="parameters.productAssocTypeId"/>
>>          <call-service service-name="searchDuplicatedAncestor"
>> in-map-name="searchDuplicatedAncestorContext">
>>
>>
>>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1133343 - /ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml

Scott Gray-2
Hi Ashish,

According to the service definition in webtools that service does correctly specify a timestamp type for that attribute.  Are you sure that the parameter's type is entering the service as a String?  If so, there would be a framework level bug causing that to happen because it shouldn't be the case.

Regards
Scott

On 9/06/2011, at 12:44 AM, Ashish Vijaywargiya wrote:

> Yes I agree and we were thinking to go by this route only. In service
> definition "auto-attributes" tag is being used for pk and non-pk fields so
> we can't mention field type over there.
> Thanks Adrain for your comment.
>
> --
> Ashish
>
> On Wed, Jun 8, 2011 at 5:11 PM, Adrian Crum <
> [hidden email]> wrote:
>
>> This change wouldn't be necessary if the correct Java type was specified in
>> the service definition. In other words, the service engine should convert
>> the parameter to the correct Java data type before the simple method is
>> executed.
>>
>> -Adrian
>>
>>
>> On 6/8/2011 12:06 PM, [hidden email] wrote:
>>
>>> Author: ashish
>>> Date: Wed Jun  8 11:06:46 2011
>>> New Revision: 1133343
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1133343&view=rev
>>> Log:
>>> Bug fix. Type(Timestamp) must be mentioned in the createBOMAssoc service
>>> for the fromDate field which is currently set as a String. Thanks Suprit.
>>>
>>> Modified:
>>>
>>> ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml
>>>
>>> Modified:
>>> ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml
>>> URL:
>>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml?rev=1133343&r1=1133342&r2=1133343&view=diff
>>>
>>> ==============================================================================
>>> ---
>>> ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml
>>> (original)
>>> +++
>>> ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml
>>> Wed Jun  8 11:06:46 2011
>>> @@ -30,7 +30,7 @@ under the License.
>>>         <set field="searchDuplicatedAncestorContext.productId"
>>> from-field="parameters.productId"/>
>>>         <set field="searchDuplicatedAncestorContext.productIdTo"
>>> from-field="parameters.productIdTo"/>
>>>         <if-not-empty field="parameters.fromDate">
>>> -<set field="searchDuplicatedAncestorContext.fromDate"
>>> from-field="parameters.fromDate"/>
>>> +<set field="searchDuplicatedAncestorContext.fromDate"
>>> from-field="parameters.fromDate" type="Timestamp"/>
>>>         </if-not-empty>
>>>         <set field="searchDuplicatedAncestorContext.productAssocTypeId"
>>> from-field="parameters.productAssocTypeId"/>
>>>         <call-service service-name="searchDuplicatedAncestor"
>>> in-map-name="searchDuplicatedAncestorContext">
>>>
>>>
>>>


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1133343 - /ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml

Ashish Vijaywargiya
Thanks Scott for your valuable comment, it helps!
Please give me some time, I will get back with additional comments so that
we could discuss more on this.

--
Ashish

On Wed, Jun 8, 2011 at 6:46 PM, Scott Gray <[hidden email]>wrote:

> Hi Ashish,
>
> According to the service definition in webtools that service does correctly
> specify a timestamp type for that attribute.  Are you sure that the
> parameter's type is entering the service as a String?  If so, there would be
> a framework level bug causing that to happen because it shouldn't be the
> case.
>
> Regards
> Scott
>
> On 9/06/2011, at 12:44 AM, Ashish Vijaywargiya wrote:
>
> > Yes I agree and we were thinking to go by this route only. In service
> > definition "auto-attributes" tag is being used for pk and non-pk fields
> so
> > we can't mention field type over there.
> > Thanks Adrain for your comment.
> >
> > --
> > Ashish
> >
> > On Wed, Jun 8, 2011 at 5:11 PM, Adrian Crum <
> > [hidden email]> wrote:
> >
> >> This change wouldn't be necessary if the correct Java type was specified
> in
> >> the service definition. In other words, the service engine should
> convert
> >> the parameter to the correct Java data type before the simple method is
> >> executed.
> >>
> >> -Adrian
> >>
> >>
> >> On 6/8/2011 12:06 PM, [hidden email] wrote:
> >>
> >>> Author: ashish
> >>> Date: Wed Jun  8 11:06:46 2011
> >>> New Revision: 1133343
> >>>
> >>> URL: http://svn.apache.org/viewvc?rev=1133343&view=rev
> >>> Log:
> >>> Bug fix. Type(Timestamp) must be mentioned in the createBOMAssoc
> service
> >>> for the fromDate field which is currently set as a String. Thanks
> Suprit.
> >>>
> >>> Modified:
> >>>
> >>>
> ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml
> >>>
> >>> Modified:
> >>>
> ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml
> >>> URL:
> >>>
> http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml?rev=1133343&r1=1133342&r2=1133343&view=diff
> >>>
> >>>
> ==============================================================================
> >>> ---
> >>>
> ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml
> >>> (original)
> >>> +++
> >>>
> ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/bom/BomSimpleMethods.xml
> >>> Wed Jun  8 11:06:46 2011
> >>> @@ -30,7 +30,7 @@ under the License.
> >>>         <set field="searchDuplicatedAncestorContext.productId"
> >>> from-field="parameters.productId"/>
> >>>         <set field="searchDuplicatedAncestorContext.productIdTo"
> >>> from-field="parameters.productIdTo"/>
> >>>         <if-not-empty field="parameters.fromDate">
> >>> -<set field="searchDuplicatedAncestorContext.fromDate"
> >>> from-field="parameters.fromDate"/>
> >>> +<set field="searchDuplicatedAncestorContext.fromDate"
> >>> from-field="parameters.fromDate" type="Timestamp"/>
> >>>         </if-not-empty>
> >>>         <set field="searchDuplicatedAncestorContext.productAssocTypeId"
> >>> from-field="parameters.productAssocTypeId"/>
> >>>         <call-service service-name="searchDuplicatedAncestor"
> >>> in-map-name="searchDuplicatedAncestorContext">
> >>>
> >>>
> >>>
>
>