• Brian Hayes 12
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
I have a Apex test class to test a Salesforce flow.  When I added zero wait (resume as-soon-as-possible) pause elements, the test no longer passed.  I added the pause elements to deal with the transaction limits being encountered during bulkification.

What's a good solution to check for the flow being completed before executing the Test.stopTest() and performing assertions? 

From what I've seen, there's no method on the Flow.Interview class for checking the flow completion status or for getting the flow instance id (start() returns void).  I also see that there's a FlowInterview object that can be queried using SOQL; but, I worry about being able to idenify the unique flow instance if there are multiple instances of the flow with the same name.

Note, I did create a work around that I'm not satisfied with.  I added a NoPause boolean input to the flow and then put a decision elment before each pause where the decision element checks the value of NoPause.  In this way, the Apex test can provide the NoPause input set to true and the test passes.  Unfortunately, this does not execute the typical path through the flow.

Thanks in advance!
I have a Apex test class to test a Salesforce flow.  When I added zero wait (resume as-soon-as-possible) pause elements, the test no longer passed.  I added the pause elements to deal with the transaction limits being encountered during bulkification.

What's a good solution to check for the flow being completed before executing the Test.stopTest() and performing assertions? 

From what I've seen, there's no method on the Flow.Interview class for checking the flow completion status or for getting the flow instance id (start() returns void).  I also see that there's a FlowInterview object that can be queried using SOQL; but, I worry about being able to idenify the unique flow instance if there are multiple instances of the flow with the same name.

Note, I did create a work around that I'm not satisfied with.  I added a NoPause boolean input to the flow and then put a decision elment before each pause where the decision element checks the value of NoPause.  In this way, the Apex test can provide the NoPause input set to true and the test passes.  Unfortunately, this does not execute the typical path through the flow.

Thanks in advance!
Hi All,

Can anyone please suggest me how can we use break, continue in flow builder loop like apex. I have screen flow where I am using loop Logic. In this loop, if loop veriable contains 3 records/String values then if my condition is met in first iteration; I just want to stop my loop.

Any help regarding this would be highly appriciated.

Thanks in Advance!
Pawan 

I need to know what syntax to use to parse the street number out of the standard street address field in a trigger.  I only need up to the space in my custom field.

 

Any help would be greatly appreciated.