Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebService Task in Camunda

Tags:

camunda

In Camunda BPM designer, I couldn't find activity and for invoking a REST or SOAP based webservices. Is it only possible to invoke through wiring code? How do I pass payload to the code if it needs to be written using java code.

Regards,

Phani

like image 373
Srinivas Avatar asked Mar 05 '15 15:03

Srinivas


People also ask

What is a service task in Camunda?

A service task represents a work item in the process with a specific type. When a service task is entered, a corresponding job is created. The process instance stops here and waits until the job is complete. A job worker can subscribe to the job type, process the jobs, and complete them using one of the Zeebe clients.

How do I run a service task in Camunda?

Add a Service Task to the Process Use the Camunda Modeler to add a service task after the user task. To do so, select the activity shape (rectangle) and drag it onto a sequence flow (see screenshot). Name it Process Request. Change the activity type to Service Task by clicking on it and using the wrench button.

What is a service task in BPMN?

A service task is an activity within a process that uses a service. You need a BPMN diagram must be open.

What is Camunda task list?

Tasklist is an out-of-the-box web application that's tightly integrated with Camunda's process orchestration capabilities. Simply model a business process using the BPMN standard and deploy it to the Workflow Engine; when a user needs to work on a task, they'll see it appear in Tasklist.


2 Answers

You can invoke a Webservice inside a bpmn.

You can create a Task of type Service, and choose in Properties/Details/Implementation: Connector.

Next you configure Connector properties, setting:

Connector Id: http-connector (for rest json webservices) and Input Parameters:

  • url (e.g. http://localhost:8080/client?id=12
  • method GET/POST
  • headers type MAP: Accept application/json...

You receive the webservice response as Process Variables, configuring the Output parameters as follows :

  • response, type text, value ${response}
  • returnCode, type text, value ${statusCode}

Hope this helps you

like image 97
Francisco Avatar answered Nov 12 '22 02:11

Francisco


For start: please note that camundas claim is "developer friendly". It's never been the goal of camunda components to just "click together" a working process. If you are looking for such a solution, you should a) have a look at the zero coding myth and b) maybe choose another tool.

That being said, check out the camunda-connect framework, introduced with 7.2, it should do what you need (though it involves xml coding).

like image 37
Jan Galinski Avatar answered Nov 12 '22 01:11

Jan Galinski