Conditional milestones

I have a Human task for flagging an approval boolean. After that I have two milestons (“Approved”, “Rejected”).
I connect the output of the human task (“completed”) with the two milestones. I use the EntryCriterion for checking the value of the boolean field and entering in one or the other milestone.
After the milestone i would like to complete the case.
Every things seams working fine but the Case is not completed because the milestone that was not entered seams it is still pending.
My question is: how to create a simple approve case that terminate when one of the two milestone is occured ?

If i embed this case into a process the process will never go ahead until both milestone are not satisfied

image
Thanks

For example you can use caseStatus as processVariable and pass on to XOR Gateway. XOR Gateway. In XOR gateway you can check for caseStatus. Depending up on the status you can either call relevant downstream event.

I need to set a milestone depending on the approval variable. I can’t use a process. It doesn’t manage milestone

Are you using BPMN or CMMN?

Milestones can be used just in CMMN files as far as i know. I’m using CMMN file

Please tag it in CMMN group.

Sorry, I’m not familiar with this forum. How I can tag it ?

I’m not able to find a CMMN group

In CMMN, this is possible using Sentry. Please take a look at https://docs.camunda.org/get-started/cmmn11/milestone/

This is exactly what i used. The right path is taken but at the end the case is not terminated and the process that embeds it can’t proceed.
Attaching the two file required for the execution.
You can deploy both and start the .bpmn file from the cockpit passing a boolean variable “otpVerified” at the start up. You will not be able to complete the process.
Change Email.bpmn (2.6 KB) Change Email.cmmn (7.7 KB) .

Thanks