In Alfresco community launched workflow, for example Approval document. I want to show workflows details on personal website(the status of the process, the start date, term) How can I implement it? (Repository JavaScript API,RESTful API or what else?)
workflow status on a third-party website
157 views Asked by Tackle Berry At
2
There are 2 answers
7
On
You should use webscript,create webscript for getting details of workflow.In webscript you can filter data also.Other option is to use CMIS API of alfresco.
In case of webscript ,you will get more idea on below link.
https://wiki.alfresco.com/wiki/Web_Scripts
I just get realized,that there is already one webscript which returns workflow details.If you dont need extra information other than this you can use this.You can also add some extra fields in this.For more details of this webscript.Browse webscripts by hitting http://localhost:8080/alfresco/serviceindex url.
I think the easiest way is to build a java backed webscript. This means you create a spring bean which extends from webscript. (more info in https://wiki.alfresco.com/wiki/Web_Scripts#Java-Backed_Implementations )
In this spring bean you should inject the workflowservice.
You can then use this WorkflowService in your java class to query information about the state and the tasks of your workflow. Then return this information using your webscript response writer.