You need to sign in to do that
Don't have an account?
Lynn M Grande
Error: Compile Error: Constructor not defined when initiating a flow from scheduled apex
When I try to call a flow from apex, i get an error. I am not sure if there is an issue with the flow or how i am calling it.
global class scheduleUpdateAccountTeamwithDSM implements Schedulable{
global void execute(SchedulableContext ctx)
{
startFlow();
}
public void startFlow()
{
Flow.Interview.myFlow startFlow= new Flow.Interview.myFlow ();
startFlow.start();
}
}
global class scheduleUpdateAccountTeamwithDSM implements Schedulable{
global void execute(SchedulableContext ctx)
{
startFlow();
}
public void startFlow()
{
Flow.Interview.myFlow startFlow= new Flow.Interview.myFlow ();
startFlow.start();
}
}
Even though you aren't passing a variable into your flow, you still need to pass an empty map into the constructor. Try the following instead:
See the following post for a better example: http://andyinthecloud.com/2014/10/26/calling-flow-from-apex/