Skip to content

Latest commit

 

History

History
102 lines (82 loc) · 5.89 KB

3.TCE.md

File metadata and controls

102 lines (82 loc) · 5.89 KB

Cloud Events

Overview

In this hands-on lab you will use Cloud Events to create a dynamic API that will respond with contextual offers. Cloud Events will make decisions based on itineraries, gate information, flight status and passenger profile. Cloud Events will respond with the best possible offer for the passenger.

Get Started

Start by signing into TIBCO Cloud and opening Events.

[To return to the Home Page of TIBCO Cloud Integration, clik the TIBCO CLOUD icon from the top left corner]

  1. Start at Welcome to your TIBCO Cloud (Home Page).
  2. Select Event Processing.
  3. Select Events.

Uploading Cloud Event Offer Project

For this exercise we are going to start with a prebuilt solution. This solution will make an offer decision based on passenger loyalty and flight status.

  1. The You don’t have any apps yet page should be opened.
  2. Select Upload, cloud with up-arrow.
  3. Navigate to where you extracted the connected customer experience artifacts and drag "project/CloudEvents/PassengerOffer.ear" into Drag and Drop and select Push.
    Or download PassengerOffer.ear
  4. The PassegerOffer project files will be pushed to the cloud and started.

Testing PassengerOffer

  1. The PassengerOffer project should be running on the My Default Sandbox.
  2. Select 2 Endpoints and right-click PassengerOffer Swagger link and select Open Link in New Tab.
  3. Select the new Swagger link tab on your browser window.
  4. Expand GET Method and select Try it out.
  5. Enter values for parameters as shown below and press Execute.
    • passengerid= 11111
    • loyaltystatus= GOLD
    • flightstatus= DELAY3
  6. The offer, shown below, is Dinner At Chilis.
  7. Try a couple of different combinations of loyalty status and flight status. Use values in the table below.
passengerid loyaltystatus flightstatus
11111 BRONZE DELAY1
11111 SILVER DELAY1
11111 GOLD DELAY1
11111 BRONZE DELAY2
11111 SILVER DELAY2
11111 GOLD DELAY2
11111 BRONZE DELAY3
11111 SILVER DELAY3
11111 GOLD DELAY3

Working with Cloud Events

In this next section we are going to make a change to the decision table. Currently a passenger with SILVER loyalty and a 2-hour delayed flight is offered a Happy Meal. We are going to change that offer to a Philly Cheesesteak and Coke.

  1. Navigate to Cloud Events Apps page by logging into cloud.tibco.com and select Event Processing and select Events (Alternatively you can just click on the tab where you left with the TIBCO Event Home Page from the previous step). You should see your running PassengerOffer App.
  2. You are going to use WebStudio to make changes to the Cloud Events decision table. But before you can do this, you need to provision the PassengerOffer App to WebStudio via an operational sandbox
    • Go to All Sandboxes drop down
    • Click +New
    • Select Create Operational Sandbox
    • Call it PassengerOffer (same for Display Name)
    • Leave it as public
    • Click Create button
  3. Click the three dots to the right of PassengerOffer app (running on My Default Sandbox), Select "Promote to an Operational Sandbox"
  4. Choose your PassengerOffer operational sandbox and click Promote App
  5. Wait for dialog indicating the promotion was successful - you will see a new PassengerOffer app running on PassengerOffer operational sandbox in the list.
  6. Click the three dots to the right of PassengerOffer app in the Operational sandbox and select Provision App to WebStudio
  7. Wait for dialog indicating the provisioning was successful.
  8. Select WebStudio button from top right.
  9. You will be taken to the to Dashboard. The dashboard shows all recent activities and the promoted projects.
  10. On the PassengerOffer project, clickj Checkout Project Now link (cloud with down arrow)
  11. In the popup dialog screen, select Confirm. This will check out all PassengerOffer artifacts.
  12. You are going to make changes to the PassengerOffer decision table. Select offerDecision from ARTIFACTS list.
  13. In the offerDecision table, scrolls down to row 5 where SILVER, DELAY2 and “Happy Meal” is displayed. Change “Happy Meal” to “Philly Cheesesteak and Coke”. Select Save button.
  14. Commit your changes. Select Commit, add a message and select Confirm.
  15. Using the three dots in the Project ARTIFACTS pane, select Show resources as tree.
  16. Right-click on PassengerOffer and select Generate Deployable. Select PassengerOffer and select Confirm.
  17. Let’s deploy the changes. Select Dashboard, select the green Approve button to apporove the change.
  18. In the recent Approved activity box, Select >PassengerOffer to expand the details.
  19. Select the Deploy button in the expanded details section.
  20. Wait for deploy successful message to appear

Testing PassengerOffer Changes

  1. Select Back to Home Page from the top right to return to Cloud Events
  2. The PassengerOffer app within the PassengerOffer operational sandbox is currently not running. To scale it, click on the 0 stopped message to the left of the app name.
  3. Ensure 1 instance is selected and click Scale
  4. Wait for scaling to complete
  5. Select 2 Endpoints and right-click PassengerOffer Swagger link and select Open Link in New Tab.
  6. Select the new Swagger link tab on your browser window.
  7. Expand GET Method and select Try it out.
  8. Enter values for parameters as shown below (note this is case sensitive) and press Execute.
    • PassengerId = 11111
    • Loyaltystatus = SILVER
    • FlightStatus = DELAY2
  9. The offer shown should be "Philly Cheesesteak and Coke".

Summary

In this exercise you imported a cloud events project, made changes to decision tables and tested PassengerOffer API.

Next step: Cloud Analytics