Error: ‘NOT_FOUND’: Expected to find process definition with process ID ‘XYZBpmnProcessId’ and version ‘3’, but none found?
while creating the process instances in camunda 8 i am getting these error , why it is happening . After retrying it is getting created . but i dont want to retry but message correaltion are happening to create event subprocesses , but if process is not created , it will get missed.
i am using these method to create processInstance:
ProcessInstanceEvent processInstanceEvent = zeebeClient
.newCreateInstanceCommand()
.bpmnProcessId("XYZBpmnProcessId")
.version(3)
.variables(processVariables)
.send()
.join();
one more observation when i am using these method
ProcessInstanceEvent processInstanceEvent = zeebeClient
.newCreateInstanceCommand()
.bpmnProcessId("XYZBpmnProcessId")
.latestVersion()
.variables(processVariables)
.send()
.join();
sometimes it is creating processInstance of version 2 , and sometime it is creating processInstance of version 3.
how to solve these scenario?