Model Creation for Sequential and Parallel Execution of Components

Hello Team,

Thinking of using Camunda to trigger the microservices deployment. It will have input for sequence order if there is dependency. Need help in evaluating if this can be possible- Can we create model for below requirement.

1 Application==> will have multiple microservices to deploy that will have schedule time and sequence number as input.

Lets Say: MS below is Micro Service
APP A => MS 1 => Sequence # 1
APP A => MS 2 => Sequence # 1
APP A => MS 3 => Sequence # 2
App A => MS 4 => Sequence # 3
APP A => MS5 => Sequence # 3

So here MS1 and 2 can be deploy parallel as they have same sequence number as 1 but for MS3 it has to wait until MS1 and MS2 are finishes as there is order dependency and then runs MS4 and 5 once MS3 is complete an they can be trigger parallel.

So now my input of # of microservices and their sequence number is dynamic. 1 APP may have 5 MS with different pattern of dependency in execution other may have 10.

Could you please help me how would i create model for such conditions?

Also can communda connect to mongodb if it needs to read any status fields ?

Thank you in advance for your help- Trying to leverage Camunda as Microservice deployment orchestrator.