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 09:27:00 UTC

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

Nicolas Malin created OFBIZ-12322:
-------------------------------------

             Summary: 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: Improvement
          Components: framework
    Affects Versions: Trunk
            Reporter: Nicolas Malin
            Assignee: Nicolas Malin


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)