Is REST API response on starting process instances with nothing but DMN decisions always synchronous (ended=true)?

Hi there,

Update:
I just found the following in the API documentation: “A flag indicating whether the process instance has ended or not. Deprecated: will always be false!” So my question became obsolete.

I am using Camunda REST API to start a process instance (POST /process-definition/key/{key}/start) of a process that includes nothing but simple DMN decisions based on the input. The process does neither require any user interaction nor does it gather information from any other system.

The response of the API always contains “ended = true”.

My question is:
Does Camunda REST API ensure that the process completes before it sends its response (because Camunda might be intelligent enough to understand that it can complete the process on its own) or may I get an “ended = false” one day?

I’m just wondering if “ended” is always “true” by accident because my process is that simple and fast and actually completes before the response is generated. If that’s the case and the process gets more complex over time, I might face some issues with my current code and should change it’s behaviour.

I’m new to the whole topic and wasn’t able to google an answer, so please go easy on me.

Thanks in advance.

Steffen

Hi,

Have a quick read of asynchronous continuations [1].

Hence if you call the start API, the request will return when either the process completes or an asynchronous continuation is reached. Hence you have some control over the semantics of the API.

regards

Rob

[1] https://docs.camunda.org/manual/7.6/user-guide/process-engine/transactions-in-processes/#asynchronous-continuations

1 Like

Hi Rob,

the link and your summary helped a lot. Thank you!

Best regards

Steffen