Here, I am going to explain RESTful web service invocation and fetch Database-records.
There are three scenarios included here..
1. GET Method: Fetch employee details from Database
2. Post Method: Add employee details into a Database Table
3. Delete Method: To delete a particular record from the table.
First, create HTTP Connection, Database connection(MySQL)
HTTP Connection:
DB Connection:
Get Method - Implementation flow
This flow will fetch the db records based on query parameter<eid>
Business Process
Start ActivityJDBC Query
Render JSON
This activity converts from DB format to JSON format
End ActivityPost Method - Implementation flow
This process will create a new record in DB table based on given payload
Start Activity
Parse JSON
Update JDBC Activity
Render JSON
This activity converts the given input to JSON format
End Activity
Delete Method - Implementation flow
This flow will delete db records based on query parameter <eid>
Start Activity
Delete Emp Details (Update JDBC)Mapper ActivityEnd ActivityOrchestration- RESTful Service -Implementation (Main Flow)
This flow acts as a gateway to receive request and route it based on the base path and HTTP Method.
HTTP Receiver Activity
Resource path
Nice explanation.
ReplyDelete