Unable to transform decisions from input stream

Hi,
I have a problem with my project. When I debug at the “DmnDecision decision = dmnEngine.parseDecision(“anamnesi”, inputStream);” line it gives me the following error: Unable to transform decisions from input stream.
I am attaching my project:

The main class is:

package org.camunda.bpm.getstarted.malattierenali;

import java.io.IOException;
import java.io.InputStream;
//import java.io.StringWriter;

//import org.camunda.bpm.application.impl.ServletProcessApplication;
import org.camunda.bpm.dmn.engine.DmnDecision;
import org.camunda.bpm.dmn.engine.DmnDecisionTableResult;
import org.camunda.bpm.dmn.engine.DmnEngine;
import org.camunda.bpm.dmn.engine.DmnEngineConfiguration;
import org.camunda.bpm.engine.variable.VariableMap;
import org.camunda.bpm.engine.variable.Variables;

public class MalattieRenaliApplication /extends ServletProcessApplication/{
public static void printUsage(String errorMessage, int exitCode) {
System.err.println(“Error: " + errorMessage);
System.exit(exitCode);
}
static String convertStreamToString(java.io.InputStream is) {
java.util.Scanner s = new java.util.Scanner(is).useDelimiter(”\A");
return s.hasNext() ? s.next() : “”;
}
public static void main(String[] args) {

	String infezione = "si";
	VariableMap variables = Variables
			.putValue("infezione", infezione);

	// create a new default DMN engine
	DmnEngine dmnEngine = DmnEngineConfiguration.createDefaultDmnEngineConfiguration().buildEngine();
	InputStream inputStream = MalattieRenaliApplication.class.getResourceAsStream("/MalattieRenali.dmn");
	String x = convertStreamToString(inputStream);

	try {
		//System.out.println("debug");
		DmnDecision decision = dmnEngine.parseDecision("anamnesi", inputStream); // blocca qui
		
		// evaluate decision
		DmnDecisionTableResult result = dmnEngine.evaluateDecisionTable(decision, variables);

		// print result
		String Diagnosi = result.getSingleResult().getSingleEntry();
		System.out.println("Diagnosi: " +Diagnosi);

	}
	catch (Exception e) {
		System.err.println("Could not close stream: "+e.getMessage());
		e.printStackTrace();
		}
	finally {
		try {
			inputStream.close();
		}
		catch (IOException e) {
			System.err.println("Could not close stream: "+e.getMessage());
		}
	}	
}

}

The pom is:
pom.xml (2.7 KB)

Can you help me?
Thank you.

Valentina Ungaro

continue…

…continue

The bpmn diagram is:
MalattieRenali.bpmn (5.8 KB)

The dmn diagram is:
MalattieRenali.dmn (1.8 KB)

Hi @valentina.u,

I can’t reproduce your issue. With Camunda 7.9, I’m able to parse the decision. When I try to evaluate the decision then I get an exception:

org.camunda.bpm.dmn.feel.impl.juel.FeelMissingVariableException: FEEL-01009 Unable to resolve variable 'si' in expression 'si'

To fix this error, you must use strings for the input entries (“si” and “no”). Currently the input entries have no quotes.

Best regards,
Philipp