cancel
Showing results for 
Search instead for 
Did you mean: 

Missing 'Run Action' wizard on Alfresco Share

vinmoc
Champ in-the-making
Champ in-the-making
Hi to all,
I'm using Alfresco (v4.0c) about a month, now I want to send a document (from alfresco Site's share) by email with "Run Action" command, but
When I click on the View Details command "Run Action" is missing.

How can I do to activate this command?

VM
2 REPLIES 2

jpotts
World-Class Innovator
World-Class Innovator
Unlike Alfresco Explorer, Alfresco Share does not have "Run Action" in the UI action list. We may add this in a future release, however. Until then, there is a partial workaround. If you are using Alfresco 4, an action called "document-execute-script" has been defined, it just hasn't been added to any "actionGroups". If you add it to an actionGroup you can then execute server-side JavaScript. So, you could write a quick little script that invokes an action, place it in Data Dictionary/Scripts, and then use the Execute Script action to run it.

The execute script action can be added to an action group by creating a share-config-custom.xml file in $TOMCAT_HOME/webapps/share/WEB-INF/classes/alfresco/web-extension with the following:
<alfresco-config>
    <config evaluator="string-compare" condition="DocLibActions">
        <actionGroups>
       <actionGroup id="document-details">
                <action index="500" id="document-execute-script" />
            </actionGroup>
        </actionGroups>
    </config>
</alfresco-config>
For people running 3.4, have no fear. There is an Alfresco Add-On that provides execute script functionality in Share. It's part of the Share Extras project on Google Code.

Server-side JavaScript that runs an action might look like:
var mailAction = actions.create("mail");
mailAction.parameters.to = "someone@someco.com";
mailAction.parameters.subject = "Mail notification";
mailAction.parameters.from = "you@someco.com";
mailAction.parameters.text = "Consider yourself notified, friend." ;
mailAction.execute(document);
Hope that helps,

Jeff

qsdmv
Champ in-the-making
Champ in-the-making
Jeff,

You might know my case. We have been running alfresco 3.4.8 for a while. We have customized permission definition. When we access the space or content, "Run action" doesn't show in the action list which is exactly what we want. But after upgrading to 3.4.13, we didn't change the permission definition file, "Run action" for some reason shows in the action list. Do you know what is the reason the behavior changes after upgrading? Thanks for your help in advance.