How To Create a Restful Web Service Using Low Code Integration Platform
This article shows a video demonstration on how to create a restful webservice using TIBCO Active Matrix Business Works 6 version (BW6) or Container Edition (BWCE)
Join the DZone community and get the full member experience.
Join For FreeTIBCO Active Matrix Business Works is a middleware product which serves as an integrated foundation for mission-critical IT environments. Powered by a next-generation foundation that includes an Eclipse-based design-time, a powerful process engine and a modular OSGi-based run-time, Business Works 6 enables developers to create new services, orchestrate business processes and integrate applications in the shortest time possible.
In this tutorial, we will see how to create a RESTful Web Service using TIBCO Business Works 6 (BW6) or Container Edition (BWCE). TIBCO Business Works Container Edition allows customers to leverage the power and functionality of TIBCO Active Matrix Business Works in order to build cloud-native applications with an API-first approach and deploy it to container-based PaaS platforms such as Cloud Foundry, Kubernetes and OpenShift or to similar Docker-supported cloud platforms.
- Open the business studio for business works, Welcome screen appears.
- Go ahead and click on the workbench, it takes you to the design view.
- Create a new application module by clicking on a new project.
- It will open a project wizard, locate the application module and click on next.
- Name the application as rest service, click next and leave all the default folders as is, click on next then finish.
- This will create a typical business works application module with an empty process.
- Delete the empty process which comes as part of application module creation.
- Right-click on the rest service package and create a new business works rest resource.
- It opens a rest service wizard, leaves all the default values as is then unchecks the post operation and checks the get operation, click on next then finish.
- This will create an address resource with the get operation, the get-out activity is where the output for the rest application is configured.
- Give a hello world string for the application as output and say welcome to BW6 and save.
- Add a logger to the process, for that go to general activities and go down to locate log activity, then drop it in the process canvas.
- Drag the transition to connect to get output activity and in the log, the message writes a log message saying this is a BW application and saves it.
- This completes the designing process, to test the application click on the play button.
- It launches the application, goes to the console view to see the logs; waits until the project gets started.
- As soon as the BW application is started, try to invoke the rest application.
- To do that click enter and get the rest URL for the application by typing the l-rest doc command which gets the discovery URL for the rest application.
- Copy this URL, use a browser and click enter this will open the Swagger UI. TIBCO BW6 has native support for Swagger UI.
- Click on the resource to see all the resources that are implemented in the rest web service.
- Currently, get a resource, click on try it out and a message shows "hello world welcome to BW6" with the response code 200 which means it is successful.
- Go to the studio to see the logs, to locate the log which is configured in the log activity "this is a BW application"
Opinions expressed by DZone contributors are their own.
Comments