I was wondering if there is a way of using a webhook to start a process in Process Services from an external app/system? I have a very simple process that starts, sends an email to alert me that it has started, and then ends. What I was hoping to achieve was the ability to start this process from an external app (using a webhook), the process runs in Process Services, and then communicates a message back to the external app (again using a webhook) that simply reads "process complete" for example. I have asked the question (in the wrong Gitter room!) to which I was advised on using the "Recieve task" trigger in my process and the "Rest call task" trigger to simulate the incoming and outgoing web hooks. I am a bit confused on how I can achieve this using these triggers? (Apologies, I am at a beginner level with Process Services!).
Any help would be very much appreciated, thanks in advance!
Hi Zayed,
It is possible to invoke an APS process via REST API from an external webhook. I have an example of an APS process being invoked from a Jira webhook. Sample code here :GitHub - benro/DEVCON2018: Alfresco Devcon 2018 - APS+Serverless+Webhooks Sample using Jira and AWS ...
And a deep dive here: Alfresco DevCon 2018: APS + Serverless + Webhooks - YouTube
Hope this helps.
Ben
I think you can achieve this by using Alfresco proces services public rest apis.
for your solution what you can call
http://{yourdomain)/activiti-app/api/enterprise/process-instances
this api will start the process instance. you may need to pass the variables required by the start form if configured. This APIs Reponse will give you Process instance id.using this process instance id you can invoke next task of the process.
http://{yourdomain)/activiti-app/api/enterprise/tasks/query
Where this task can be again REST task which can trigger your custom API. I hope i this way it will help you.
I think APA is the answer here going forward.
https://docs.alfresco.com/process-automation/latest/model/triggers/#webhooks
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.