I want to develop an app preferbly on servlet environment . I want to trigger alfresco out of box workflow webscripts from my app. Alfresco has provided restful URL for doing that.
can anyone tell me how do i invoke the rest URL to invoke the webscripts from my java code.
can anyone pls give me a sample code or manual for that as I have limited experience in webservice.
I need bit clear and detailed explaination..
Thanks
You could use the Apache HTTP Client library to perform RESTful (JSON requests/posts).
Here is a tutorial how to do a post/get to an Alfresco like server: RESTful Java client
Replace the example url's with the Alfresco urls defined in the Workflow REST API. Furthermore before you do all this, you need to authenticate to Alfresco.
http://localhost:8080/alfresco/service/api/login?u=admin&pw=admin
<ticket>TICKET_887add1e01b5c4c0cd58ac11c768f8e54c1eabf4</ticket>
http://localhost:8080/alfresco/service/api/workflow-definitions
so present the Ticket like following: http://localhost:8080/alfresco/service/api/workflow-definitions?alf_ticket=TICKET_887add1e01b5c4c0cd58ac11c768f8e54c1eabf4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With