Top Banner
31

WSO2Con EU 2016: Creating Data APIs with WSO2 Data Integration Server

Apr 15, 2017

Download

Technology

WSO2 Inc.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server
Page 2: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server

source: www.cx-journey.com

Page 3: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server
Page 4: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server

••

Page 5: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server
Page 6: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server
Page 7: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server

••••••

Page 9: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server
Page 10: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server

{ "employees": { "employee": [ { "lastName": "Patterson", "salary": 2000, "firstName": "Mary" } ] }}

Page 11: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server
Page 12: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server
Page 13: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server
Page 14: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server
Page 15: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server
Page 16: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server
Page 17: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server
Page 18: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server

•–

––

Page 19: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server

••

Page 20: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server
Page 21: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server
Page 22: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server

@startuml

IntegrationFlow : DISWorkflow

participant inboundendpointListener : InboundEndpoint(protocol("http"),port(8082),context("/disworkflow"))participant pipeline : Pipeline("dis_workflow")participant datasource : OutboundDataSource(protocol("rdbms"),host("jdbc:mysql://localhost:3306/DISTEST"),username("root"),password("root"))

inboundendpointListener -> pipeline : "Request"

log("Before Select")

pipeline -> datasource : query(statement("SELECT * FROM Employee"),resultset(rs))datasource -> pipeline

log("After Select")

pipeline -> inboundendpointListener : "Response"@enduml

Page 23: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server
Page 24: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server

@startuml

IntegrationFlow : DISWorkflow

participant inboundListener : InboundEndpoint(protocol("http"),port(8082),context("/disworkflow"))

participant pipeline : Pipeline("dis_workflow")

participant datasource : OutboundDataSource(protocol("rdbms"),host("jdbc:mysql://localhost:3306/DISTEST"),username("root"),password("root"))

inboundListener -> pipeline : "Request"

log("Before Insert")

group transaction

pipeline -> datasource : query(statement("INSERT INTO Location(City,Country) VALUES(?,?)"),parameter($in.City,$in.Country),resultset(rs))

datasource -> pipeline

pipeline -> datasource : query(statement("INSERT INTO Employee(Name,CityID) VALUES(?,?)"),parameter($in.Name,$rs.id))

datasource -> pipeline

else

log("Transaction Error - Rolled back")

end

log("After Insert")

pipeline -> datasource : query(statement("SELECT * FROM Employee"))

datasource -> pipeline

pipeline -> inboundListener : "Response"

@enduml

Page 25: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server
Page 26: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server

@startuml

IntegrationFlow : DISWorkflow

participant inboundListener : InboundEndpoint(protocol("http"),port(8082),context("/disworkflow"))

participant pipeline : Pipeline("dis_workflow")

participant datasource : OutboundDataSource(protocol("rdbms"),host("jdbc:mysql://localhost:3306/DISTEST"),username("root"),password("root"))

inboundListener -> pipeline : "Request"

group Transaction

log("Within Transaction")

loop $in.cities

pipeline -> datasource : query(statement("INSERT INTO Location(City, Country) VALUES(?,?)"),parameter($cities.City,$cities.Country),resultset(rs0))

datasource -> pipeline

loop $cities.employees

pipeline -> datasource : query(statement("INSERT INTO Employee(Name,CityID) VALUES(?,?)"),parameter($employees.Name,$rs0.id))

datasource -> pipeline

end

end

else

log("Error Sequence")

end

log("Before Select")

pipeline -> datasource : query(statement("SELECT * FROM Employee"),resultset(rs2))

datasource -> pipeline

log("After Select")

pipeline -> inboundListener : "Response"

@enduml

Page 27: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server
Page 28: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server

@startuml

IntegrationFlow : DIS_Insert

participant inboundListener : InboundEndpoint(protocol("http"),port(8080),context("/insertemployee"))participant pipeline : Pipeline("dis_flow")participant datasource1 : OutboundDataSource(protocol("rdbms"),host("jdbc:mysql://localhost:3306/mysqltestdb"),username("root"),password("root"))participant datasource2 : OutboundDataSource(protocol("rdbms"),host("jdbc:oracle:thin:@//localhost:1522/oracletestdb"),username("root"),password("root"))

inboundListener -> pipeline : "Request"

log("Before Insert")

pipeline -> datasource1 : query(statement("INSERT INTO Location(City, Country) VALUES(?,?)"),parameter($in.CityName,$in.Country))datasource1 -> pipeline

pipeline -> datasource2 : query(statement("INSERT INTO Employee(Id, Role) VALUE(?,?)"),parameter($in.Id,$in.Role))datasource2 -> pipeline

log("After Insert")pipeline -> datasource1 : query(statement("SELECT * FROM Location"))datasource1 -> pipeline

pipeline -> inboundListener : "Response"

@enduml

Page 29: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server
Page 30: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server

••

Page 31: WSO2Con EU 2016: Creating Data APIs  with WSO2 Data Integration Server