03-20-2019 10:05 AM
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!
03-21-2019 10:25 AM
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
03-22-2019 12:21 AM
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.
06-24-2022 08:55 PM
I think APA is the answer here going forward.
https://docs.alfresco.com/process-automation/latest/model/triggers/#webhooks
Explore our Alfresco products with the links below. Use labels to filter content by product module.