douglascayers / sfdc-process-invocable

Launch Invocable Processes from Flow or Apex on-demand.
https://douglascayers.com/2016/10/31/how-to-invoke-process-builder-from-flow/
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link

Invocable Process Error #1

Open ghost opened 7 years ago

ghost commented 7 years ago

Per your request below is what seems to be the relevant section of the debug log...

17:15:29.117 (117307706)|CODE_UNIT_STARTED|[EXTERNAL]|Workflow:01Id0000001BZHj 17:15:29.117 (123411031)|WF_RULE_EVAL_BEGIN|Workflow 17:15:29.117 (123471032)|WF_CRITERIA_BEGIN|[Email Send: 00004268 a2C0V000001QrDu]|BackupWorkflow|01Qd0000000AxTi|ON_CREATE_OR_TRIGGERING_UPDATE|0 17:15:29.117 (123577095)|WF_RULE_FILTER|[Email Send : Backup Workflow Date/Time not equal to ] 17:15:29.117 (123590104)|WF_RULE_EVAL_VALUE| 17:15:29.117 (123593382)|WF_CRITERIA_END|false 17:15:29.117 (123604892)|WF_CRITERIA_BEGIN|[Email Send: 00004268 a2C0V000001QrDu]|SendFailed|01Qd0000000AxTU|ON_CREATE_OR_TRIGGERING_UPDATE|0 17:15:29.117 (135991144)|WFFORMULA|Formula:ENCODED:[treatNullAsNull]({!ID:00Nd0000007d7jB} = 'Fail' || {!ID:00Nd0000007d7jB} = 'Failed' || {!ID:00Nd0000007d7jB} = 'Error' || {!ID:00Nd0000007d7jB} = 'Errored' || {!ID:00Nd0000007d7jB} = 'Canceled') && NOT( CONTAINS( {!ID:00Nd0000007d7iJ} , "v3") )|Values:et4ae5ConversationIdc=00Dd0000000di3ja2C0V000001QrDu, et4ae5Send_Status_Viewc=Completed 17:15:29.117 (136011849)|WF_CRITERIA_END|false 17:15:29.117 (136031972)|WF_CRITERIA_BEGIN|[Email Send: 00004268 a2C0V000001QrDu]|SendStatusDateTime|01Qd0000000AxTV|ON_ALL_CHANGES|0 17:15:29.117 (136158817)|WF_FORMULA|Formula:ENCODED:[treatNullAsNull]ISCHANGED( {!ID:00Nd0000007d7j8} )|Values:et4ae5SendStatusc=Completed 17:15:29.117 (136182567)|WF_CRITERIA_END|false 17:15:29.117 (136192277)|WF_CRITERIA_BEGIN|[Email Send: 00004268 a2C0V000001QrDu]|SetConversationId|01Qd0000000AxTW|ON_ALL_CHANGES|0 17:15:29.117 (136315410)|WFFORMULA|Formula:ENCODED:[treatNullAsNull]NOT( CONTAINS( {!ID:00Nd0000007d7iJ} , "v3") )|Values:et4ae5ConversationIdc=00Dd0000000di3ja2C0V000001QrDu 17:15:29.117 (136322956)|WF_CRITERIA_END|true 17:15:29.117 (136805769)|WF_CRITERIA_BEGIN|[Email Send: 00004268 a2C0V000001QrDu]|TrackingAsOfSD|01Qd0000000AxTX|ON_ALL_CHANGES|0 17:15:29.117 (137302775)|WF_FORMULA|Formula:ENCODED:[treatNullAsNull]ISCHANGED({!ID:00Nd0000007d7ir}) || ISCHANGED({!ID:00Nd0000007d7is}) || ISCHANGED({!ID:00Nd0000007d7it}) || ISCHANGED({!ID:00Nd0000007d7iu}) || ISCHANGED({!ID:00Nd0000007d7iv}) || ISCHANGED({!ID:00Nd0000007d7ix}) || ISCHANGED({!ID:00Nd0000007d7iy}) || ISCHANGED({!ID:00Nd0000007d7iz}) || ISCHANGED({!ID:00Nd0000007d7im}) || ISCHANGED({!ID:00Nd0000007d7in}) || ISCHANGED({!ID:00Nd0000007d7iw})|Values:et4ae5NumberofUniqueOpensc=1.0, et4ae5NumberofUniqueClicksc=0.0, et4ae5NumberofTotalOpensc=1.0, et4ae5NumberofTotalClicksc=0.0, et4ae5NumberofSubscribersForwardingEmailc=0.0, et4ae5NumberofSoftBouncesc=0.0, et4ae5NumberofHardBouncesc=0.0, et4ae5NumberofExistingUnsubscribesc=0.0, et4ae5NumberofExistingUndeliverablesc=0.0, et4ae5NumberUnsubscribedc=0.0, et4ae5NumberSentc=1.0 17:15:29.117 (137325290)|WF_CRITERIA_END|false 17:15:29.117 (137335113)|WF_CRITERIA_BEGIN|[Email Send: 00004268 a2C0V000001QrDu]|FailBackupWorkflow|01Qd0000000AxTQ|ON_CREATE_OR_TRIGGERING_UPDATE|0 17:15:29.117 (138862288)|WF_FORMULA|Formula:ENCODED:[treatNullAsNull] NOT( {!ID:00Nd0000008N26Y} ) && ( !ISPICKVAL({!ID:00Nd0000007d7j8},"Failed") && !ISPICKVAL({!ID:00Nd0000007d7j8},"Completed") && !ISPICKVAL({!ID:00Nd0000007d7j8},"Canceled") && !ISPICKVAL({!ID:00Nd0000007d7j8},"Fail") && !ISPICKVAL({!ID:00Nd0000007d7j8},"Complete") && !ISPICKVAL({!ID:00Nd0000007d7j8},"Cancel") && !ISPICKVAL({!ID:00Nd0000007d7j8},"Cancelled") && !{!ID:00Nd0000007d7jN} && ISBLANK({!ID:00Nd0000007d7iB}) && NOT ( IF ( ISBLANK({!ID:00Nd0000007d7j6}), (NOW()-(1/2))<{!ID:00Nd0000007d7iL}, (NOW()-(1/2))<{!ID:00Nd0000007d7j6} || {!ID:00Nd0000007d7ib} && !ISPICKVAL({!ID:00Nd0000007d7j8},"Pending Tracking Subscription") ) ) )|Values:et4ae5Created_Date_Timec=2017-06-19 20:15:02, et4ae5Split_Sendc=0, et4ae5SendStatusc=Completed, et4ae5Scheduled_Date_Timec=null, et4ae5BackupWorkflowc=null, et4ae5HasBeenQueuedc=0, et4ae5TrackingOnly__c=1 17:15:29.117 (138892536)|WF_CRITERIA_END|false 17:15:29.117 (138902721)|WF_CRITERIA_BEGIN|[Email Send: 00004268 a2C0V000001QrDu]|PopulateBackupWorkflow|01Qd0000000AxTR|ON_CREATE_OR_TRIGGERING_UPDATE|0 17:15:29.117 (139459423)|WF_FORMULA|Formula:ENCODED:[treatNullAsNull]!ISPICKVAL({!ID:00Nd0000007d7j8},"Failed") && !ISPICKVAL({!ID:00Nd0000007d7j8},"Completed") && !ISPICKVAL({!ID:00Nd0000007d7j8},"Canceled") && !ISPICKVAL({!ID:00Nd0000007d7j8},"Fail") && !ISPICKVAL({!ID:00Nd0000007d7j8},"Complete") && !ISPICKVAL({!ID:00Nd0000007d7j8},"Cancel") && !ISPICKVAL({!ID:00Nd0000007d7j8},"Cancelled") && ! {!ID:00Nd0000007d7jN} && ISBLANK( {!ID:00Nd0000007d7iB} ) && ( IF ( ISBLANK({!ID:00Nd0000007d7j6}) , ( NOW()-(1/2) ) < {!ID:00Nd0000007d7iL} , ( NOW()-(1/2) ) < {!ID:00Nd0000007d7j6} ) || {!ID:00Nd0000007d7ib} || {!ID:00Nd0000008N26Y} )|Values:et4ae5Created_Date_Timec=2017-06-19 20:15:02, et4ae5Split_Sendc=0, et4ae5SendStatusc=Completed, et4ae5Scheduled_Date_Timec=null, et4ae5BackupWorkflowc=null, et4ae5HasBeenQueuedc=0, et4ae5TrackingOnly__c=1 17:15:29.117 (139485967)|WF_CRITERIA_END|false 17:15:29.117 (139495745)|WF_CRITERIA_BEGIN|[Email Send: 00004268 a2C0V000001QrDu]|SendClassFrom|01Qd0000000AxTS|ON_ALL_CHANGES|0 17:15:29.117 (139616053)|WF_FORMULA|Formula:ENCODED:[treatNullAsNull]ISCHANGED( {!ID:00Nd0000007d7iY} )|Values:et4ae5FromAddressc=redacted@redacted.com 17:15:29.117 (139623362)|WF_CRITERIA_END|false 17:15:29.117 (139631508)|WF_CRITERIA_BEGIN|[Email Send: 00004268 a2C0V000001QrDu]|ScheduledSend|01Qd0000000AxTd|ON_CREATE_ONLY|0 17:15:29.117 (139638800)|WF_RULE_NOT_EVALUATED 17:15:29.117 (139642301)|WF_CRITERIA_BEGIN|[Email Send: 00004268 a2C0V000001QrDu]|SendComplete|01Qd0000000AxTT|ON_CREATE_OR_TRIGGERING_UPDATE|0 17:15:29.117 (139669745)|WF_RULE_NOT_EVALUATED 17:15:29.117 (139689106)|WF_SPOOL_ACTION_BEGIN|Workflow 17:15:29.117 (151151226)|WF_ACTION| Field Update: 1; 17:15:29.117 (151162578)|WF_RULE_EVAL_END 17:15:29.117 (151173979)|WF_TIME_TRIGGERS_BEGIN 17:15:29.117 (152446754)|WF_ACTIONS_END| Field Update: 1;

