Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Workflow integration to SAP ByDesign. This repository comprises the workflow definitions and integration scenarios required by the smb-eats-backend sample.

License

Notifications You must be signed in to change notification settings

SAP-archive/smb-eats-integration

Repository files navigation

Deprecation Notice

This public repository is read-only and no longer maintained.


License: Apache2 REUSE status

SMB Eats Integration

Workflow and ERP integration for the SMB Eats prototype

Read full blog post here

Description

This repository is comprised of the workflow definitions and integration flows required by the smb-eats-backend sample. It orchestrates the following steps:

worfklow process

  1. Pizza shop manager needs to approve a customer's order request;
  2. Sales Order is posted to the SAP Cloud ERP;
  3. Kitchen needs to release the pizza for delivery as soon as it's ready for pickup;
  4. Post Goods Issue to the SAP Cloud ERP;
  5. Rider needs to acknowledge pizza's pickup for delivery;
  6. Rider needs to confirm customer has received the pizza.
  7. Sends a Qualtrics satisfaction survey to the customer's e-mail;
  8. Post Customer's Invoice to the SAP Cloud ERP.

Requirements

  • A free trial account on SAP Business Technology Platform with Cloud Foundry Trial initialized;
  • Follow this tutorial to get a trial SAP Business Technology trial account;
  • Setup your SAP Business Technology Platform Integration Tenant by following this tutorial. The documentation Initial Setup of in Cloud Foundry Environment can also help you to understand the whole setup process;
  • Set up Workflow Management as per this tutorial;
  • Configure your development space at SAP Business Application Studio so you can import the provided workflow project. Folow step 1 of this tutorial to set up your environment correctly;
  • A SAP Business ByDesign or SAP Business One or SAP S/4 HANA Cloud test tenant;
  • A Qualtrics Survey demo tenant.

Deployment

Workflow Deployment

  • Configure the destination for the CPI tenant by importing the file "destination_CPI_SA" to the Connectivity > Destinations of your subaccount (required to create the documents in the SAP Cloud ERP).
  • Do the same with the file "destination_bpmworkflowruntime_mail" to configure the SMTP server destination (required to send the email survey).
  • Check here how to import a destination from a file.

Clone this repository using the Business Application Studio;

Then go ahead, build and deploy the workflow itself;

If you want to test your workflow, browse to the SAP Business Technology Platform Trial Account, select your trial subaccount, select your dev space and open your Workflow Management Application. Select the Monitor Workflows > Workflow Definitions, hit "Start New Instance" and replace the "recipient" and "CustomerEmail" with the e-mail you use to login to your trial account. Click "Start New Instance and Close" and head to the "Inbox" tile. You should have a task awaiting for approval.

Integration Flows Deployment

The communication between Workflow and your ERP Backend is done via Integration Flows implemented in your Integration Tenant (CPI).
The workflow is ERP agnostic and calling CPI flows in order to get the documents created at the ERP. Workflow just needs to change a context variable in order to select the required ERP.

For our prototype we have considered 3 ERP backends: SAP Business One, SAP Business ByDesign and SAP S/4 HANA Cloud. The steps to follow are the same, just some of them will be dependent of course of the ERP backend chosen:

1. Setup your ERP Backend OData APIs.

SAP S/4 HANA Cloud

SAP S/4 HANA Cloud is providing OData and SOAP APIs. In order to enable the APIs, a communication user, communication system and the communication arrangement need to be created. Please check the following API's documentation giving details about the required Communication scenarios:

SAP Business ByDesign

In order to get the required OData APIs ready to be consumed please follow the blog SAP Business ByDesign – OData API Examples providing a full set of custom OData APIs ready to be downloaded and imported into ByDesign, we have used some the provided APIs in our prototype.

SAP Business One

In the case of SAP Business One we are consuming the OData v4 APIs provided by SAP Business One Service Layer. There is no preconfiguration required in order to access the APIs, just make sure the corresponding ports are open.

2. Download the provided Integration Package

Download the provided Integration Package:

3. Connect to your SAP BTP Integration Tenant and import the provided Integration Package.

Follow this documentation if you need help on how to import a CPI package;
In both cases (SMBEats and S4Eats) you should get a package containing 3 flows:
SMBEats Integration Flows

4. Configure your ERP Backend technical user into CPI.

You need to store your ERP backend technical user credentials into CPI. Please check this document for more details.
You can also find a sample with instructions at section "iii. Store B1 and/or ByD User Credentials at SAP Business Technology Platform Integration tenant" from the SMB Samples Step by Step guide to get details on how to store ByDesign user credentials in CPI.
Note: In the provided flows the user is named BYD_ADMIN or S4_SA, if you use a different name you will need to replace it.

5. Configure your ERP backend server and user.

The different parameters to be configured to connect to your specific ERP Backend have been defined in the flows using the Externalization feature.
Press the Configure link on the top right of each one of the provided flows: Configure A new screen opens where you can configure each one of the Receivers with the corresponding values required for the Connection. In the case of S4Eats for SAP S/4 HANA Cloud:
SetValuesS4 In the case of SMBEats for SAP Business ByDesign: SetValuesByD In the case of SMBEats for SAP Business One: SetValuesB1

6. Deploy the Integration Flows in CPI

Deploy one by one the 3 Integration Flows part of the package (same 3 flows are part of the ByD and S4 packages): CreateOrder Integration Flow

7. (Optional) Extra documentation

If you want to learn a more about the Integration Suite don't hesitate to check this blog that provides samples, a step by step guide and references to available materials.

Support and Contributions

This repository is provided "as-is". No warranty or support is available. Feel free to open issues.

License

Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.

About

Workflow integration to SAP ByDesign. This repository comprises the workflow definitions and integration scenarios required by the smb-eats-backend sample.

Topics

Resources

License

Stars

Watchers

Forks