You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Along with a binding to the destination service and now it finds the destination and I get this error:
Emit failed { event: 'Default', cause: Error: NotificationType with key Default and version 1 does not exist at NotifyToRest.postNotification (/home/vcap/app/node_modules/@cap-js/notifications/srv/notifyToRest.js:35:21)
So what magic is required to get a notification into work zone? The documentation (Screenshot above) clearly states that none of these config settings are required.
ps. In addition I have tested with a custom notification type and get the same error as shown here:
ERROR | persistent-outbox | Emit failed { event: 'ConsumptionBlockerCreated', cause: Error: NotificationType with key engagementplanner/ConsumptionBlockerCreated and version 1 does not exist at NotifyToRest.postNotification (/home/vcap/app/node_modules/@cap-js/notifications/srv/notifyToRest.js:35:21) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Promise.all (index 0) at async NotifyToRest.handle (/home/vcap/app/node_modules/@sap/cds/lib/srv/srv-dispatch.js:65:21) at async ODataRequest.<anonymous> (/home/vcap/app/node_modules/@sap/cds/libx/outbox/index.js:286:18) at async ODataRequest.emit (/home/vcap/app/node_modules/@sap/cds/lib/req/context.js:58:9) at async CustomersService.commit (/home/vcap/app/node_modules/@sap/cds/lib/srv/srv-tx.js:132:7) at async /home/vcap/app/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/handlers/action.js:61:9 { unrecoverable: true } }
The text was updated successfully, but these errors were encountered:
js1972
changed the title
Plugin not working after following setup
Plugin not working after following setup (cant find notification types)
Oct 29, 2024
I managed to get the notification to work as alluded to in #44 even though it didn't show the full details. Added a server.js to the project with this:
const cds = require("@sap/cds");
cds.on("served", async () => {
if (process.env.NODE_ENV === "production") {
const {deployNotificationTypes} = require("@cap-js/notifications/lib/content-deployment");
}
});
// Delegate bootstrapping to the default CDS server
module.exports = cds.server;
I'm trying to get this plugin to work after following the simple setup steps:
My destination is called
SAP_Notifications
to match.However I get this error on cloud foundry:
So I tried adding to the package.json (cds.requires section):
Along with a binding to the destination service and now it finds the destination and I get this error:
So what magic is required to get a notification into work zone? The documentation (Screenshot above) clearly states that none of these config settings are required.
ps. In addition I have tested with a custom notification type and get the same error as shown here:
The text was updated successfully, but these errors were encountered: