Skip to Content
0
Jan 09, 2023 at 09:40 PM

Unable to get Github Sample Extension Georel to Work

140 Views Last edit Jan 10, 2023 at 02:39 PM 6 rev

I am attempting to get a sample S/4HANA Cloud event-driven extension from SAP's GitHub to work. Here's the URL to the repository

While I'm new to S/4HANA Cloud and BTP, I believe my S/4HANA and BTP environments are working. I was hoping to use this application to confirm that I've configured enterprise events correctly.

I was able to get through the first three steps in the Readme file without issue. In step 4, I made the necessary changes to manifest.yaml and service.js and pushed the application to Cloud Foundry. The push worked, but the application crashed during initialization. The log file contains this error:

2023-01-09T10:53:21.61-0700 [APP/PROC/WEB/0] ERR [ERROR] No amqp10ws credentials found. Hint: You need to bind your app to an Enterprise-Messaging service or provide the necessary credentials through environment variables.
2023-01-09T10:53:21.61-0700 [APP/PROC/WEB/0] ERR at _getOpts (/home/vcap/app/node_modules/@sap/cds/libx/_runtime/messaging/enterprise-messaging-utils/options-messaging.js:29:11)
2023-01-09T10:53:21.61-0700 [APP/PROC/WEB/0] ERR at _optionsMessagingAMQP (/home/vcap/app/node_modules/@sap/cds/libx/_runtime/messaging/enterprise-messaging-utils/options-messaging.js:48:16)
2023-01-09T10:53:21.61-0700 [APP/PROC/WEB/0] ERR at optionsMessagingAMQP (/home/vcap/app/node_modules/@sap/cds/libx/_runtime/messaging/enterprise-messaging-utils/options-messaging.js:42:15)
2023-01-09T10:53:21.61-0700 [APP/PROC/WEB/0] ERR at EnterpriseMessagingShared.getClient (/home/vcap/app/node_modules/@sap/cds/libx/_runtime/messaging/enterprise-messaging-shared.js:17:25)
2023-01-09T10:53:21.61-0700 [APP/PROC/WEB/0] ERR at EnterpriseMessagingShared.init (/home/vcap/app/node_modules/@sap/cds/libx/_runtime/messaging/enterprise-messaging-shared.js:11:16)
2023-01-09T10:53:21.61-0700 [APP/PROC/WEB/0] ERR at async Promise.all (index 0)
2023-01-09T10:53:21.61-0700 [APP/PROC/WEB/0] ERR at async EnterpriseMessagingShared.prepend (/home/vcap/app/node_modules/@sap/cds/lib/srv/srv-handlers.js:23:5)
2023-01-09T10:53:21.61-0700 [APP/PROC/WEB/0] ERR at async AsyncFunction.connect.to (/home/vcap/app/node_modules/@sap/cds/lib/srv/cds-connect.js:45:3)
2023-01-09T10:53:21.61-0700 [APP/PROC/WEB/0] ERR at async cds_server (/home/vcap/app/node_modules/@sap/cds/server.js:47:33)
2023-01-09T10:53:21.61-0700 [APP/PROC/WEB/0] ERR at async serve (/home/vcap/app/node_modules/@sap/cds/bin/serve.js:192:18)

The error message is correct. The app is not bound to Event Mesh and no environment variables provide credentials. There's nothing in the Readme.md that says this needs to be done.

I've found where to bind the application to my Event Mesh instance in BTP Cockpit. The binding asks for JSON. The only documentation I can find has two examples but fails to explain the parameters in any way.

The error message says the credentials can be provided via process environment variables. I'd be happy to do this, if I could find any documentation that names the variables.

I didn't post any code because I've made no changes from what's in the repo, except the names of my services and my namespace.

Questions:

  1. Where can I find an explanation of what needs to go into application binding JSON?
  2. What environment variables are needed to provide the necessary credentials?
  3. Has anyone else managed to get this sample to work? If so, did you run into this issue?