2.2.4.18. Script Action

This plugin is used to import the predefined script actions into the system.

To use the plugin in the component configuration, you must use the following target-component:


<target-component>org.exoplatform.services.cms.actions.ActionServiceContainer</target-component>

The configuration is applied mainly in packaging/wcm/webapp/src/main/webapp/WEB-INF/conf/dms-extension/dms/dms-actions-configuration.xml.

Sample configuration:


<external-component-plugins>
    <target-component>org.exoplatform.services.cms.actions.ActionServiceContainer</target-component>
    <component-plugin>
        <name>exo:scriptAction</name>
        <set-method>addPlugin</set-method>
        <type>org.exoplatform.services.cms.actions.impl.ScriptActionPlugin</type>
        <init-params>
            <object-param>
                <name>predefined.actions</name>
                <description>description</description>
                <object type="org.exoplatform.services.cms.actions.impl.ActionConfig">
                    <field name="repository">
                        <string>repository</string>
                    </field>
                    <field name="workspace">
                        <string>collaboration</string>
                    </field>
                    <field name="actions">
                        <collection type="java.util.ArrayList">
                            <value>
                                <object type="org.exoplatform.services.cms.actions.impl.ActionConfig$Action">
                                    <field name="type">
                                        <string>exo:trashFolderAction</string>
                                    </field>
                                    <field name="name">
                                        <string>trashFolder</string>
                                    </field>
                                    <field name="description">
                                        <string>trigger actions for items in trash</string>
                                    </field>
                                    <field name="srcWorkspace">
                                        <string>collaboration</string>
                                    </field>
                                    <field name="srcPath">
                                        <string>/Trash</string>
                                    </field>
                                    <field name="isDeep">
                                        <boolean>false</boolean>
                                    </field>
                                    <field name="lifecyclePhase">
                                        <collection type="java.util.ArrayList">
                                            <value>
                                                <string>node_added</string>
                                            </value>
                                            <value>
                                                <string>node_removed</string>
                                            </value>
                                        </collection>
                                    </field>
                                </object>
                            </value>
                        </collection>
                    </field>
                </object>
            </object-param>
        </init-params>
    </component-plugin>
</external-component-plugins>

In which:

Name Type Default Value Description
repository string repository The name of the repository.
workspace string collaboration The name of the workspace.
actions ArrayList {java.util.ArrayList} The list of actions.
Name Type Default Value Description
type string exo:trashFolderAction The type of the action.
name string trashFolder The name of the action.
description string trigger actions for items in trash The description of the action.
srcWorkspace string collaboration The source workspace of the action.
srcPath string /Trash The path to the source.
isDeep boolean false Specifies the depth of node that the action script will affect.
lifecyclePhase ArrayList node_added, node_removed Specifies the lifecycle phase that the action will take place.
Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus