I am calling a Flow from Apex as below. In Flow I am running a duplicate check. If there is a duplicate I am saving it into a Variable that is marked as Available for output. How the return value is null. Has anyone had experience with return values from Flows?
Flow.Interview.Duplicate_Payee_Check DupeCheck = new Flow.Interview.Duplicate_Payee_Check (params);
DupeCheck.start();
// Obtain the results
String returnValue = (String) DupeCheck.getVariableValue('ReturnValue');
System.debug('Flow returned ' + returnValue);