cancel
Showing results for 
Search instead for 
Did you mean: 

start workflow with a class java

sawa
Champ in-the-making
Champ in-the-making
Hi, I want to create a Java backed webScript that start a workflow. I've seen some tutorials and tried to do the same but i don't know what to put in the workflowService.getAllDefinitionsByName("???????") to access the workflow (because my workflow doesn't appear at s/api/workflow-definitions

also I don't know how to indicate that after uploading a document in a space my class should be invoced ( i've created a rule and indicated that a javascript should be run  if a document is upload) but now with a class java i don't know how to proceed because there is no option in creating a rule related to java classes.
tks for helping me

2 REPLIES 2

jpotts
World-Class Innovator
World-Class Innovator
Log in to Alfresco Explorer (http://localhost:8080/alfresco) then go to the workflow console (http://localhost:8080/alfresco/faces/jsp/admin/workflow-console.jsp). From there you can do a show definitions all to see the list of deployed workflows, including their names.

If you want to run Java code when a document is uploaded to a space, one way to do that would be to write your Java code as an action executer. Then you can tell your rule to invoke the action when the rule criteria is met. If you need to learn how to write an action, see: http://ecmarchitect.com/alfresco-developer-series-tutorials/actions/tutorial/tutorial.html

Jeff

sawa
Champ in-the-making
Champ in-the-making
Thank you very much for your help Smiley Happy