2 weeks ago - last edited a week ago
Hi,
I have deployed a CAP application on production with reads data from SuccessFactors and it works fine.
Additionally, I have to use Attachment plugin (cap-js/attachments (github.com)) for file upload. The attachment plugin works fine on development without breaking anything.
The issue occurred when I deployed the attachment changes to production, where attachment plugin is working fine but it has causes SuccessFactors OData calls to stop working.
The changes that I did for adding attachments plugin is 1. CDS changes to include attachment plugin and 2. including it in package.json.
Please suggest where else I need to adjust so that this plugin does not conflict with the OData calls.
Thanks and Regards,
Naveen
I was able to reproduce your issue. In fact, it was not the matter of consuming external service, but the whole event handler code is getting ignored once the plugin is enabled.
I have created a new issue in the Git repository.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wow ! Many Thanks @MioYasutake for taking the deep dive. I hope they resolve it soon. Thanks again ! ~Naveen Vishal
Can you reproduce the issue locally by the method described in the document below?
https://cap.cloud.sap/docs/guides/using-services#mock-remote-service-as-odata-service-node-js
If you can reproduce the issue, then you can provide your project as a reference in the issue you raised.
https://github.com/cap-js/attachments/issues/50
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @MioYasutake,
The only this additionally I have observed is that, strangely, only by the inclusion of attachments with statement 'using { Attachments } from '@cap-js/attachments';' is causing the OData service to stop on deployment.
Hi @naveenvishal,
Could you add service key to XSUAA instance in mta.yaml?
- name: uaa_sfsf-projman
type: org.cloudfoundry.managed-service
parameters:
path: ./xs-security.json
service: xsuaa
service-name: sfsf-projman-xsuaa-service
service-plan: application
service-keys:
- name: uaa_sfsf-projman-key
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @KazuhikoTakata,
I have done the changes and deployed again. The issue still persists when deployed.
Hi @MioYasutake ,
The event handlers are implemented in file handlers.js, called from projman-service.js.
Please find the attached files.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @KazuhikoTakata,
I updated the mta.yaml as suggested (attached) and deployed but the issue still persists. F4 help for getting SF Odata API works on Dev but not when deployed.
I am still trying to figure out the issue, but this is strange.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @naveenvishal,
Now I understand your point. I had similar issue for connecting OData service in Cloud Foundry environment, and that was caused by whether you describe destination of Node.js service (in your case sfsf-projman-app-api) in mta.yaml.
Now you described in resources > sfsf-projman-destination > parameters > config > init_data > instance > destinations. That is cause of trouble I think.
Could you try to describe destination in modules > sfsf-projman-destination-content > parameters > content > instance > destination? My repository above is helpful.
Best regards,
Kazuhiko Takata.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @naveenvishal,
Today I posted Extend Upload Set with Table to Fiori Elements and utilize Object Store that describes how to deploy cap-js/attachment program. Please check if this helps you.
Best regards,
Kazuhiko Takata
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @KazuhikoTakata ,
Many thanks for the reply.
I have seen your blog, it is very well articulated and informative. I know it will help and guide many people. 🙂
In my case, attachments addon is working fine, but when deployed it has override/ somehow stopped the SF User OData API calls and strangely it is working fine on DEV/ (before deployment). I am unable to track the issue for now.
Hi @MioYasutake ,
Please find the details:
Thank you,
Naveen Vishal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looking at the log you provided, I found the following message:
"Error: Entity \"sfsf.projman.service.ProjectManager.SFSF_User\" is annotated with \"@cds.persistence.skip\" and cannot be served generically."
This error occurs when an event handler for an entity based on an external service is not implemented, as explained in this link. Have you implemented the event handler for SFSF_User?
Hi Mio, you are correct, the issue "Error: Entity \"sfsf.projman.service.ProjectManager.SFSF_User\" is annotated with \"@cds.persistence.skip\" and cannot be served generically." comes when event is not handled. Strangely, looks like somehow event handler not reachable or unhandled event being raised on deploy.
Somehow the inclusion of attachments plugin causing the event/OData to be overridden.
User | Count |
---|---|
68 | |
9 | |
7 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.