workflow status on a third-party website

134 views Asked by At

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?)

2

There are 2 answers

0
Stefan De Laet On

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.

<bean id="webscript.com.mycompany.workflowinformation.get" class="com.mycompany.GetWorkflowinformation"  parent="webscript">
    <property name="workflowService">
        <ref bean="WorkflowService" />
    </property> 
</bean

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.

7
Krutik Jayswal 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.

http://localhost:8080/alfresco/service/api/task-instances?authority=admin&properties=bpm_priority,bpm_status,bpm_dueDate,bpm_description&exclude=wcmwf:*&skipCount=0&maxItems=50