• Steven Wilson 47
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi all,

I am running into the CPU time limit exceeded error when I try to bulk import data into our org. Because I don't have coding knowledge myself, I was hoping to use visual workflows instead. The data that we sync has up to 22 fields that have 0's and 1's for the field input and I want to change these into "Yes" and "No" picklist values. The reason that I didn't want to use a formula field is because sometimes we also manually create records and I wanted to be able to choose Yes/No values. I also couldn't use checkboxes as per the instructions I received. 

Here is process flow I created

User-added image

What I did is I created 22 action groups for each of the binary fields. The action group criteria was to check if the picklist value is a 0 or 1 and if so, it'll kick in the immediate actions.

Here is part of the error message I received below. It seems like it's running but it's just slow..? 
Flow Details
Flow Name: Listing_Workflow_for_Binary_Fields
Type: Workflow
Version: 3
Status: Active

Flow Interview Details
Interview Label: Listing_Workflow_for_Binary_Fields-3_pba__Listing__c
Current User: Keith Kiefer (005150000066qU6)
Start time: 1/22/2017 4:13 PM
Duration: 17 seconds

How the Interview Started
Keith Kiefer (005150000066qU6) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = null
myVariable_current = a091500001MLez0AAD
RecursiveCountVariable = 0.00

ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "1/22/2017 4:13 PM"

DECISION: myDecision
Executed this outcome: myRule_1
Outcome conditions: and
1. {!formula_myRule_1} (true) Equals true
Logic: All conditions must be true (AND)

DECISION: myRule_1_pmetdec
Executed this outcome: myRule_1_pmetnullrule
Outcome conditions: or
1. {!myVariable_old} (null) Is null true
Logic: One condition must be true (OR)

RECORD UPDATE: myRule_1_A1
Find all pba__Listing__c records where:
AssessmentsYN__c Equals 1
Id Equals {!myVariable_current.Id} (a091500001MLez0AAD)
Update the records’ field values.
AssessmentsYN__c = Yes
Result
All records that meet the filter criteria are ready to be updated when the next Screen or Wait element is executed or when the interview finishes.

RECORD UPDATE: myRule_1_A2
Find all pba__Listing__c records where:
AssessmentsYN__c Equals 0
Id Equals {!myVariable_current.Id} (a091500001MLez0AAD)
Update the records’ field values.
AssessmentsYN__c = No
Result
All records that meet the filter criteria are ready to be updated when the next Screen or Wait element is executed or when the interview finishes.

DECISION: myDecision2
Executed this outcome: myRule_3
Outcome conditions: and
1. {!formula_myRule_3} (true) Equals true
Logic: All conditions must be true (AND)

DECISION: myRule_3_pmetdec
Executed this outcome: myRule_3_pmetnullrule
Outcome conditions: or
1. {!myVariable_old} (null) Is null true
Logic: One condition must be true (OR)

RECORD UPDATE: myRule_3_A1
Find all pba__Listing__c records where:
AuctionYN__c Equals 1
Id Equals {!myVariable_current.Id} (a091500001MLez0AAD)
Update the records’ field values.
AuctionYN__c = Yes
Result
All records that meet the filter criteria are ready to be updated when the next Screen or Wait element is executed or when the interview finishes.

RECORD UPDATE: myRule_3_A2
Find all pba__Listing__c records where:
AuctionYN__c Equals 0
Id Equals {!myVariable_current.Id} (a091500001MLez0AAD)
Update the records’ field values.
AuctionYN__c = No
Result
All records that meet the filter criteria are ready to be updated when the next Screen or Wait element is executed or when the interview finishes.

I had a few questions regarding how the process builder operates I was hoping one of you could help me understand

1) Is there a difference between the criteria for the action group and the criteria for the immediate action? Since the flow evaluates all the actions regardless, I'm not sure if this makes much of a difference. 
2) Does flow recursion significantly increase the CPU time?
3) I was also thinking of making parallel PB flows to make the workflow look more organized on the back end. Is that okay or would it just cause more problems for me in the long run?

Thanks for reading. I might be missing a few pieces due to a lack of coding knowledge so any insight would be greatly appreciated!