Skip to content

Commit

Permalink
Marked BP address checker optional (#275)
Browse files Browse the repository at this point in the history
* Initial version of SAP AEM Integration - day 3

* Populating content for 3rd day

Populating content for 3rd day, prereqs mostly done, AEM configuration done, importing iflows done, configuring and deploying iflows in progress

* Populating codelab for day 3 - configuration steps

Added more steps for setting up Integration Suite with security credentials etc.

* Adjusted time estimates

Adjusted time estimates

* Added Overall Duration estimate

Added Overall Duration estimate

* Finished AEMBusinessPartnerAddressCheck

Finished description and configuration and deployment steps for AEMBusinessPartnerAddressCheck iflow.

* fixed typos and formatting

fixed typos and formatting

* Added configuration and deployment for 2 more flows

Added configuration and deployment for 2 more flows

* Added more details on the LegacyOutputAdapter

Added more details on the LegacyOutputAdapter

* Finished basic description of event flows

Finished basic description of event flows

* Finished describing AEM related settings and processing steps

Finished describing AEM related settings and processing steps

* Added takeaways

Added takeaways

* Fixed formatting

Fixed formatting

* Updated day-3 codelab

* Formatting updates

Formatting updates

* updated codelabs

* Formatting

Formatting

* Updated markdown and codelab to fix formatting

* More formatting

More formatting

* Updated codelab

* Formatting and new AEM adapter version

Formatting and new AEM adapter version

* Updated with latest codelab changes

* Fixed queue subs and more formatting

Fixed queue subs and more formatting

* Updated codelabs

* Repush updated queue subs for Legacy adapter

Repush updated queue subs for Legacy adapter

* Formatting

Formatting

* updated files

* Updated section 3

Updated section 3

* Removed  Unneeded artifacts

Removed unneeded artifacts

* More detailed steps

More detailed steps, more screenshots.

* More improvements and details

Added more details on security configuration, reordered iflow steps to prioritise the AEMLegacyOutputAdatper iflow demonstrating the DMQ handling, followed by the AddressChecker, then Email notification iflow last.

* Hide Todos

Hidden Todos and wip areas.

* Updated links

Updated links for downloadable content.

* Removed downloadables

Removed downloadables from codelab (moved to separete repository)

* Updated codelabs for SAP AEM INT - Day 3

* Marked BP address checker optional

Marked BP address checker optional as it requires set up of SAP BTP's DQM service.

* Updated codelabs for SAP AEM INT - Day 3

* Updated codelabs for SAP AEM INT - Day 3

---------

Co-authored-by: HariRangarajan-Solace <[email protected]>
  • Loading branch information
ChristianHoltfurth and HariRangarajan-Solace authored Nov 17, 2023
1 parent ea72c38 commit cc81308
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion codelabs/sap-aem-int-day-3/codelab.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"format": "html",
"prefix": "https://storage.googleapis.com",
"mainga": "UA-49880327-14",
"updated": "2023-10-24T10:39:17+02:00",
"updated": "2023-11-17T16:21:17+01:00",
"id": "sap-aem-int-day-3",
"duration": 140,
"title": "Event Enable SAP Using SAP Advanced Event Mesh - Day 3",
Expand Down
14 changes: 7 additions & 7 deletions codelabs/sap-aem-int-day-3/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</style>
</head>
<body>
<google-codelab-analytics gaid="UA-49880327-14" ga4id=""></google-codelab-analytics>
<google-codelab codelab-gaid=""
codelab-ga4id=""
id="sap-aem-int-day-3"
Expand All @@ -43,8 +43,8 @@
<li>Complete all activities in day 1 &amp; 2. <br>You access and use the same broker you setup previously as well as the simulator to push events for testing.</li>
<li>Have access to an active Integration Suite Cloud Integration tenant.</li>
<li>Have an email server and account credentials that allows SMTP access if you want to send email notifications from your iflow.</li>
<li>Have an SFTP server and account credentials if you want to test successful integration of events to a file based interface of a legacy system (optional).</li>
<li>Have a subscription to SAP Data Quality Management for location data or permission to activate it.<br> (We&#39;ll show you how to activate one, if you don&#39;t have it already).</li>
<li>Have an SFTP server and account credentials if you want to test successful integration of events to a file based interface of a legacy system <strong>(optional)</strong>.</li>
<li>Have a subscription to SAP Data Quality Management for location data or permission to activate it.<br> (We&#39;ll show you how to activate one, if you don&#39;t have it already). <strong>(optional)</strong></li>
</ul>


Expand All @@ -63,7 +63,7 @@ <h2 is-upgraded>B) Download and import the AEM adapter for Integration Suite</h2
<p>Extract the downloaded zip and select the .esa file in the upload dialog. Runtime Profile should be Cloud Integration. (You should not be seeing the warning message <code>Integration adapter with the ID 'AdvancedEventMesh' already exists</code>. If you do, then you can skip this step as the adapter has already been made available to you.) <img alt="CI Adapter import" src="img/6e850082abe05775.png"></p>
<p>Deploy the adapter after import. <img alt="CI Adapter deploy" src="img/5f567b5457e1fe8c.png"></p>
<p>See <a href="https://help.sap.com/docs/integration-suite/sap-integration-suite/importing-custom-integration-adapter-in-cloud-foundry-environment#procedure" target="_blank">SAP documentation</a> for more detailed instructions</p>
<h2 is-upgraded>C) Activate SAP Data Quality Management service in BTP</h2>
<h2 is-upgraded>C) Activate SAP Data Quality Management service in BTP <strong>(optional)</strong></h2>
<p>One of our iflows that we are going to deploy is invoking the SAP Data Quality Management service (DQM) to check and cleanse address data in the BusinessPartner events. For the flow to work properly, you will need a working DQM service subscription so you can configure your iflow with this. The good news, if you don&#39;t have one already, you can use a free tier subscription for this purpose. Please follow along the steps in this <a href="https://blogs.sap.com/2022/02/15/getting-started-with-sap-data-quality-management-microservices-for-location-data-btp-free-tier/" target="_blank">blog post</a> by Hozumi Nakano to active the service.</p>


