03-26-2012 05:42 AM
<activiti:taskListener event="assignment" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<extensionElements>
<activiti:field name="script"><activiti:string>my script is here</activiti:string>
<activiti:field name="runAs"><activiti:string>admin</activiti:string>
<extensionElements>
</activiti:taskListener>
03-27-2012 12:27 PM
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="runAs"><activiti:string>admin</activiti:string></activiti:field>
<activiti:field name="script">
<activiti:string>YOUR SCRIPT GOES HERE</activiti:string>
</activiti:field>
</activiti:taskListener>
04-19-2013 05:31 PM
this.authorityService.isAdminAuthority(AuthenticationUtil.getFullyAuthenticatedUser())
within the enableAccount method returns false
.
<activiti:executionListener event="start" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
<activiti:field name="runAs"><activiti:string>admin</activiti:string></activiti:field>
<activiti:field name="script">
<activiti:string>
var userName = bpm_package.children[0].properties['cm:userName'];
var person = people.getPerson(userName);
// Add the person to the group
var group = people.getGroup(mwf_groupName);
people.addAuthority(group, person);
// Enable account
logger.log('Enabling account for user [' + userName + ']');
people.enableAccount(userName);
</activiti:string>
</activiti:field>
</activiti:executionListener>
02-08-2013 11:38 PM
02-09-2013 04:48 AM
02-10-2013 02:35 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.