Hi.
I have to implement some bpm logic in PHP. This logic is used by a Task inside camunda.
What is the best way to achieve it ?
Reading the forum two solutions are viable:
- Creating a Service Task in Camunda. This task will call an exposed REST PHP Service that execute the desired logic.
- Creating an External Task and make a Worker in PHP that connects, polls camunda waiting tasks, execute the logic, and completes the task.
The point (2) will require to write a Worker in PHP, so an event driven piece of code, so a separated thread for each event, and this can be a bit tricky in php, and in fact camunda-php-sdk does not have a method ‘registerWorker’ while both camunda-dotnet and camunda-node do have it.
The point (1) seems the most viable and easy and requires me to expose only rest php services to camunda. But this will mean I have to limit execution time of the task by the max time of a url request in php (usuallly this is always limited to a couple of minutes). Most of the time this is not a real problem, as I try to mantain logic as compact and fast as possible.
Any suggestions ?