douglascayers commented 7 years ago

For those following along at home, this is continuation of comment thread from the blog post.

douglascayers commented 7 years ago

Thanks @scottenyc,

This snippet of the debug log details workflow rule evaluation criteria, but unfortunately does not mention any exceptions or errors.

If possible, could you provide the entire debug log? And if any error emails were sent to you the admin about Process Builder or Flow failing and its details that would be helpful too.

What I'm looking for are things like:

In your original blog post comment you said you got an error email containing:

Failed to process batch for class ‘HttpRequestsBatchable’ for job id

caused by: HttpRequestsBatchable.BatchableException: System.HttpResponse[Status=Bad Request, StatusCode=400]

Thanks,

Doug

ghost commented 7 years ago

Please see below and attached… Thanks again for all your help.

Scott

On July 31, 2017 at 7:06:20 PM, Doug Ayers (notifications@github.com) wrote:

Thanks @scottenyc,

This snippet of the debug log details workflow rule evaluation criteria, but unfortunately does not mention any exceptions or errors.

If possible, could you provide the entire debug log? And if any error emails were sent to you the admin about Process Builder or Flow failing and its details that would be helpful too.

What I'm looking for are things like:

Validation Rule rejection messages like FIELD_CUSTOM_VALIDATION_EXCEPTION The HTTP response error message from apex class HttpRequestsBatchable lines 36 and 37 In your original blog post comment you said you got an error email containing:

