You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Jacques Le Roux <ja...@les7arts.com> on 2016/02/15 16:06:11 UTC
Re: New Service Execution API?
We though suffered from a dozen of regression bugs when we did the Entity Query migration.
So we will need to do careful reviews when we will do the same for the New Service Execution API
Jacques
Le 15/01/2016 08:46, gil portenseigne a écrit :
> +1
>
> It's would be a very nice improvement !
>
> Thanks Scott.
>
> Gil
>
> On 14/01/2016 13:21, Jacques Le Roux wrote:
>> I'm all for syntactic sugar :)
>>
>> Jacques
>>
>> Le 14/01/2016 00:07, Scott Gray a écrit :
>>> Following a builder pattern a bit like EntityQuery:
>>>
>>> ServiceResult createProductResult = ServiceContext.create(dispatcher,
>>> userLogin)
>>> .add("brandName", brandName)
>>> .add("productName", productName)
>>> .add("longDescription", description)
>>> .add("internalName", internalName)
>>> .add("introductionDate", UtilDateTime.nowTimestamp())
>>> .add("productTypeId", "FINISHED_GOOD")
>>> .newTransaction()
>>> .runSync("createProduct");
>>> if (createProductResult.isError()) {
>>> return ServiceUtil.returnError("Could not create Product: " +
>>> createProductResult.getErrorMessage());
>>> }
>>> productId = createProductResult.getString("productId");
>>>
>>>
>>> Calling a service from java always seems so cumbersome to me, maybe
>>> something like the above would make it a little bit nicer?
>>>
>>> Regards
>>> Scott
>>>
>
Re: New Service Execution API?
Posted by Scott Gray <sc...@hotwaxsystems.com>.
That's not bad considering we made many thousands of changes.
On 16 Feb 2016 04:06, "Jacques Le Roux" <ja...@les7arts.com>
wrote:
> We though suffered from a dozen of regression bugs when we did the Entity
> Query migration.
> So we will need to do careful reviews when we will do the same for the New
> Service Execution API
>
> Jacques
>
> Le 15/01/2016 08:46, gil portenseigne a écrit :
>
>> +1
>>
>> It's would be a very nice improvement !
>>
>> Thanks Scott.
>>
>> Gil
>>
>> On 14/01/2016 13:21, Jacques Le Roux wrote:
>>
>>> I'm all for syntactic sugar :)
>>>
>>> Jacques
>>>
>>> Le 14/01/2016 00:07, Scott Gray a écrit :
>>>
>>>> Following a builder pattern a bit like EntityQuery:
>>>>
>>>> ServiceResult createProductResult = ServiceContext.create(dispatcher,
>>>> userLogin)
>>>> .add("brandName", brandName)
>>>> .add("productName", productName)
>>>> .add("longDescription", description)
>>>> .add("internalName", internalName)
>>>> .add("introductionDate", UtilDateTime.nowTimestamp())
>>>> .add("productTypeId", "FINISHED_GOOD")
>>>> .newTransaction()
>>>> .runSync("createProduct");
>>>> if (createProductResult.isError()) {
>>>> return ServiceUtil.returnError("Could not create Product: " +
>>>> createProductResult.getErrorMessage());
>>>> }
>>>> productId = createProductResult.getString("productId");
>>>>
>>>>
>>>> Calling a service from java always seems so cumbersome to me, maybe
>>>> something like the above would make it a little bit nicer?
>>>>
>>>> Regards
>>>> Scott
>>>>
>>>>
>>
>