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.


Starting with an empty SQL database.

I did this before. Actually many times before actually, but if I don’t practice enough or document how to do it, I forget how to do it. I am (of course) talk about dropping and recreating a database.

So here’s how to drop the local alfresco SQL database and create a new *fresh* one.

– Start command windows (Str => Run => CMD)
–  cd C:\alfresco-enterprise-tomcat-3.4.4\mysql\bin

(make sure the database is running at this time)

mysql -ualfresco -palfresco

mysql> drop database alfresco;
mysql> create database alfresco default character set utf8 collate utf8_bin;

I renamed the folder : C:\alfresco-enterprise-tomcat-3.4.4\alf_data\
to C:\alfresco-enterprise-tomcat-3.4.4\alf_data_old
and copied the underlying folders mysql and oouser back to the new alf_data folder.

Then restart Alfresco & it should be working.
All empty, all fresh.
Time to put in some new stuff.

NodeService vs nodeService

No, i am not speaking about a class and the instance of that class.

There are 2 node service beans “nodeService” and “NodeService”. The first is the internal bean, the second is the public service: the first bean wrapped with security and transactional proxies.

For a day I have been searching how to solve the error:

No authentication provider for net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken

My Java class defined this:
NodeService nodeService = serviceRegistry.getNodeService();
Now I found out that this is the one with more security settings.

To solve it, I added the bean property:

<property name=”nodeService”>
<ref bean=”nodeService” />

And added this function to my .java class

public void setNodeService(NodeService nodeService) {
this.nodeService = nodeService;

Big thanks to this post :

And so now it’s working. Time to get to cracking at the interesting part…