cancel
Showing results for 
Search instead for 
Did you mean: 

Web-Hooks and Activiti Explorer

popowich
Champ in-the-making
Champ in-the-making
Hello. I got acquainted with Activiti and with Java quite recently too (I more C# the developer). I developed Activiti Explorer and by means of Eclipse at me it turns out to create some simple charts and to write to them classes on Java.
At present I have a task. There is a Web service to which I have to give hookUrl - the address to which service will send these events. On the party I it have to accept and zaprustit process in Activiti Explorer.
I try to understand week as it can be implemented, I rely on a manual 5.7.4. REST support I try to implement an example. But I cannot understand:
1. Where to me to place the library with the classes MyService, MyRestController (probably.\Tomcat 9.0\webapps\activiti-explorer\WEB-INF\lib)?
2. How to connect this library to Activiti cursor (probably through the activiti-custom-context.xml file)?

Perhaps I absolutely what not so I do that? direct please me in the necessary direction.
6 REPLIES 6

jbarrez
Star Contributor
Star Contributor
Am I correct in my understanding that you're asking how to send something via HTTP?
If so, you need to have a Java class that implements the JavaDelegate interface. In the execute method, use a library like HttpClient to do the call and store your results in variables.

You need to put that class on the classpath indeed (WEB-INF/lib)

popowich
Champ in-the-making
Champ in-the-making
On the contrary, to receive changes of the task in other service (www.wrike.com), this about an event, on HTTP they provide so-called Webhooks on which I can create a subscription. And after obtaining these data process in Activiti Explorer shall be launched

jbarrez
Star Contributor
Star Contributor
Ah ok, now I'm following. That's something you'll have to write yourself, Activiti doesn't have anything out of the box there.
You'll have to write a bit of logic that listens to that event and starts the process instance.

popowich
Champ in-the-making
Champ in-the-making
Well, I will write to the logician responsible for reception of events how to me from my code to launch process how it is correct to connect my logic to Activiti Explorer? direct me please in a correct naprvleniye, can be specify the section in a manual

jbarrez
Star Contributor
Star Contributor
I'm not understanding a lot of what you're saying sadly Smiley Sad

Anyhow, the code for Activiti Explorer is open and you can get it here: https://github.com/Activiti/Activiti/tree/master/modules/activiti-explorer

popowich
Champ in-the-making
Champ in-the-making
Forgive for such bad English (((I will try to understand the problem.