Showing posts with label JBPM. Show all posts
Showing posts with label JBPM. Show all posts

Saturday, February 5, 2011

Organization Hierarchy in Alfresco

Alfresco, as we know, does not support implementation of Organization Hierarchy.
For example, you cannot establish the hierarchy of your Organization via the user details in Alfresco.

Very often, you need setting up the user hierarchy in the ECM system, for example if you want to implement automatic assignment of tasks to your superior.

You, however, can use the owner property of the user object to store the superior's user-id. Thus you can have full parent-child relationships between users in alfresco.

You can also create a custom aspect having the properties reflecting hierarchy information, associate that with user type (cm:person), and hold the relevant data into that.

One interesting implementation of this is, if you have your organization hierarchy stored in your AD or LDAP, you directly import this information while synchronizing the user data with alfresco. In the post on Alfresco Authentication and Integration with Active Directory, I have given some example on synchronizing the LDAP attributes into alfresco like

ldap.synchronization.userLastNameAttributeName=sn
ldap.synchronization.userEmailAttributeName=mail
ldap.synchronization.groupIdAttributeName=cn


You can add another custom synchronization setting along with these to import the Boss Id of the current user.


For Businesses

Implementing and Storing the Organization Hierarchy in an ECM system like Alfresco has quite a few business advantages. Implementing automatic workflows within departments requires the system to know the manager's id of the user.
You can implement the departments of your organization as Sites in Alfresco Share; however, the roles Collaborator, Contributor etc are not hierarchical, and thus unable to translate the pecking order of a particular organization. One way to implement this is to create groups and sub-groups as per departments.

Tuesday, January 25, 2011

Task Comments in Alfresco jBPM workflow as process variable

It is very powerful to have alfresco JavaScript APIs accesible in node event scripts in jBPM workflows.

Most of the workflow variables are accesible in jBPM process definition in alfresco.
Such as bpm:assignee is available as bpm_assignee, bpm:workflowDueDate is available as bpm_workflowDueDate, bpm:workflowPriority as bpm_workflowPriority etc

But the task Comments entered by the user is unfortunately not available directly. However, you can still access it by the following syntax in the script.

var comment = ""; 
if (token.comments.size() > 0) 
    comment = token.comments.get(0).message;

The comment variable is now available in your script.