01-26-2011 09:09 AM
public static void addAspect(NodeRef nodeRef, String comment) {
CheckOutCheckInService checkOutCheckInService = AlfrescoServices.getServiceRegistry().getCheckOutCheckInService();
AlfrescoServices.getNodeService().addAspect(nodeRef, ContentModel.ASPECT_VERSIONABLE, null);
NodeRef nodeRefWorkingCopy = checkOutCheckInService.checkout(nodeRef);
checkOutCheckInService.checkin(nodeRefWorkingCopy, Utils.getMinorVersionProperties(comment));
}
public static Map<String, Serializable> getMinorVersionProperties(final String comment) {
Map<String, Serializable> versionProperties = new HashMap<String, Serializable>();
versionProperties.put(Version.PROP_DESCRIPTION, comment);
versionProperties.put(VersionModel.PROP_VERSION_TYPE, VersionType.MINOR);
return versionProperties;
}
01-27-2011 08:09 AM
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<runas>admin</runas>
<script>
logger.log("Person " + person.properties["firstName"]);
</script>
</action>
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.