Comments (1)
The CAP service is indicated by the "Brain (CAP service)" block in the schematic diagram.
It can be found in the cap/brain/
directory in this repository.
Overview
It is a basic CAP application with two of the three layers in use:
Layer | Description |
---|---|
app |
Unused |
srv |
A single service teched is defined exposing an entity CharityEntry , and three related helper / test functions invoke() , convert() and readEntry(party) . None of these artifacts are directly needed for day-to-day Brain operation |
db |
An entity CharityEntry is defined with a SoldToParty property as key, and a counter property. This entity is defined within the namespace charity |
The service, once deployed, does not require any human intervention to function. It performs the following activities, each time an event published to the "salesorder/created" topic on the messaging bus is received:
- Unpacks the event data to get the sales order number
- Retrieves sales order header details from the Sandbox (S/4HANA mock system) OData service
API_SALES_ORDER_SRV
- Checks to make sure that the sold-to party is one that hasn't already been processed 10 times before (aborting if so)
- Requests a conversion of the total net amount of the sales order to the equivalent in charity fund credits, by calling the Converter (Go microservice) conversion service
- Publishes a new event to the "Internal/Charityfund/Increased" topic, with the properties listed below
The properties in the event published by this CAP service are:
Property | Description |
---|---|
salesorder |
The sales order number |
custid |
The sold-to party ID (not the name) |
creationdate |
The date that the sales order was created |
credits |
The charity fund credits equivalent of the sales order total net amount |
salesorg |
The sales organisation that the sales order belongs to |
Remote services defined and used
The CAP service consumes the following services which are defined in package.json
. Some of these employ destinations defined in the cloud (on CF - see below):
Name | Kind | Details |
---|---|---|
messaging |
enterprise-messaging |
Connection to the EM service instance |
db |
sqlite |
Local persistence |
S4SalesOrders |
odata |
Connection to the Sandbox (S/4HANA mock system) OData service. Destination apihub_mock_salesorders |
ConversionService |
rest |
Connection to the Converter (Go microservice) conversion service. Destination charityfund_converter |
On CF
The CAP service has been deployed to the collab CF org/space 9e079cc4trial/dev as app brain
and has bindings to the following service instances in that same space:
Name | Service |
---|---|
destination-lite |
Destination service instance with 'lite' plan, to enable the CAP service to access destinations |
emdev |
Enterprise Messaging service instance with 'dev' plan (note this is a deprecated plan but the only one available in trial) |
xsuaa-application |
Auth & Trust Management service instance with 'application' plan, to enable the CAP service to access the other instances |
Deployment was done using cf push
(rather than an MTA based deployment) followed by manual binding (cf bind-service
) to these existing services.
Local execution
A default-env.json
file is available (not in the repo) for local execution. Run from the CAP service directory with cds run
.
from teched2020-developer-keynote.
Related Issues (17)
- Build Scenario Storyboard HOT 3
- s4 mock service - deploy to Kyma
- Kyma Service publish to Github Docker
- Add Kyma docker and deployment content to CAP main service
- Emitter section Setup and Usage Instructions HOT 2
- Error at ./emit 1 HOT 2
- Overall Storyline HOT 1
- Mostly empty default-env.json after script-based generation HOT 9
- Kyma Brain Component Deployment Error HOT 3
- Setup Enterprise Messaging
- ABAP class framework to generically interact with Enterprise Messaging
- Research Go HOT 1
- Configure the Enterprise Messaging setup from Kyma Managed runtime
- Mocking of the S/4 Business Objects APIs and Events
- Complete readme.md
- Connect the dots
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from teched2020-developer-keynote.