Expand Down Expand Up @@ -109,7 +109,7 @@ <h3 is-upgraded>2. CILegacyAdapterInDMQ queue</h3>
<li>Non-Owner Permission: <code>No access</code></li>
</ul>
<p class="image-container"><img alt="queue settings" src="img/184d57d9217e015e.png"></p>
<h2 is-upgraded>B) For the AEMBusinessPartnerAddressCheck flow</h2>
<h2 is-upgraded>B) For the AEMBusinessPartnerAddressCheck flow <strong>(optional)</strong></h2>
<p>Create the following queues and provide the details as given.</p>
<h3 is-upgraded>1. CIBusinessPartnerChecker queue</h3>
<ul>
Expand Down Expand Up @@ -214,7 +214,7 @@ <h2 is-upgraded>A) - For AEMLegacyOutputAdapter</h2>
<p>The legacy output adapter is simulating appending events to a file via an SFTP adapter, which could be imported to a legacy system. The actual flow doesn&#39;t require a working sftp destination as it&#39;s just being used to simulate a failure to demonstrate the retry and error handling capabilities of AEM. The flow will try a few times to deliver each event to the SFTP destination. After 3 failed attempts messages will be moved to a Dead Message Queue for manual processing by a UI5 and Business Process Automation workflow.</p>
<aside class="warning"><p> If, after successful demonstration of the error handling, you would still like to see a successful delivery of events to a file via sftp, you will need an sftp server and sftp credentials to configure the flow with a valid endpoint (sftp server address and username password) and import the ssh identidy into .</p>
</aside>
<h2 is-upgraded>B) - For AEMBusinessPartnerAddressCheck</h2>
<h2 is-upgraded>B) - For AEMBusinessPartnerAddressCheck <strong>(optional)</strong></h2>
<p>Activate SAP&#39;s Data Quality Management Service (DQM) by following this <a href="https://blogs.sap.com/2022/02/15/getting-started-with-sap-data-quality-management-microservices-for-location-data-btp-free-tier/" target="_blank">blog</a> if you haven&#39;t already done so.<br> Additionally, you will have to create a service instance and a service key to be configured with your integration flow later. Follow <a href="https://developers.sap.com/tutorials/btp-sdm-gwi-create-serviceinstance.html" target="_blank">these steps</a> to create a service instance and key.<br> Take a note of the URL and user credentials once you&#39;ve activated the service.<br></p>
<h2 is-upgraded>C) - For AEMSalesOrderNotification</h2>
<p>You&#39;ll need an external email service to be able to automatically send emails, details like smtp server address, username (email) and password.</p>
Expand Down Expand Up @@ -268,7 +268,7 @@ <h3 is-upgraded>3. Check that your flow was deployed successfully and fix if nec
<li>Go to your AEM Console and navigate to Cluster Manager -&gt; {your service} -&gt; Manage and click on the Queues tile: <img alt="AEM service queue management" src="img/d9613fb2693c5930.png"></li>
<li>Check that the AEMLegacyOutputAdapter input queue has at least one consumer connected to it. <img alt="AEM service queue overview" src="img/95dc3c6a45cdb501.png"></li>
</ul>
<h2 is-upgraded>B) - AEMBusinessPartnerAddressCheck</h2>
<h2 is-upgraded>B) - AEMBusinessPartnerAddressCheck <strong>(optional)</strong></h2>
<h3 is-upgraded>1. Let&#39;s take a look at the AEMBusinessPartnerAddressCheck iflow:</h3>
<p><img alt="AEMBusinessPartnerAddressCheck_flow" src="img/850c4d221a30107e.png"> This flow receives Business Partner Create and Change events and invokes the Data Quality Management Service in BTP to check and correct the addresses inside the Business Partner event payload. It does this by<br> a) Storing the original event payload in an environment variable.<br> b) Populating the DQM request payload with the addresses in the input event.<br> c) Invoking the DQM service over REST and<br> d) Parsing the response, checking whether the DQM service evaluated the input addresses to be Valid, Invalid, Blank or has Corrected them.<br> e) Merging any corrected addresses back into the original payload.<br> f) And finally publishing the result back as a new event to the AEM broker with an updated topic in the format:<br><code>sap.com/businesspartner/addressChecked/V1/{businessPartnerType}/{partnerId}/{addressCheckStatus}</code></p>
<p>Let&#39;s also look at what happens in order to publish a new event back to the Advanced Event Mesh broker. First of all, on the integration flow overall configuration settings, we are preserving the destination header field to have access to the original topic that this event was published on. This matters, because the event may contain valuable meta-data that helps us and downstream consumers filter for events relevant to them and it saves us from reparsing the payload, which can be CPU and I/O intensive. <img alt="AEMBusinessPartnerAddressCheck flow settings" src="img/ad23f169d749c108.png"> Secondly we are using a couple of lines in the script that is evaluating the DQM service result and merging the corrected addresses back into the original payload to retrieve and parse the original topic, replace one level (the verb) to create a new event and amend another extra meta-data level that contains the result of the address check (either Valid, Corrected, Invalid or Blank), which can be used by downstream systems to filter for specific outcomes. We are storing the newly created topic in the Destination field of the message header. <img alt="AEMBusinessPartnerAddressCheck topic processing" src="img/34b75b7451b0e15a.png"> Lastly, the AEM Receiver adapter is configured to persistently (to avoid message loss) publish to a topic, taking the value from the header field that we set in the previous step/script. <img alt="AEM Publisher settings" src="img/10eeb30c7c1b616b.png"></p>
Expand Down
12 changes: 6 additions & 6 deletions markdown/sap-aem-int-day-3/sap-aem-int-day-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Duration: 0:09:00
- Complete all activities in day 1 & 2. <br>You access and use the same broker you setup previously as well as the simulator to push events for testing.
- Have access to an active Integration Suite Cloud Integration tenant.
- Have an email server and account credentials that allows SMTP access if you want to send email notifications from your iflow.
- Have an SFTP server and account credentials if you want to test successful integration of events to a file based interface of a legacy system (optional).
- Have a subscription to SAP Data Quality Management for location data or permission to activate it.<br> (We'll show you how to activate one, if you don't have it already).
- Have an SFTP server and account credentials if you want to test successful integration of events to a file based interface of a legacy system **(optional)**.
- Have a subscription to SAP Data Quality Management for location data or permission to activate it.<br> (We'll show you how to activate one, if you don't have it already). **(optional)**


