Powered By Blogger

Monday, July 26, 2010

Workflow Alfresco

Let me talk about Advanced workflow today.
We can start the workflow for the empty workflow package.
To start the workflow we have to extend StartWorkflowWizard
Create the empty package and then start the workflow.


In the manageTaskDialog if you have to acees any property then that property has to be
defined in the content Model.

Sunday, July 25, 2010

Things to take care related to roles in Alfresco

1. Dont use the admin to test any functionality.To avoid access denied exception.
2. Always while developing do the role based development
Dont keep it for the end.
3. Use the below code to check whether user belongs to particular group or not

final String _user = AuthenticationUtil.getRunAsUser();
AuthenticationUtil.setRunAsUserSystem();

AuthenticationUtil.setRunAsUser(_user);
return _groupSet;
4. Dont invite any user to any folder manually
5. Start development in IE6, to avoid the fixes to be done in the later stage.
6. Before starting development know each and every field, from where that data is going to come, what all are the validations to be done for the field. And where this field will be useful.

7. To start the development finalize the content model, aspects and how to use them
8. All the properties of content model have to be picked from the constant file and for all the propereties kept in the model fil Qname has to be created
9. Based on the functionalities and the modules to be designed create different model files.
10. Based on the functionality ot the modulr follow the naming conventions so that code can be easily maintained.
11. If you have to display any proerty to the front end then pass the noderef or MapNode or node to the frontEnd, from this node access the properties.

Tuesday, July 6, 2010

Alfresco users and Groups

1. Getting the logged in user

final String _user = AuthenticationUtil.getRunAsUser();


2. Getting the usernode ref from username

final NodeRef _userRef = serviceRegistry.getPersonService().getPerson(_userName);


3. Getting the groups the user belonging to user

final Set _groupSet = this.getAuthorityService().getAuthoritiesForUser(_user);