Skip to content

smahati/2024_cap-beyond-day-one

 
 

Repository files navigation

reCAP 2024 - CAP beyond day one (DevOps)

Scenario

alt text

BAS Access

For this workshop, there are prepared test users for you. Each user has its own space in a shared BTP Subaccount. Each user is assigned the Subaccount Viewer role, to be able to view the instances and subscriptions. Also each user is entitled to use the Business Application Studio (BAS). We recommend using BAS as development environment, as all the tools are automatically installed and up to date there. Please note however, that the account will be deleted after the workshop, so if you want to save your project you will need to connect to your github or download it.

You can access the BTP subaccount here

The logon credentials will be provided by the workshop hosts.

alt text

Click on reCAPWorkshop to open the Subaccount.

alt text

Select Instances and Subscriptions and click on SAP Business Application Studio

alt text

Select avpxtt84j.accounts400.ondemand.com

alt text

Select Create Dev Space

alt text

Enter a name of your choice (e.g. dev) in the fieldunder Create a New Dev Space, select the radio button for Full Stack Cloud Application and click on Create Dev Space

alt text

Wait until the Dev space is in status RUNNING and click on it, which will bring you here:

alt text

Click OK and choose the Explorer View: drawing in the icon menu on the left-hand side

alt text

Select Clone Repository and enter the URL of this repository: https://github.com/recap-conf/2024_cap-beyond-day-one.git

When asked to choose a folder to clone, select projects under /home/user/projects and confirm with OK

alt text

Click on Open

alt text

Deployment

  1. open terminal via (Hamburger) Menu → Terminal → New Terminal
  2. log-in to cf via cf l --origin avpxtt84j-platform -a https://api.cf.eu12.hana.ondemand.com
  3. build multi-target app via mbt build
  4. deploy multi-target app cf deploy mta_archives/bookshop-recap-ws_1.0.0.mtar

alt text

Logging

Traces (OpenTelemetry)

Dashboard

As you can see, AdminServiceAddressHandler defines a handler for an incoming messaging event which is responsible for the addresses replication from the remote service to the local persistence. Since in our case the remote service does not emit any events, we can use the Developer Dashboard to simulate the BusinessPartnerChanged event to test the implementation.

You can open the Developer Dashboard via the Welcome Page of the Java Application:

alt text

Open the Dashboard UI link to get in:

alt text

In the messaging section of the dashboard, we see the bupa-messaging service, which offers a subscription to our BusinessPartnerChanged event:

alt text

Click on the RECEIVE button and set the BusinessPartner to 10401010:

alt text

Finally confirm and you will find the logs of the custom handler in the dashboard console:

alt text

You can now check whether the data has been persisted in the persistence section of the dashboard:

alt text

In some cases, we want to see if the outbox is configured correctly and the events in the outbox are processed asynchronously. Since the audit log events are processed by the outbox, we can trigger them by fetching the books list in the Browse books action of the application:

alt text

In the outbox section, you will find in the outbox history the audit log event that was processed by the outbox. You can repeat it or create a new custom outbox event to see how it behaves:

alt text

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 59.0%
  • CAP CDS 26.4%
  • HTML 9.1%
  • JavaScript 5.5%