Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-12322

Groovy DSL failed to use 'run service' from an event call

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Release Branch 18.12, Trunk
    • 18.12.01
    • framework

    Description

      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

      Map serviceResult = run service: 'createInvoice', with: [partyId: partyId, invoiceDate: nowTimestamp]

      Failed due to security issue : missing userLogin on the service context.

      Attachments

        Activity

          People

            nmalin Nicolas Malin
            nmalin Nicolas Malin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: