02-15-2007 04:14 AM
02-15-2007 09:01 AM
02-15-2007 09:06 AM
import javax.faces.context.FacesContext;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.web.action.ActionEvaluator;
import org.alfresco.web.app.servlet.FacesHelper;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.service.namespace.QName;
public class WorkflowEvaluator implements ActionEvaluator {
public static final QName MY_TYPE = QName.createQName("my.documents.model", "mydocument");
public WorkflowEvaluator()
{
}
public boolean evaluate(Node node)
{
boolean res = false;
if(node.getType().isMatch(MY_TYPE) )
res = true;
return res;
}
}
<config>
<actions>
<action id="start_workflow">
<label-id>start_workflow</label-id>
<image>/images/icons/new_workflow.gif</image>
<evaluator>com.myapplication.evaluator.WorkflowEvaluator</evaluator>
<action>wizard:startWorkflow</action>
<action-listener>#{WizardManager.setupParameters}</action-listener>
<params>
<param name="item-to-workflow">#{actionContext.id}</param>
</params>
</action>
</actions>
</config>
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.