"Universal" REST Service in Camunda

Hi, Niall

Is it possible to add to Camunda’s build-in REST API collection one “Universal” REST Service with the abitity to:

  1. Run selected Process and pass parameters/variables. It can be looks like REST Message/ProcessDefinitionStart, but service doesn’t send response while selected Process executing.
  2. After finishing Process execution, “Universal” REST Service send response with the list of process variables.
    I.e. this “Universal” REST Service return requested data in synchronous mode in the same session.

Why is this service so important ?

  1. You can close the Gap in REST collection. You don’t need any more to write custom services in java if somebody need to get complex data from different external sources/systems. All you need is to design process in Modeller.
  2. You can return response with data synchronously as usual.
  3. You can design any number of services with different Input/Output parameters.

Next step in evolution can be support SOAP/XML standart, may be, only for this “Universal” Service to make all types of integration with external systems.

It sounds like what you’re looking for may exist as part of the Camunda Swagger extension.

The idea is to add New REST with ability to start any process, wait while flow executing and return process variables in the same session.

Because of the way that transactions and HTTP requests are handled in Camunda the request will always be returned when the first wait state is reached, this might be after the process ends or when it reaches a symbol that requires a commit.

So if you wanted a feature like this it would somehow need to exist between the engine and request - some middle-ware that would be able to hold the request while poling the engine occasionally until it has completed. I’m sure there could be other ways of doing it, but any way would create a lot of challenges.

Thanks, Niall, for your feedback. I realy like Camunda’s idea to do everything by REST API, including deployment, execution, etc. That’s cool. And I think, collection will be complete, if it will be one additional “Universal” service with ability to run any BPM process, wait execution and return it results.

We have a powerfull BPM engine with complex processes design, any external integrations and sophisticated business logic you can do. But it’s no one build-in service to get access to that power out of the box.
Maybe you can talk with Camunda’s System Architect about this task. Maybe it’s possible to change the mechanism of working with HTTP do add such very important service.

Sorry for my persistence :slight_smile:.
It’s realy easy to create complex processes in Camunda. I like this. And only one additional “Universal” service will make unnecessary to write hundreds of custom services for external clients. This will be very strong competitive advantage of Camunda. Do you agree ?
I want to create BPM processes, not services.
Thanks for you help.

I can’t say i agree with you i’m sorry to say. I don’t see a value in always requiring synchronous processes. A process an take a few milliseconds or even years. In most cases you can build synchronous processes if you want to be simply not including any wait states (some customers have done that).

It’s better to start the process asynchronously and wait for a response to be told by the engine of the result. it’s better for error handling and for persisting state.