## Set up Integration Suite and Import Event Enabled Integration Flows
Expand Down Expand Up @@ -60,7 +60,7 @@ Deploy the adapter after import.

See [SAP documentation](https://help.sap.com/docs/integration-suite/sap-integration-suite/importing-custom-integration-adapter-in-cloud-foundry-environment#procedure) for more detailed instructions

### C) Activate SAP Data Quality Management service in BTP
### C) Activate SAP Data Quality Management service in BTP **(optional)**

One of our iflows that we are going to deploy is invoking the SAP Data Quality Management service (DQM) to check and cleanse address data in the BusinessPartner events. For the flow to work properly, you will need a working DQM service subscription so you can configure your iflow with this. The good news, if you don't have one already, you can use a free tier subscription for this purpose.
Please follow along the steps in this [blog post](https://blogs.sap.com/2022/02/15/getting-started-with-sap-data-quality-management-microservices-for-location-data-btp-free-tier/) by Hozumi Nakano to active the service.
Expand Down Expand Up @@ -119,7 +119,7 @@ Create the following queues and provide the details as given.

![queue settings](img/CILegacyAdapterInDMQ-queue-settings.png)

### B) For the AEMBusinessPartnerAddressCheck flow
### B) For the AEMBusinessPartnerAddressCheck flow **(optional)**
Create the following queues and provide the details as given.

#### 1. CIBusinessPartnerChecker queue
Expand Down Expand Up @@ -235,7 +235,7 @@ The legacy output adapter is simulating appending events to a file via an SFTP a
> aside negative
> If, after successful demonstration of the error handling, you would still like to see a successful delivery of events to a file via sftp, you will need an sftp server and sftp credentials to configure the flow with a valid endpoint (sftp server address and username password) and import the ssh identidy into .
### B) - For AEMBusinessPartnerAddressCheck
### B) - For AEMBusinessPartnerAddressCheck **(optional)**
Activate SAP's Data Quality Management Service (DQM) by following this [blog](https://blogs.sap.com/2022/02/15/getting-started-with-sap-data-quality-management-microservices-for-location-data-btp-free-tier/) if you haven't already done so.<br>
Additionally, you will have to create a service instance and a service key to be configured with your integration flow later. Follow [these steps](https://developers.sap.com/tutorials/btp-sdm-gwi-create-serviceinstance.html) to create a service instance and key.<br>
Take a note of the URL and user credentials once you've activated the service.<BR>
Expand Down Expand Up @@ -322,7 +322,7 @@ You should be seeing the AEMLegacyOutputAdapter flow as Started, similar to this
- Check that the AEMLegacyOutputAdapter input queue has at least one consumer connected to it.
![AEM service queue overview](img/CILegacyAdapterIn-queue-status.png)

### B) - AEMBusinessPartnerAddressCheck
### B) - AEMBusinessPartnerAddressCheck **(optional)**
#### 1. Let's take a look at the AEMBusinessPartnerAddressCheck iflow:
![AEMBusinessPartnerAddressCheck_flow](img/AEMBusinessPartnerAddressCheck_flow.png)
This flow receives Business Partner Create and Change events and invokes the Data Quality Management Service in BTP to check and correct the addresses inside the Business Partner event payload. It does this by<br>
Expand Down

2 comments on commit cc81308

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.