Process Definition and version present in zeebe , but while creating instances getting error

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?

Hi @Ansh_Kumar - what version of Camunda are you using? Are you using a Self Managed instance or SaaS? What version of the Java client are you using? What is the result if you search for deployed process definitions using the Operate API?

Hii @nathan.loding ,
I am using camunda version 8.3.1 , it is self managed instance and with the spring-boot-starter-camunda 8.3.1 version , i am able to see the process definitions . i have also verified in elasticsearch indexes , all the process definitions are present in zeebe indexes.
currently i am using three partition of zeebe.