lockService.lock(actionedUponNodeRef, LockType.READ_ONLY_LOCK); // En LockActionExecuter
y lockService.unlock(actionedUponNodeRef); // En UnlockActionExecuter
<!– Declaraciones para el bloqueo/desbloqueo de documentos durante el workflow –>
<bean id="lock" class="es.mypackage.repo.lock.LockActionExecuter" parent="action-executer" >
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="lockService">
<ref bean="lockService" />
</property>
</bean>
<bean id="unlock" class="es.mypackage.repo.lock.UnlockActionExecuter" parent="action-executer" >
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="lockService">
<ref bean="lockService" />
</property>
</bean>
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="bpm_package" access="read" />
<expression>
var unlockAction = actions.create("unlock");
var lockAction = actions.create("lock");
for (var i = 0; i < bpm_package.children.length;i++) {
unlockAction.execute(bpm_package.children[i]);
bpm_package.children[i].properties["cgsi:estado"] = "En Revisión";
bpm_package.children[i].save();
lockAction.execute(bpm_package.children[i]);
}
</expression>
</script>
</action>
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.