You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Nicolas Malin (Jira)" <ji...@apache.org> on 2021/09/17 13:09:00 UTC

[jira] [Closed] (OFBIZ-12322) Groovy DSL failed to use 'run service' from an event call

     [ https://issues.apache.org/jira/browse/OFBIZ-12322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nicolas Malin closed OFBIZ-12322.
---------------------------------
    Fix Version/s: Upcoming Branch
                   18.12.01
       Resolution: Fixed

> Groovy DSL failed to use 'run service' from an event call
> ---------------------------------------------------------
>
>                 Key: OFBIZ-12322
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12322
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 18.12, Trunk
>            Reporter: Nicolas Malin
>            Assignee: Nicolas Malin
>            Priority: Major
>              Labels: DSL, groovy
>             Fix For: 18.12.01, Upcoming Branch
>
>
> When you call a groovy script from an event controler, some information are present note on the same place on the binding context.
> Example if you call a groovy script as service you can found the userLogin with parameters.userLogin or when you call it as event, the userLogin is on the root.
> The problem appear with the DSL method 'run service' who search the missing value need by a service (userLogin, locale and timzone) on the map parameters on the binding context, so failed to populate correctly the information for an event.
> Call from event 
> {code:java}
> Map serviceResult = run service: 'createInvoice', with: [partyId: partyId, invoiceDate: nowTimestamp]{code}
> Failed due to security issue : missing userLogin on the service context.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)