Custom Action in Share

I`ll extract the information from here;  and here:
This post = just to be able to quickly grab the files I need to change to add more buttons.

In the Share project (part of the my personal Eclipse setup)


.doclist .onActionXopus a {    background-image: url(plaatje-16.gif) !important; }



/** DocumentList “Recalculate Workflow ” action **/
(function() {
Alfresco.doclib.Actions.prototype.onActionRecalculateWorkflow = function DL_onActionRecalculateWorkflow(asset)  {
nodeRef = new Alfresco.util.NodeRef(asset.nodeRef);
alert(“comment MJB=” + file.nodeRef);
} )  ( ) ;


…..add this line …..
<#– WF Action –>
<@link rel=”stylesheet” type=”text/css” href=”${page.url.context}/res/components/documentlibrary/recalculate-workflow-action.css” />
<script type=”text/javascript” src=”${page.url.context}/res/components/documentlibrary/recalculate-workflow-action.js”></script>


…..add this line …..
<action type=”action-link” id=”onActionRecalculateWorkflow” permission=”edit” label=”actions.document.recalculateWorkflow” />


… there is still something missing here….

..  i’ll figure that out soon….


Workflow in Javascript.

I cant’ make it more clear than this person is doing – so here’s the link to his blog ;

Also – this can explain quite a lot.

But I still can manage to assign a task to a certain user….

This seems usefull information.


The personal task list denotes all the task instances that are assigned to a specific individual. This is indicated with the property actorId on a TaskInstance. So to put a TaskInstance in someone’s personal task list, you just use one of the following ways:
  • Specify an expression in the attribute actor-id of the task element in the process
  • Use TaskInstance.setActorId(String) from anywhere in your code
  • Use assignable.setActorId(String) in an AssignmentHandle

However; Assignable, assignable and TaskInstance cannot be called directly in javascript.

…. <time passes>

…. < more time passes>

And I`m back to messing around with the swimlanes. It seems they have priority over setting parameter in bmp-assignee and other values. So I solved it like this;

<swimlane name=”assignee”>
<assignment class=”org.alfresco.repo.workflow.jbpm.AlfrescoAssignment”>

Lesson learned – This week I`ll close with a succesfull working workflow and next week i`ll start adding behaviour.

More workflows in Alfresco

Still working on workflows;

This is  good example to make a workflow with a lifecycle.

I only run into some issues with user authentication. If I start a workflow (as admin) on a txt document and refer it to a user (myself) there are some authentication errors. It might have something to do with this code;

<swimlane name=”reviewer”>
<assignment class=”org.alfresco.repo.workflow.jbpm.AlfrescoAssignment”>

I have no solution yet.. So back to research..


I am following the step-by-step guide to creating a custom workflow.

The anwser to my question, regarding how to get / where to place a new custom-workflow-context.xml file got answered in this very usefull forum topic –

I am once again a little frustrated with the Alfresco system.
Why? The “hello world” workflow won’t work… The simplest.xml workflow didn’t work.
And “A system error happened during the operation: null”  is not really a good error in my humble opinion.