Giter Site home page Giter Site logo

ibm / banking-digitalization-using-hybrid-cloud-with-mainframes Goto Github PK

View Code? Open in Web Editor NEW
25.0 26.0 52.0 9.74 MB

The following journey will introduce the available Banking APIs published on IBM Cloud with logical business programs running on the IBM Z Mainframe through a simulated retail bank called MPLbank.

Home Page: https://developer.ibm.com/components/ibmz/patterns/create-financial-applications-using-apis-on-mainframe

License: Apache License 2.0

HTML 51.42% JavaScript 48.58%
mainframe bank-application api-connect db2 ibm-db2 ibm-developer-technology-cloud bluemix ibmcode call-for-code

banking-digitalization-using-hybrid-cloud-with-mainframes's Introduction

Read this in other languages: **.

Banking Digitalization using Hybrid Cloud with IBM Z.

The following journey will introduce the available Banking APIs published on IBM Cloud with logical business programs running on the IBM Z mainframe through a simulated retail bank called MPLbank.

MPLbank

Architecture

This journey accesses a fictitious retail banking system called MPLbank. MPLbank integrates an Account Management System, a Payment Hub (not shown in the schema), a Customer Management System and a Financial Risk Management System. On top of these components, an API layer hosted in IBM Cloud has been set up to deliver a banking API, and make them reachable from all kind of applications.

alt text

Published banking API includes:

  • /customers/ operation path calls the Customer Database services in MPLbank.
  • /accounts/ operation path calls the Account Management System services in MPLbank.
  • /customers/loan/ operation path calls the Financial Risk Management System service in MPLbank.

The Customer Database System and Financial Risk Management System expose services through built-in REST/JSON interfaces. In front of the Account Management System, IBM z/OS Connect EE has been set up to create REST/JSON Interfaces from COBOL programs running in CICS. As a result, these 3 sub-systems are flexible and reachable using REST/JSON APIs. These sub-systems act as micro-services by delivering REST/JSON interfaces and IBM API Connect acts as an API layer to manage a unique and final set of banking REST/JSON APIs. The resulting hybrid architecture approach enables the best of both worlds and builds a fast and secure API Economy.

More information about data in MPLbank Readme.

The objectives of this journey are to discover, test and use this Banking API using a sample banking application, then enhance it using IBM Cloud.

Included components

The journey is accomplished by using a Hybrid IBM Cloud / IBM Z Mainframe architecture.

More information about Technologies in MPLbank Readme.

Steps

Part A: Discover and test the banking API

  1. Start with the API Developer Portal
  2. Subscribe to the banking API
  3. Work with the banking API

Part B: Make your own banking application

  1. Download and review the banking application code
  2. Run the banking application

Part C: Extend the banking application in Cloud

  1. Start with Node.js on Cloud

EXTRA : Start with Internet Of thing and the banking API


Part A: Discover and test the banking API

1. Start with the API Developer Portal

  1. Sign up for an IBM ID if you don't have one already.

  2. Go to the API Developer Portal.

  3. Create an account if you have not done that already. alt text

    • Click Create an Account.
    • Provide all required information. Be sure to use your IBM ID (email address) for this account.
    • Click Submit.

    An account activation email will be sent to your registered IBM ID email. Click on the link in this email to activate your account.

  4. Login to your account.

  5. Create a new application. alt text

    • Click Apps from the menu.
    • Click Create new App.
    • Fill in all required fields.
    • Click Submit.

    Make a note of the client ID and client Secret. You will need them to access the API later. alt text

2. Subscribe to the banking API

  1. Before working with the banking API, you need to subscribe to it first. Display the list of available API products. alt text

    • Click API Products from the top menu.
    • Click Banking Product in the list.
  2. Subscribe to the Banking API. alt text

    • Click Subscribe to the Default Plan.

    alt text

    • Select the App that you have just created before.
    • Click Subscribe.

