'Camunda /External Task/ Connecting Python with BPM

I would like to create a simple Python Script and use it to perform a service task in my BPMN process. Does anyone know how I can use a Python script in a service task?



Solution 1:[1]

I'm attaching the references that you could use with the specific configuration. Note : from BPMN perspective you just need to give the task type to the service task which you will use in script to identify the task.

  1. For Camunda -7 and local setup to execute the service task you can follow https://medium.com/@klauke.peter/implementing-an-external-task-worker-for-camunda-in-python-566b5ebff488

  2. For Camunda -8 and zeebe setup you will have to make a slight change while creating the channel you will have to use "from pyzeebe import create_camunda_cloud_channel" for the functional implementation you can find it in the ref url https://pyzeebe.readthedocs.io/en/latest/channels.html#camunda-cloud You can also refer once you created the channel and started the process https://forum.camunda.io/t/boundary-event-error-handler/37272 In this url you will have code for handling service task and then also the boundary task

Solution 2:[2]

You can't use a python script IN a service task, but you can use a python script as an external task worker, this repo will probably be a good starting point for you.

dg

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Sachin Rajput
Solution 2 Davidgs