Uploaded image for project: 'Alfresco'
  1. Alfresco
  2. ALF-15969

Support for parameters in script actions

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 4.1 Enterprise
    • Fix Version/s: None
    • Component/s: Rules and Actions
    • Labels:
      None
    • Resolution Time Custom Field:
      201 weeks, 4 days, 9 hours, 38 minutes, 53 seconds

      Description

      It's possible to create javascript actions using spring config e.g.

      <bean id="runScript" parent="script">
      <property name="scriptLocation">
      <bean class="org.alfresco.repo.jscript.ClasspathScriptLocation">
      <constructor-arg>
      <value>alfresco/extension/script/runscript.js</value>
      </constructor-arg>
      </bean>
      </property>
      <property name="publicAction">
      <value>true</value>
      </property>
      </bean>

      These script actions can be exposed to the user via share-config and action forms. However, unlike Java actions, it’s not possible declare and pass in additional parameters that can be used by the script. This means you have to create a unique script for every variation of the script behaviour and also limits the use to simple actions (you can’t pass in parameters from the action form).

      This task is to add the ability to (optionally) pass in parameters as args to script actions via the share action config (share-config-custom.xml) and/or as parameters exposed and captured from the action forms UI. Note, Java actions already support support this.

        Attachments

          Structure

            Activity

              People

              • Assignee:
                closedissues Closed Issues
                Reporter:
                mfarman Mike Farman
              • Votes:
                4 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response:

                  Structure Helper Panel