Failed to process batch for class ‘HttpRequestsBatchable’ for job id

caused by: HttpRequestsBatchable.BatchableException: System.HttpResponse[Status=Bad Request, StatusCode=400]

Thanks,

Doug

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

douglascayers commented 7 years ago

Hi @scottenyc,

Unfortunately, GitHub does not process email attachments. Would you mind adding them directly to this issue via GitHub website?

Thanks,

Doug

ghost commented 7 years ago

Please see attached as requested... Thanks, Scott

apex-07L0V00003T7wTyUAJ.txt

douglascayers commented 7 years ago

Thanks for the log file. Unfortunately I didn't see any errors or exceptions mentioned there.

Since the issue is intermittent, and the error is about a bad http request, my guess is the issue is with data being mapped to the invocable process Flow element. Such as which ID field being referenced when calling your desired process or flow. Make sure the referenced field isn't null or blank perhaps?

ghost commented 7 years ago

Thanks for all your help. I will dig around for the error in the flows.

Scott

On August 7, 2017 at 7:47:22 PM, Doug Ayers (notifications@github.com) wrote:

Thanks for the log file. Unfortunately I didn't see any errors or exceptions mentioned there.

Since the issue is intermittent, and the error is about a bad http request, my guess is the issue is with data being mapped to the invocable process Flow element. Such as which ID field being referenced when calling your desired process or flow. Make sure the referenced field isn't null or blank perhaps?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DouglasCAyers/sfdc-process-invocable/issues/1#issuecomment-320810596, or mute the thread https://github.com/notifications/unsubscribe-auth/AdMF7kyXWf5LPu9sr5f3EWCPdxDNPz5sks5sV6IJgaJpZM4Oo8Tm .