JAVA Project And Condition Type

Hello I’m very new to Camunda. In my first test developing BPMN project i have used only modeler and all works fine!
Now I’m trying to develop a MAVEN project with BIG ISSUE ( I’m Not a developer):
I have an Exclusive Gateway with this condition on Expression


And the variable is defined in a FORM

When I’m trying to Build With MAVEN INSTALL I have this error
Unknown property used in expression: ${!secondo}. Cause: Cannot resolve identifier ‘secondo’
In this case how I can define property ?inserimento_assegnazione_v3.bpmn (16.3 KB)

The complet test project here Gofile - Free Unlimited File Sharing and Storage

That error means that you’re not correctly creating a variable called secondo before the process reaches the gateway

Thank you Niall ,I figured it was for this reason. But at this point, I would like to understand how I can define this variable in the JAVA project which is confirmed in the form HTML ?

I would suggest you start by watching some tutorial videos to get yourself familiar with the basics concepts

Hellp Niall, thanks for your reply. I don’t have the error using Delegate Class. Is it correct ?

package org.camunda.bpm.quickstart;

import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;

public class CheckApprovatoreDelegate implements JavaDelegate {

@Override
public void execute(DelegateExecution execution) throws Exception {
	// TODO Auto-generated method stub
	execution.setVariable("secondo", false);
	execution.setVariable("approvato", false);
	

}

}

Looks good to me. assuming you run that before the gateway it should be fine.

1 Like