06-07-2012 04:03 AM
<bean id="onBeforeDeleteMyFolder" class="org.alfresco.repo.policy.registration.ClassPolicyRegistration" parent="policyRegistration">
<property name="policyName">
<value>{http://www.alfresco.org}beforeDeleteNode</value>
</property>
<property name="className">
<value>{my.test.com}MyDocument</value>
</property>
<property name="behaviour">
<bean class="org.alfresco.repo.jscript.ScriptBehaviour" parent="scriptBehaviour">
<property name="location">
<bean class="org.alfresco.repo.jscript.ClasspathScriptLocation">
<constructor-arg>
<value>alfresco/extension/scripts/onBeforeDeleteNode.js</value>
</constructor-arg>
</bean>
</property>
</bean>
</property>
</bean>
try {
var currentUsername = person.properties.userName;
}
catch (e)
{
logger.log ("error: " + e.message);
}
logger.log("currentUsername: " + currentUsername);
DEBUG [repo.jscript.ScriptLogger] error: "person" is not defined.
06-26-2012 04:23 AM
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.