I am creating a method that will call multiple flows. However I am receiving the following error - Variable does not exist: Interview. I have tried using both static and non static to no avail. Below is my code.
public void runFlows(List<Accrue_FlowOrderMap> flowMaps) {
for(Accrue_FlowOrderMap flow : flowMaps) {
try {
Map<String, Object> params = new Map<String, Object>();
for(Accrue_FlowParams flowParam : flow.params) {
params.put(flowParam.paramName, flowParam.paramValue);
}
Flow.Interview flowToRun = Flow.Interview.createInterview(flow.flowName, params);
flowToRun.start();
} catch (Exception e) {
System.debug(e.getMessage());
}
}
}