3. Work with the banking API

  1. Go to the Banking API page. alt text

    • Click Banking APIs.

    This page has 3 sections:

    • The left panel is the navigation panel that lists all the available operations and their definitions.
    • The middle panel displays detail information for the item you have selected.
    • The right panel contains sample code in various programming languages.
  2. Discover the operation GET /customers/{customerID} by reading its documentation. alt text

    • Click GET /customers/{customerID}.

    This operation gives personal data relative to a banking customer. All available customers ID are in the /identifier/customerIDs.txt file in this Github repository.

  3. Generate code for the operation GET /customers/{customerID} following the right panel of this operation. alt text

    • Click a programming language that you want to work with.

    Sample code for the selected programming language and an example output of a successful response are displayed. You can copy the code and use it in your own application.

  4. Test the operation GET /customers/{customerID} in your programming language.

    alt text

    • Scroll down to the Try this operation section.

    IMPORTANT: All available customers ID are in the /identifier/customerIDs.txt file in this Github repository. Do not forget to fill the x-ibm-client-id and x-ibm-client-secret with yours.

    • Click Call Operation.

    You should see the returned output at the bottom of the page.

    alt text

  5. Replay this scenario in order to test all operations in this banking API. Other operations input parameters can be found in the JSON output of the GET /customers/{customerID} operation request.


👍 Congratulations! You have successfully discovered and tested the banking API.


Part B: Make your own banking application

A quick banking application has been developed in order to help you to start coding. This web application (HTML/CSS/Javascript) uses the banking API introduced before.

1. Download and review the banking application code

  1. Download and import the project bankingApplication located in this Github repository into your preferred IDE like Eclipse. alt text

    • Either click on Download ZIP
    • Or use Git Command :

    git clone https://github.com/IBM/banking-digitalization-using-hybrid-cloud-with-mainframes.git

  2. Review the index.html file in order to understand how it is working.

  3. Review the bankingAPI.js file in order to understand how the script works. alt text

    • Change the customer ID if needed. It has been hardcoded for this sample code.

    NOTE: You can change the customer identifier through the identifier folder in this Github repository. 1000 customers have been generated, meaning it represents 1000 different banking customers.

    • Replace IBM_CLIENT_ID and IBM_CLIENT_SECRET variables by yours and save the file.

2. Run the banking application

  1. Open the index.html in your favorite web browser. The application will automatically run.

    NOTE: There is no need to compile JS/HTML/CSS from any IDE! Just edit those files in the IDE and refresh the index.html in the web browser (or Ctrl + F5 shortcut key) to reload this web application.

    alt text

  2. Click on the button Click here to load a banking customer profile. alt text

    This will call the published operation GET /customer/{customerID}.

  3. Understand the output JSON response from this operation call.

  4. Call each other services in the sample banking application. Each service matches a published banking operation:

    • Customer contract
    • Banking Account - Balance Inquiry
    • Banking Account - Transaction Inquiry
    • Banking Account - Detail

👍 Congratulations! You have successfully developed your first banking application.


Part C: Extend the banking application in Cloud

