Jacopo, I open the issue
https://issues.apache.org/jira/browse/OFBIZ-9523 with a patch related to
you suggest
Regards,
Nicolas
Le 01/07/2017 à 10:59, Jacopo Cappellato a écrit :
Make valid service context :
in minilang
<set-service-fields service-name="createProduct" map="context"
to-map="createProductMap"/>
Currently with groovy we need to call the dispatchcontext
Map createProductMap = dispatcher.getDispatchContext(
).makeValidContext('createProduct', 'IN', parameters)
My idea would be like that
Map createProductMap = prepare service: 'createProduct' //to pool from
groovyCtx
or
Map createProductMap = prepare service: 'createProduct' with:
parameters //to pool from parameters
or
Map createProductMap = prepare service: 'createProduct' with:
parameters mode: 'IN' //to pool from parameters and indicate the mode
We could probably improve the GroovyBaseScript.runService(...) method to
always prepare a valid context before calling the service; in this way we
would simply call runService passing the context map.