Message correlate Rest API returns results with different format in 7.21

Camunda 7.20 used to return results in below format:

 {
    "resultType": "Execution",
    "execution": {
      "id": "9d825bb5-2e42-11ef-8694-6a58393506b1",
      "processInstanceId": "93191be7-2e42-11ef-8694-6a58393506b1",
      "ended": true,
      "tenantId": "8ff2dff9-b963-4771-8f79-c848f73d754e"
    },
    "processInstance": null,

But Camunda 7.21 /message API returns the results in format as:

  {
    "resultType": "Execution",
    "execution": null,
    "processInstance": {
      "links": [],
      "id": "82364073-2e41-11ef-83a0-ca5ac42d5f0f",
      "definitionId": "loop:5:e59ca775-2b0e-11ef-8686-4ab9be2ff35e",
      "businessKey": "test_9323eb536158466b9d7cb584e9ea6b7e",
      "caseInstanceId": null,
      "ended": false,
      "suspended": false,
      "tenantId": "8fc2dff9-b963-4771-8f79-c848f73d754e"
    },

Even the example shows older format in - Camunda Automation Platform 7.21.2 REST API

Can we know the reason of this change in 7.21 release, please ?
Also want to know where we maintain the change logs for new Camunda 7 releases.
thank you.

Hi @paddy
Is the resultType set to Execution or ProcessDefinition in the 2nd call?

resultType indicates if the message was correlated to a message start event or an intermediate message catching event. In the first case, the resultType is ProcessDefinition and otherwise Execution.

If message was correlated to a message start event then processInstance property is supposed to have a value.

If message was correlated to an intermediate message event then execution property is supposed to have a value.

Thanks @hassang for the response.
Using the message correlate POST rest API as -
/engine-rest/message
and payload to that post call as:

{"messageName":"test","processInstanceId":"cd2de6a0-2ef4-11ef-8ef7-1a298c6be596","processVariables":{"context":{"value":"{\"userid\":\"admin\"}","type":"json","serializationDataFormat":"application/json"}},"resultEnabled":"true","variablesInResultEnabled":"true"}

I am not sure where do we set “resultType” but both calls are same and difference is only the Camunda version.
Also, Its intermediate message event in both the cases but result format is different.

@hassang Any update on this ?

@thorben May I get some help/clarification here please ?
Is it expected the version upgrade can have json format response change? Or it was not intended ?
Thank you.

@hassang / @thorben
Its been almost a month now and we dont have conclusive update here.
Can someone update here ?

  1. Was the change in json response format intended and end user need to adjust the response parsing with new format ?
  2. Do we get official update in change-log or release notes around such restructure/changes ?
    Hoping some quick response on this to proceed further on deciding what should be the next action to handle such changes.
    Thanks again.

@paddy
I apologize for the created inconvenience, there was a bug in the REST API for Camunda 7.21.0:

The issue has been fixed in Camunda 7.21.2 and 7.22.0-alpha2.

2 Likes

Thanks @Yana for the update. Appreciate it.
Want to validate the fix but not sure if there is any way to try out for community edition ?
Upgrades we do are mostly from minor versions like 7.20 to 7.21.

  1. What is the correct sequence of upgrade. 7.20.0 to 7.21.0 first and then apply patches ? Or directly use 7.21.2 packages ?
  2. If we try to use 7.21.2 or even 7.21.1, it throws error :
Trying to pull docker.io/camunda/camunda-bpm-platform:tomcat-7.21.1...
Error: creating build container: initializing source docker://camunda/camunda-bpm-platform:tomcat-7.21.1: reading manifest tomcat-7.21.1 in docker.io/camunda/camunda-bpm-platform: manifest unknown

That means upgrade not possible to 7.21.1/2 directly ? Is there anyway to still get the update for community edition or we need to wait for next miinor version release expected in October this year ?

You can try the fix with Camunda 7.22.0-alpha2 that is available for the community.
Please follow the migration guide here: Update from 7.21 to 7.22 | docs.camunda.org

Thanks again @Yana
I can validate the fix. However with 7.22.0-alpha3 as “alpha-2” package is not available in docker repositories.
Response with alpha3 version:

[{"resultType":"Execution","execution":{"id":"20575372-44e8-11ef-98ba-6ea06ebcdfa6","processInstanceId":"2056de3c-44e8-11ef-98ba-6ea06ebcdfa6","ended":true,"tenantId":"9p8b09cb-5d57-4ef1-b4d4-6ab900c71673"},"processInstance":null}]

That matches with the 7.20 version API response.
Will wait on official Camunda release of 7.22. thanks

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.