Migration api/execute: processids cannot empty

Hello there,

we are using v 7.10 and would like to migrate a process instance to a newer version.
I followed the steps in your documentation on how to migrate over the rest api but get stuck at step 3: the execution.
I fill in all required fields as shown, even add a processInstanceId in the processInstanceId array field but receive the error: “processIds cannot empty: process ids is empty”.

The request body is:
“migrationPlan”: {
“sourceProcessDefinitionId”:“af568258-64c1-11eb-ae19-02420a640001”,
“targetProcessDefinitionId”:“0487b419-7140-11eb-9461-02420a640002”,
“instructions”:[
{“sourceActivityIds”:[“st-unsnooze-user-tasks”],“targetActivityIds”:[“st-unsnooze-user-tasks”],“updateEventTrigger”:false},
{“sourceActivityIds”:[“ut-check-cabinet-type”],“targetActivityIds”:[“ut-check-cabinet-type”],“updateEventTrigger”:false},
“processInstanceIds”:[“f6a8c396-66de-11eb-b667-02420a640001”],
“processInstanceQuery”: {“processDefinitionId”: “af568258-64c1-11eb-ae19-02420a640001”},
“skipCustomListeners”: false
}}

what a I missing here? thank you

Maybe i dont know something, but that is not look like camunda rest api error message, maybe you are using some kind of proxy? this is the correct camunda error message if process instances are empty:

{
“type”: “BadUserRequestException”,
“message”: “Process instance ids cannot empty: process instance ids is empty”
}

Next thing, the request you pasted is invalid json request, that is the correct one:

{
	"migrationPlan": {
		"sourceProcessDefinitionId": "af568258-64c1-11eb-ae19-02420a640001",
		"targetProcessDefinitionId": "0487b419-7140-11eb-9461-02420a640002",
		"instructions": [
			{
				"sourceActivityIds": [
					"st-unsnooze-user-tasks"
				],
				"targetActivityIds": [
					"st-unsnooze-user-tasks"
				],
				"updateEventTrigger": false
			},
			{
				"sourceActivityIds": [
					"ut-check-cabinet-type"
				],
				"targetActivityIds": [
					"ut-check-cabinet-type"
				],
				"updateEventTrigger": false
			}
		],
		"processInstanceIds": [
			"f6a8c396-66de-11eb-b667-02420a640001"
		],
		"processInstanceQuery": {
			"processDefinitionId": "af568258-64c1-11eb-ae19-02420a640001"
		},
		"skipCustomListeners": false
	}
}

Small hint for a next topic, Always attache unformatted data without any special characters from ms word like “ or ” it’s hard to reproduce because first anyone interested need to change whole text format.

thank you, i tried looking for an option to format it but couldn’t find any. The JSON is valid when executing, I just removed some instructions because there were quite many and it seems when removing I messed up the JSON structure.

I get indeed this error message:

{
“type”: “BadUserRequestException”,
“message”: “Process instance ids cannot empty: process instance ids is empty”
}

I still have the issue that it wont execute.

push, the problem still occurs unfortunately.