JDBC Access Request Failure Notification

Hi Team,

Have implemented below workflow for JDBC Access Request Failure Notification and not working properly and does anyone has any idea on this code issues?

{
“name”: “JDBC Access Request Failure Notification”,
“version”: “2.2”,
“definition”: {
“start”: “Check Failure”,
“steps”: {

  "Check Failure": {
    "type": "choice",
    "choiceList": [
      {
        "expression": "$.provisioningResult.status == 'FAILED'",
        "nextStep": "Check JDBC Source"
      }
    ],
    "defaultStep": "End"
  },

  "Check JDBC Source": {
    "type": "choice",
    "choiceList": [
      {
        "expression": "$.accountRequests != null && $.accountRequests[0].source.name == 'Test'",
        "nextStep": "Get Identity"
      }
    ],
    "defaultStep": "End"
  },

  "Get Identity": {
    "type": "action",
    "actionId": "sp:get-identity",
    "attributes": {
      "id.$": "$.identity.id"
    },
    "nextStep": "Send Email"
  },

  "Send Email": {
    "type": "action",
    "actionId": "sp:send-email",
    "attributes": {
      "to": "iam-team@company.com",
      "subject": "❌ JDBC Provisioning Failed - ${$.identity.displayName ?: $.identity.id}",
      "body": "Access Request Provisioning FAILED\n\nIdentity: ${$.identity.displayName ?: $.identity.id}\nSource: ${$.accountRequests[0].source.name}\nOperation: ${$.accountRequests[0].accountOperation}\n\nError: ${$.provisioningResult.errors[0].message ?: 'No error message available'}\n\nTracking ID: ${$.trackingNumber}"
    },
    "nextStep": "End"
  },

  "End": {
    "type": "success"
  }
}

},
“trigger”: {
“type”: “EVENT”,
“attributes”: {
“id”: “idn:post-provisioning”
}
}
}

Thanks

Kalyan

Hi @kalyannambi2010 ,

Could you please confirm if the below condition is giving you the expected output?

{
  "expression": "$.accountRequests != null && $.accountRequests[0].source.name == 'Test'",
  "nextStep": "Get Identity"
}

In this case, you are referencing accountRequests[0], but the index may not always remain the same. This could lead to inconsistent behavior if the required entry is not at position 0.

I would recommend storing the required value in a variable and then utilizing it throughout the workflow.

Thank you.

Hi @kalyannambi2010 ,

Could you give more details like which step is failing and what is error message, etc

Hi @mandarsane and @suraj_gorle I did Test Workflow option and it is throwing error and haven’t enabled yet.

I would like to know whether the workflow give proper result or not?

Thanks

Kalyan

Hi @kalyannambi2010 ,

Can you please share the screenshot of error ?

Hi everyone,

We would like to implement this to Notify when JDBC access request provisioning fails for access requests so that user gets notified where email" and “displayname” which are not part of JDBC source account schema and not stored in DB schema and not part of create provisioning policy

Thanks

Hi @kalyannambi2010 ,

We can get it from identity. In workflow I have used get identity that I have shared you yesterday. Please test it and let me know if it works for you.
Thank you.

Hi everyone,

We are using below workflow JSON for sending notification about initial password generated in JDBC provisioning rule.

workflow json for success notifications calling below external trigger workflow from JDBC provisioning rule to pass some values and can we add some block of code for failure notifications in the same workflow about access request provisioning failure notifciations?

{
“name”: “EBS DB Email Notify Testing”,
“description”: “EBS DB Email Notify Testing”,
“definition”: {
“start”: “Send Email”,
“steps”: {
“End Step - Success”: {
“actionId”: “sp:operator-success”,
“displayName”: “”,
“type”: “success”
},
“Send Email”: {
“actionId”: “sp:send-email”,
“attributes”: {
“body”: “Hello {{$.trigger.input.displayName}},\nWelcome! Your Oracle E‑Business Suite (EBS) account has been successfully created.\nHere are your login details:

  • Username: {{$.trigger.input.displayName}}
  • Temporary Password: {{$.trigger.input.newPassword}}
\\n

Please log in using the credentials above, then change your password immediately for security.

\\n

If you have any trouble logging in or need assistance, contact the IT Support Team.

\\n

Best regards,
IAM Team

”, “context”: {}, “from”: “no-reply-stage@identity.test4567.com”, “recipientEmailList.$”: “$.trigger.input.email”, “subject”: “Your Oracle response Account is Ready” }, “displayName”: “”, “nextStep”: “End Step - Success”, “type”: “action”, “versionNumber”: 2 } } }, “trigger”: { “type”: “EXTERNAL”, “attributes”: { “clientId”: “1234”, “id”: “idn:external-http”, “url”: “/beta/workflows/execute/external/5678” } } }

Thanks

Hi everyone,

Using the below workflow JSON code for this requirement where success email notification for provisioning success and failure email notification for provisioning failure. I am trying to capture provisioning status in JDBC provisioning rule and pass to this external workflow trigger. But getting lot of errrors and any idea on this?

{
“name”: “EBS Email Notify - External Trigger Final”,
“description”: “EBS Email Notify - External Trigger Final”,
“version”: “1.0”,
“definition”: {
“trigger”: {
“type”: “EXTERNAL”,
“attributes”: {
“clientId”: “1234”,
“id”: “idn:external-http”,
“url”: “/beta/workflows/execute/external/5678”
}
},
“start”: “Compare Provisioning Status”,
“steps”: {
“Compare Provisioning Status”: {
“type”: “choice”,
“choiceList”: [
{
“variableA.$”: “$.trigger.provisioningStatus”,
“comparator”: “StringEquals”,
“valueB”: “success”,
“nextStep”: “Send Success Email”
},
{
“variableA.$”: “$.trigger.provisioningStatus”,
“comparator”: “StringEquals”,
“valueB”: “failure”,
“nextStep”: “Send Failure Email”
}
],
“defaultStep”: “End Success”
},
“Send Success Email”: {
“type”: “action”,
“actionId”: “sp:send-email”,
“attributes”: {
“from”: “no-reply@test.com”,
“recipientEmailList.$”: “$.trigger.email”,
“subject”: “Provisioning Successful”,
“body”: “Hello {{ $.trigger.displayName }}”
},
“nextStep”: “End Success”
},
“Send Failure Email”: {
“type”: “action”,
“actionId”: “sp:send-email”,
“attributes”: {
“from”: “no-reply@test.com”,
“recipientEmailList.$”: “$.trigger.email”,
“subject”: “Provisioning Failed”,
“body”: “Hello {{ $.trigger.displayName }}”
},
“nextStep”: “End Failure”
},
“End Success”: {
“type”: “success”
},
“End Failure”: {
“type”: “failure”,
“failureName”: “Provisioning Failed”,
“failureDetails”: “Failure email sent”
}
}
}
}

Thanks

Kalyan