Exclusive gateway condition

Hello,
I am using exclusive gateway for approve and decline process but while using gateway sequence flow condition by using only approve they give me error as boolean



What I put here I am little bit confused.

I would maybe use a drop down instead.
If the variable created by the dropdown is called status and the values are either approved or declined then your expression on the sequence flows leaving your gateway should read

status = approved
and
status = declined

2 Likes

Hi @Niall Sir,
as per your comment i used dropdown
and that condition is working fine.
but while running the workflow it showing wrong flow on the operate when i select the Approved it is showing declined. you can see my attached file.



Regards,
Supriya K

Hi @Supriya , the value approved or declined is stored in the variable Approval. Refer the 1st screenshot.

So the condition expression should be

  • Approval = "approved"

  • Approval = "declined"

4 Likes

Thank you @aravindhrs it is working now.
but when i am testing with endpoint means i am starting process by this endpoint by using zeebe client
PUT - http://localhost:8080/rfpworkflow
body - {“rfpvalue”:1000}
then error coming like this on the gateway Expected result of the expression ‘rfpvalue >= 2000’ to be ‘BOOLEAN’, but was ‘NULL’.
i have attached files plz check




Please review and check.
Thanks & Regards,
Supriya K

The output of your DMN table says boolean - when in fact it’s producing a string. So you need to change that.

Thanks @aravindhrs for spotting my missing quotes in that example :slight_smile:

1 Like

i did changes but still error same while using endpoint but when i am sarted instance from modeler then it is working fine.
i change data type but still coming. please help me here.
dropdown.form (771 Bytes)
purchaseamount (2).dmn (2.3 KB)
rfpworkflow (1).bpmn (17.3 KB)
i added here my files please check and review. i did not get the root cause where i am doing wrong while checking PUT- http://localhost:8080/rfpworkflow.

When you’re starting your process from the PUT, the variable rfpvalue is not getting set. Since it doesn’t match either condition in the DMN, the “ApprovalBy” and “Approved” won’t be set. … However that doesn’t matter at the point you’re getting the error, because your flows aren’t looking at “Approved” they’re only looking at rfpvalue. (Side note: rfpvalue = 2000 will now cause you issues since it matches on both flows)

Where exactly did you get the details for the PUT statement you’re using?
Is that a custom endpoint that you’ve written?

i am following this project link GitHub - berndruecker/customer-onboarding-camunda-8-springboot: A simple onboarding process example using BPMN, Camunda Cloud, Java, Spring Boot and REST for start custom endpoint
and i have created the class.

The line you commented out (line 34) is what sets the variable.
I don’t know Spring well enough to guide you on how to parse the body to look for your variables.

Once you have the rfpvalue in your class, then you can attach it into the call to the process engine (as shown in the commented line)

Hi @aravindhrs, as per your suggestion i did changes. before it is working now it is giving same error.
Expected result of the expression ‘rfpvalue >= 2000’ to be ‘BOOLEAN’, but was ‘NULL’.
and i am explain you what i am doing here,
my workflow is on purchase process order.

  1. if that purchase amount(rfpvalue<=2000) then it will go to the project enginner then he will approve the task or declined the task
  2. if the purchase amount (rfpvalue>=2000) then it will go project engineer as well as project manager. here i am using parallel gateway.
    but i dont know where i am doing mistake.
    can you help me here.
    Regards,
    Supriya K


You will continue to get that as long as you have the line commented out and try to use the PUT interface. If you use the “Start Instance” from modeler, you should be fine.

The images in your last post do not contain any parallel gateways.