Battle_Slug
Battle_Slug

Reputation: 2105

How to make the Activiti workflow in Activiti Explorer call the outer Java program

I installed the Activity Explorer, and H2 standalone server. Everything works fine, as I see: I can start a workflow, claim and complete user tasks, but that's not enough. I need the workflow to call external services, suppose via REST. But I have no idea how to deploy the code to do that. Is that possible using javascript (or groovy) in the workflow xml, or is there any way to inject Java code, or even deploy Java module? I am totally confused about the technology, any example could help.

Upvotes: 2

Views: 1273

Answers (1)

Battle_Slug
Battle_Slug

Reputation: 2105

I am sorry for this type of question derived from my lack of experience... Anyway, I would like to answer it. One should wright a class implementing JavaDelegate, and pute desirable code inside the execute(..) method, compile, export as jar and put the jar in WEB-INF/lib. In the .bpmn diagram which is pure xml, Service Task node there should have a reference to that class. I think there enough key words to have a clue how to search details, so that's all for now.

Upvotes: 5

Related Questions