+1.

There is a limitation in UtilMisc.toMap() method where you can pass at max
6 parameters. I think here you are proposing that we will be able to pass
any number parameters to the service or there will be limitation of max 6
parameters that can be passed?

Thanks!

--
Kind Regards
Ashish Vijaywargiya
HotWax Systems - est. 1997

On Thu, Jan 14, 2016 at 4:37 AM, Scott Gray <scott.g...@hotwaxsystems.com>
wrote:

> 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
>

Reply via email to