Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-21850

Automation Scripting Output is discard by the compiler

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 8.10
    • Fix Version/s: QualifiedToSchedule
    • Component/s: Automation

      Description

      When using an automation script with a Blob output, studio recognize it, generate the right operation :

       <scriptedOperation id="javascript.scriptOutputBug">
            <inputType>document</inputType>
            <outputType>blob</outputType>
            <category>javascript</category>
            <description></description>
            <script><![CDATA[function run(input, params) {
              return Document.GetBlob(input, {});
      }]]></script>
          </scriptedOperation>
      

      But when you try to run it on a server, the following Exception is thrown :

      Caused by: org.nuxeo.ecm.automation.InvalidChainException: Cannot find any valid path in operation chain - no method found for operation 'WebUI.DownloadFile' and for first input type 'org.nuxeo.ecm.core.api.impl.DocumentModelImpl'
      	at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.buildChain(CompiledChainImpl.java:166)
      	at org.nuxeo.ecm.automation.core.impl.ChainTypeImpl.newInstance(ChainTypeImpl.java:154)
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:200)
      	... 108 more
      

      With a chain configured like this:

          <chain id="downloadFile">
            <operation id="Context.FetchDocument"/>
            <operation id="javascript.scriptOutputBug"/>
            <operation id="WebUI.DownloadFile"/>
          </chain>
      

      The workaround is to use a Push/Pull and configure the operation with a void output

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rcattiau Rémi Cattiau
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: