Platform Explorer / Nuxeo Platform LTS 2017 9.10

Component org.nuxeo.automation.scripting.internals.AutomationScriptingComponent

Implementation

Javadoc: org.nuxeo.automation.scripting.internals.AutomationScriptingComponent

Services

Extension points

Contributions

XML source

<?xml version="1.0"?>
<component name="org.nuxeo.automation.scripting.internals.AutomationScriptingComponent" version="1.0">

   <documentation>
    Automation Scripting is a Nuxeo module which provides ability to create and contribute Automation chain/operation in JavaScript.
    
    For backward compatibility with version prior to 9.1, you may want to inline the context in the scripting parameters by contributing the
    extension 
    <code>
      <extension target="org.nuxeo.runtime.ConfigurationService" point="configuration">
        <property name="nuxeo.automation.scripting.inline-context-in-params">true</property>
      </extension>
    </code>
  </documentation>
  
  <require>org.nuxeo.ecm.core.operation.OperationServiceComponent</require>

  <implementation class="org.nuxeo.automation.scripting.internals.AutomationScriptingComponent" />

  <service>
      <provide interface="org.nuxeo.automation.scripting.api.AutomationScriptingService" />
  </service>

   <extension target="org.nuxeo.runtime.ConfigurationService" point="configuration">
     <documentation>
       Configuration property for enabling backward compatibility with scripting parameters where
       context variables were inlined.
     </documentation>
     <property name="nuxeo.automation.scripting.inline-context-in-params">false</property>
   </extension>
   
  <extension-point name="operation">
    <documentation>
      <scriptedOperation id="Scripting.HelloWorld">
        <inputType>string</inputType>
        <outputType>string</outputType>
        <param name="lang" type="string"/>
        <script>
          function run(input, params) {
          if (params.lang === "fr") {
          return "Bonjour " + input;
          } else {
          return "Hello " + input;
          }
          }
        </script>
      </scriptedOperation>
    </documentation>
    
    <object
      class="org.nuxeo.automation.scripting.internals.ScriptingOperationDescriptor" />
  </extension-point>


</component>

Documentation

Automation Scripting is a Nuxeo module which provides ability to create and contribute Automation chain/operation in JavaScript.

For backward compatibility with version prior to 9.1, you may want to inline the context in the scripting parameters by contributing the extension

    <extension point="configuration" target="org.nuxeo.runtime.ConfigurationService">
        <property name="nuxeo.automation.scripting.inline-context-in-params">true</property>
    </extension>