Workflow in Javascript.

I cant’ make it more clear than this person is doing – so here’s the link to his blog ;
http://thoughtworker.in/2008/05/29/alfresco-workflow-managed-by-javascript/

Also – this can explain quite a lot.
http://docs.jboss.com/jbpm/v3/userguide/taskmanagement.html#tasktimers

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

This seems usefull information.

11.3.3. THE PERSONAL TASK LIST


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”>
<actor>#{people.getPerson(“incentro”)}</actor>
</assignment>
</swimlane>

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.

http://wiki.alfresco.com/wiki/WorkflowSample_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”>
<actor>#{bpm_assignee}</actor>
</assignment>
</swimlane>

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

Using Lucene search to find all user nodes in Alfresco.

Login to alfresco. Goto Administration console / Nodebrowser.
Select Lucene in the dropdown box @ search

Enter this query :

PATH:”/app:company_home/app:user_homes/*”

Results in all directories in the user_homes. As far as I know this should be equal to the users in the system. Note that this does not include the alfresco admin user. This has Company Home as ‘user-home’

The above code skipped users guest and admin. I decided to use this query:

TYPE:”cm:person”

This also gives admin and guest accounts and seems more natural to use.