Reputation: 1690
I'm trying one thing, when I create a workflow in a specific file, if I try to create another workflow, I want to verify if exists a workflow created and show a warning to the user (call a specific JAVA class that make this and more things, if necessary). What is the better way to make the verification and call the JAVA class?
Thanks.
Upvotes: 0
Views: 56
Reputation: 1419
On Share side you can use the existing evaluator in order not to show an indicator or hide/show action for example.:
<evaluator>evaluator.doclib.indicator.activeWorkflows</evaluator>
On Repository side you can use an existing webscript:
/alfresco/templates/webscripts/org/alfresco/repository/workflow/workflow-instances-for-node.get.desc.xml .
This webscript will ultimately call java method:
serviceRegistry.getWorkflowService().getWorkflowsForContent(NodeRef node, boolean active);
You can pick either entry point...
Upvotes: 2