Error in "amount" identifier in the tutorial

Hi Camunda comunity,
I am going through the tutorial (First part: quick start / Java), 4th section “Involve Humans” and I receive the following error when I am launching the process in the Modeler; here is the log:

Cannot instantiate process definition payment-retrieval:2:091a80c9-ca69-11ea-a9c7-78acc0a0a162: Unknown property used in expression: ${amount>=1000}. Cause: Cannot resolve identifier ‘amount’ [ start-instance-error ]

I checked all the variables and everything is as suggested in the tutorial. I restarted Eclipse, the tasks, checked all the previous steps, still things don’t work.

@quetzi can you upload your BPMN model?

payment.bpmn (7.1 KB)

here u go, thanks in advance for help!

@quetzi, while starting the process instance are you passing the process variable “amount” ?

Deploy this bpmn and try: payment.bpmn (7.2 KB)

Changes done: Added save point “asyncBefore:true” for exclusive gateways.

Thank you for the file, I renamed it into payment2 & added it into the same folder with the other .bpmn files, nevertheless, how can I make sure that the Modeler runs this file exactly and not the previous one? When i start the process it shows me the old name “Payment Retrieval”, not the new one: “Payment Retrieval 2”.

@quetzi since you changed both the process definition key and name, on successful deployment it should list it as new process.

Hey, look goods, it worked :slight_smile:
How did you adapt that? In the XML file directly or is there somewhere among the options? Could you show me a bit how?

Also, if you have the time to check this briefly, I would appreciate it:

Best Regards,
Quetzi

Save Point or Transaction Boundaries can be set like this:


In xml representation:

<bpmn:exclusiveGateway id="Gateway_1t818pw" name="Payment Amount?" camunda:asyncBefore="true">
   <bpmn:incoming>Flow_1y5u5sg</bpmn:incoming>
   <bpmn:outgoing>Flow_0ynzqj4</bpmn:outgoing>
   <bpmn:outgoing>Flow_1183edw</bpmn:outgoing>
</bpmn:exclusiveGateway>

Read more about on Why Asynchronous Continuations is needed?

Thanks;
still, the deployment worked, but when I start the process, I still get an error in the cockpit…

@quetzi, the process expects input for this variable: amount. You can add this field as process variable while starting a process instance.

Hey, yes, I am doing it:


I will add more posts in the thread, as it seems that as a new user, I cannot post more pictures in one post.

Made sure I have the async continuations also checked:
image

Still it does not work and shows the following error:

And here in more detail:


What do you think?

@quetzi I was able to start the process.


Changes: For expressions use ‘#’ instead of '$'

<bpmn:sequenceFlow id="Flow_0ynzqj4" name="&#62;= 1000 EUR" sourceRef="Gateway_1t818pw" targetRef="Activity_1bna7sl">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{amount &gt;= 1000}</bpmn:conditionExpression>
</bpmn:sequenceFlow>

<bpmn:sequenceFlow id="Flow_1183edw" name="&#60; 1000 €" sourceRef="Gateway_1t818pw" targetRef="ID">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{amount &lt; 1000}</bpmn:conditionExpression>
</bpmn:sequenceFlow>

Deploy this bpmn file and test: payment.bpmn (7.2 KB)

I somehow still get the same error, but now with “#” instead of “$”. I need another solution / the correct way in passing the variable ‘amount’ which I cannot manage to find quickly somehow. I followed al the steps of the training but still I think something is not entirely right.


This is the one that you sent me, which I did not modify at all, it throws the same error

@quetzi did you deployed the BPMN mentioned in this post?