1. Start with Node.js on Cloud

  1. Sign up or login to IBM Cloud

    NOTE: Use IBM Cloud to create, test and deploy a quick application. Choose among JAVA Liberty Profile, Node.js servers, Ruby, Python, etc. This platform also provides DevOps tools for a continuous delivery (Git, automatic deployment) and a lot of innovative features and services.

  2. Go to the navigation menu and go to Cloud Foundry.

    alt text

    alt text

  3. On the Cloud Foundry screen, inside Public Applications box, click on the Create button alt text

  4. Configure your Node.js project. On the Configure Resource menu alt text

    • Select "SDK for Node.js"
    • Provide an App name.
    • Click Create.
  5. Wait for the Node.js Runtime creation.

  6. Once created, explore this panel to be familiar with it. alt text

    • Install IBM Cloud CLI on your workstation
    • Click Visit App URL. The default Node.js Project (Hello World) has been provided.
    • Explore each menu on the left panel to understand the Runtime, connections, logs, etc.
    • Read the Getting Started.
  7. Clone the project from Git https://github.com/IBM-Cloud/get-started-node.git

  8. Edit the cloned Hello World sample application on your laptop to integrate the Financial application files:

    • Copy the js folder from the financial application into the views folder.
    • Remove the views/stylesheets* folder to delete the default CSS style.
    • Copy the css folder from the financial application into the views folder.
    • Replace the index.html from the financial application to the views folder.
    • Edit the manifest.yml to change the app name and delete the random route line. The new app name should be the "App name" provided at step 3 in lower cases (another name will create a new Node.js instance). alt text
  9. Re-Deploy the new code to the Node.js Runtime in Cloud using the ibmcloud commands you read in step 6 and followings commands:

    • "ibmcloud cf install"
    • "ibmcloud login" or "ibmcloud login -sso"
    • "ibmcloud target -g default"*
    • "ibmcloud target --cf"
    • "ibmcloud cf push" (ignore messages "Failed to retrieve logs ")
  10. Re-Click Visit App URL on Cloud. alt text

The banking application is now hosted in Cloud and use the banking API.


👍 Congratulations! You have successfully developed your first banking cognitive application in Cloud.


  1. You can remove your server.
    • Click on the navigation menu
    • Select Resource List
    • Expand "Cloud Foundry Apps"
    • Click on the dots at the end of the line of your server and choose "Delete". Accept route removal warning.

License

This code pattern is licensed under the Apache License, Version 2. Separate third-party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 and the Apache License, Version 2.

Apache License FAQ

banking-digitalization-using-hybrid-cloud-with-mainframes's People

Contributors

alexis-chretienne avatar animeshsingh avatar dolph avatar imgbotapp avatar karlwho avatar stowellme avatar wwalisa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

banking-digitalization-using-hybrid-cloud-with-mainframes's Issues

Document

Cloud computing for rural banking project document

Pattern needs to be updated

After testing the pattern, the following changes are needed:

In Part C step 1. The link to sign up or login in to IBM Cloud doesn’t work.

In Part C step 6-8 need to be updated

  • The Getting Started page in IBM Cloud has been changed. There is now no clear way to download or clone the project files.
    • Need to add step for instructions on cloning the project
      • Git clone https://github.com/IBM-Cloud/get-started-node.git
      • Files go into the ‘views’ folder instead of ‘public’
      • Edit html/js/css files as shown
      • Edit Manifest file
        • Change app name
        • Delete the random route line
      • Change the “cf push” to “bx app push”

In Part C step 2. Might need more clarification on where to go in the catalog to find “SDK for Node.js”

In the app the phrase "IBM Developer Journey" is used as the site title and copyright. These should be changed to IBM Code Pattern.

Banking API error message

{
  "error": {
    "errorMessage": "URL open: A URL open error occurred when sending the request to the target. 
'http://cap-sg-prd-5.integration.ibmcloud.com:17081/com.ibm.mdm.server.ws.restful/resources/MDMWSRESTful', status  
code: 8. ",
    "errorCode": "0x85800046",
    "errorDescription": "Data cannot be sent to the URL target.",
    "errorSuggestion": "This error can be caused by an external entity (a remote server experiencing  
problems) or an internal issue. Verify that the URL target is correct and that the Content-Type HTTP  
header is appropriate for the data that is being sent. For HTTPS targets, ensure that the validation  
credentials referenced by the SSL client profile or SSL Proxy Profile provided to the URL open()  
function contain the target's server-side certificate or certificate of the immediate issuer. Check the  
log for additional messages on this same transaction for further clarification. Note that the SSL proxy 
 profile is deprecated. Use the SSL client profile with the prefix 'client:'."
  }
}

I'm getting this error at the GET /customers/{customer-id} API. The app (html and js) is working fine except the API calls. Curl method and through index.html returns that error instead of the customer data

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.