'DigiCert - Certificate Management' pattern fails in custom operation


Description

The following error is seen in the MID Server log file:

03/25/21 15:02:37 (036) Worker-Interactive:PatternDebuggerProbe-4b02f0e2db87681013ea18734496196a Worker starting: PatternDebuggerProbe
03/25/21 15:02:37 (349) Worker-Interactive:PatternDebuggerProbe-4b02f0e2db87681013ea18734496196a (20)DebuggerPatternExecutor - Starting step: [name='Get Certificate List', functor=CustomOperationClosure:CUSTOM_OPERATION:910dab18-0140-4053-bbe8-7868c73cdafc]
03/25/21 15:02:37 (895) Worker-Interactive:PatternDebuggerProbe-4b02f0e2db87681013ea18734496196a 8 Credentials from instance loaded
03/25/21 15:02:37 (895) Worker-Interactive:PatternDebuggerProbe-4b02f0e2db87681013ea18734496196a WARNING *** WARNING *** org.mozilla.javascript.EcmaError: Cannot convert null to an object.
Caused by error in MID Server script include 'SSLCertificateUtil' at line 139

136: */
137: getCredByAliasName: function(credAliasName) {
138: var authDetails = this.StdCredFactory.getCredentialByAliasName(credAliasName);
==> 139: var credDetail = {
140: authKey: authDetails.getAttribute('api_key') || '',
141: secretKey: authDetails.getAttribute('secret_key') || '',
142: userName: authDetails.getAttribute('user_name') || '',

03/25/21 15:02:37 (895) Worker-Interactive:PatternDebuggerProbe-4b02f0e2db87681013ea18734496196a WARNING *** WARNING *** org.mozilla.javascript.EcmaError: Cannot convert null to an object.
Caused by error in Ad hoc script 'EvalClosure-Get Certificate List' at line 7

Release or Environment

All

Cause

credentialAlias value is wrong from 'discovery patter launch parameter' section(Serverless Execution Pattern - 'Pattern name'). 

Resolution

Step 1: Go to Credentials table
Step 2: Open Credential associated with the pattern and confirm its type is 'certificate management credential'.
Step 3: Look on the 'Tag' value, eg. 'sn_disco_certmgmt.cert'.
Step 4: Go to discovery schedules page and open the discovery certificate schedule
Step 5: Discovery Schedule Page -> Related List -> Serverless Execution Pattern -> Open the record
Step 6: Find the 'Discovery Pattern Launcher parameters' related list section. Find the 'credentialAlias' param and this value should be same as 'credential' tag display value from step 3.