Is there any function to print all variables created in BPMN process at a time with single function

Is there any function to print all variables created in BPMN process at a time with single function
I have created around 70 variables and I just want to see the variables assigned values, is there any way to print all variables details in the log with single function (without mentioning all the variables names to print)…

Hi @venky1982, you have not provided much context information about how you want to execute the function to print the variables. So, I chose to believe you are using a service task that calls a Java Delegate. In the Java Delegate, this code will provide the result you are looking for:

    Map<String, Object> variables = delegateExecution.getVariables();
    variables.entrySet().forEach(entry->LOGGER.info("{} = {}", entry.getKey(), entry.getValue()));

This will produce output like:

var3 = 3.33
var2 = Two
var1 = 1
1 Like

Thank you Dan.