cancel
Showing results for 
Search instead for 
Did you mean: 

Invoke Activity process/project as a Web Service

alexander81
Champ in-the-making
Champ in-the-making
Hello,
I recently discovered Activity as a BPMN engine and while the documentation provides great information on how to define web service clients as part of a process, yet I could not identify whether an Activity process or project may be invoked as a web service of any kind (e.g. SOAP or REST).
<!–break–>
A similar concept is provided in BPEL engines, exposing a project as a web service provider (although the whole approach is more technical-wise rather than business-wise).
If the aforementioned feature is available, could you please point me to any available resources/documents?
<!–break–>
Thank you in advance
7 REPLIES 7

alexander81
Champ in-the-making
Champ in-the-making
To forum moderators: As I cannot edit (or even delete) my initial post, could you please perform the following:
1. Replace 'Activity' with 'Activiti'.
2. Edit topic title as 'Expose Activiti process/project as a Web Service'.
3. Delete this comment of mine.

Thanks for your actions

jbarrez
Star Contributor
Star Contributor
No, Activiti does not have this capability that a process itself can be exposed as a webservice.

Also, no need to make those adjustments, we're all friends here 😉

alexander81
Champ in-the-making
Champ in-the-making
Thanks Joram for your prompt response!
Therefore, to my understanding, the unique invocation method of a starting process is via a HTTP call?

trademak
Star Contributor
Star Contributor
Right, via a HTTP / REST call.

alexander81
Champ in-the-making
Champ in-the-making
Hello trademak!
Since a REST call is a feasible invocation means for a starting Activiti process, doesn't that imply that the process itself is exposed as a Web Service?

For example, let me describe the following use case:
* Client invokes Activiti via a REST call in order to start the execution of process XYZ, using POST runtime/process-instances (see: http://activiti.org/userguide/index.html#N13CE6). Input parameter "processDefinitionKey" should be XYZ.
* Activiti dispatches a REST response indicating the process instance ID that just started. Let's assume ID=7.
* Client repeatedly invokes GET history/historic-process-instances/7} (see: http://activiti.org/userguide/index.html#N152AE) in order to verify whether the process has been completed. Once "endTime" output parameter is not empty, the loop is terminated.
* Assuming that process XYZ does not contain any manual/form tasks, the Client has successfully invoked it using a Web Service approach.

I would appreciate if you could provide me with your feedback regarding the points mentioned above.
Thank you in advance!

trademak
Star Contributor
Star Contributor
What does it mean that the process itself is exposed as a web service? Activiti provides a REST API to interact with a process definition or instance based on a number of query options. This API is generic, there's no specific API available for each process definition. What would be the use case of having such a specific API?

Best regards,

alexander81
Champ in-the-making
Champ in-the-making
Hello!
I am not suggesting any changes in the way Activiti is invoked; I only commented on Joram's response.

In my initial post I asked
whether an Activiti process or project may be invoked as a web service of any kind (e.g. SOAP or REST).
According to the user manual, the existing REST API allows an Activiti process to be exposed as a Web Service, meaning there is absolutely no need for human interaction E2E (as seen in the use case I described in my previous post).