You need to sign in to do that
Don't have an account?
Barracks
Test Class for apex class which calls a flow.interview with Schedulable
Hi Guys,
I was wondering if someone can help me, I'm trying to run a test class for a simple Apex class the calls a Flow Interview.
It also implements schedulable.
How do I write a test class for this? I could not find any documentation for this sort of use cases.
I was wondering if someone can help me, I'm trying to run a test class for a simple Apex class the calls a Flow Interview.
It also implements schedulable.
How do I write a test class for this? I could not find any documentation for this sort of use cases.
global class TestHelloWorld implements Schedulable{ global void execute(SchedulableContext sc) { Map<String, Object> params = new Map<String, Object>(); Flow.Interview.ReturnHelloWorld helloWorldFlow = new Flow.Interview.ReturnHelloWorld(params); helloWorldFlow.start(); } }
I don't have a controller and I'm not using batch.
I tried copying your code but it said 'Variable does not exist: query'
I still cannot use it, I don't know how.
The code I provided in the original post is the entire code so I'm not sure what you mean by ' you have to correct based on your needs..'.
anyway, I get this error: "Line 7 Varaible dos not exist: ReturnHelloWorld"
although the Flow is called ReturnHelloWorld and it is activated.