cancel
Showing results for 
Search instead for 
Did you mean: 

Start Alfresco Workflow from Java

eramesh
Champ on-the-rise
Champ on-the-rise

Hi,

We have created custom review workflow and deployed to Alfresco repository and wanted to start this workflow outside Alfresco using java, couldn't find right REST service or any other method to do this. Can you please help me on how I can achieve this? We are using Alfresco 5.0

Thanks!

1 ACCEPTED ANSWER

douglascrp
World-Class Innovator
World-Class Innovator

Judging by the available documentation for 5.0 version here Workflow | Alfresco Documentation , I think there is no way to start a new instance the way you want to do.

Maybe you should take a look on how webscripts are implemented, and then create your own.

The following project introduced a new start workflow webscript, but be carefull, as the project is not being maintained anymore

GitHub - douglascrp/alfresco-workflow-webscripts: Project implementing the missing workflows webscri... 

View answer in original post

5 REPLIES 5

douglascrp
World-Class Innovator
World-Class Innovator

Judging by the available documentation for 5.0 version here Workflow | Alfresco Documentation , I think there is no way to start a new instance the way you want to do.

Maybe you should take a look on how webscripts are implemented, and then create your own.

The following project introduced a new start workflow webscript, but be carefull, as the project is not being maintained anymore

GitHub - douglascrp/alfresco-workflow-webscripts: Project implementing the missing workflows webscri... 

Excellent! Thank you so much!

Hi Douglas,

One follow-up question I got to add two documents to the workflow when I start how can I add it? Please let me know.

Thanks!

douglascrp
World-Class Innovator
World-Class Innovator

You have to do something like this:

community-edition-old/ActivitiWorkflowServiceIntegrationTest.java at master · Alfresco/community-edi... 

Basically what you need is to create the "package" object, add the documents and it is done.

Follow the sample code and you will be able to achieve what you need.