How to work with two or three bpm files with single main class in spring boot

Hi team,

How to work with two or three bpm files with single main class in spring boot.

suppose, if we have switch case or nested if else based on the condition it should call and execute related bpmn file.

If i have subprocess then how to store subprocess data and use/validate in side main process

thanks
rk

@Ramakrishna Can you please elaborate more on what you are trying to achieve. If you are using spring boot you can expose your own rest end points and then choose which Workflow you want to start or interact with. I am not fully understanding what are you trying to achieve.

@salaboy… below one is my requirement

int day = 4;
switch (day) {
case 1:
System.out.println(“Monday”);
callMondayJobBPMN();//it should connect to MondayJob.BPMN and start the process
break;
case 2:
System.out.println(“Tuesday”);
callTuesdayJobBPMN();//it should connect to Tuesday.BPMN and start the process
break;
case 3:
System.out.println(“Wednesday”);
callWednesdayJobBPMN();//it should connect to Wednesday.BPMN and start the process
break;
case 4:
System.out.println(“Thursday”);
callThursdayJobBPMN();//it should connect to Thursday.BPMN and start the process
break;
case 5:
System.out.println(“Friday”);
callFridayJobBPMN();//it should connect to Friday.BPMN and start the process
break;
case 6:
System.out.println(“Saturday”);
callSaturdayJobBPMN();//it should connect to Saturday.BPMN and start the process
break;
case 7:
System.out.println(“Sunday”);
callSundayJobBPMN();//it should connect to Sunday.BPMN and start the process
break;
}

how can we achieve this …is there any example in github or another.please refer

thanks
rk

I am doing something similar here:

Where I am getting a “proposal” object from the REST endpoint and then starting a workflow instance of the C4P workflow. You can just add an if there to choose between different workflows depending on your input, in your case “day”

great, thank you @salaboy :+1:

thanks
rk