SAP-samples / successfactors-extension-calculate-employee-seniority

The publication is a sample extension to SAP SuccessFactors to manage seniority adjustments based on business events, using the SAP Business Technology Platform.
https://discovery-center.cloud.sap/missiondetail/3550/3591
Apache License 2.0
11 stars 45 forks source link

Error when Creating service "seniority-calc-db" from MTA resource "seniority-calc-db #14

Closed muditbatraschwarz closed 1 year ago

muditbatraschwarz commented 2 years ago

Has anyone faced this issue?

" Service operation failed: Controller operation failed: 502 Updating service "seniority-calc-db" failed: Bad Gateway: Error creating service "seniority-calc-db" from offering "hana-cloud" and plan "hana-free": CF-ServiceBrokerBadResponse(10001): Service broker error: Service broker hana-cloud failed with: in main.(*broker).Provision[/stage/cmd/hana-cloud-servicebroker/main.go:2721] Failed to unmarshal parameters: unexpected end of JSON input "

I am using 'hana-free' plan for 'hana-cloud' service. Do I need to change something in mta.yaml file for this? I have maintained like this:- name: seniority-calc-db type: com.sap.xs.hdi-container parameters: service: hana-cloud service-plan: hana-free

jmsrpp commented 2 years ago

Hi @muditbatraschwarz - thanks for raising this issue. The service for seniority-calc-db has to be as follows:

https://github.com/SAP-samples/successfactors-extension-calculate-employee-seniority/blob/main/mta.yaml#L35-L39

This is because your are creating a database container which will then be attached to the HANA Cloud database (Free Tier) that you deployed in your subaccount. You can see here a reference:

https://answers.sap.com/questions/13531992/btp-free-tier-hdi-shared-entitlement-also-free.html

That is, you can use the hdi-shared plan referenced in the mission together with your free tier instance of SAP HANA Cloud.

muditbatraschwarz commented 2 years ago

hi @jmsrpp - many thanks for your reply and valuable inputs. If I use the suggested parameters then I get below error:-

Creating service "seniority-calc-db" from MTA resource "seniority-calc-db"... Service operation failed: Controller operation failed: 404 Updating service "seniority-calc-db" failed: Not Found: Error creating service "seniority-calc-db" from offering "hana" and plan "hdi-shared": Service plan hdi-shared not found.

As the instance service name is hana-cloud and plan is hana-free:-

image

jmsrpp commented 2 years ago

Hi @muditbatraschwarz - no problem, you just need to add the HDI-Shared service entitlement to your global account:

https://answers.sap.com/questions/13385115/hdi-shared-instance-not-available-in-sap-hana-tria-1.html

Let me know if this solves the issue.

jmsrpp commented 1 year ago

Also you can check here in the mission prerequisites

muditbatraschwarz commented 1 year ago

thanks James, it worked after activating the HDI shared service.