# Step 4: Invoke a Web Service

By default, a Decision node consists of one condition; a path below the condition node, which represents the path of execution followed when the condition, or set of conditions that evaluate to true; and a path to the right of the condition, which represents the path of execution followed when the condition evaluates to false (the default path).

Note: You can add additional condition nodes and paths to a Decision node, but in this scenario, we need only one set of conditions, and two paths.

In this step, you learn how to add logic to one path of execution for your Decision node (Sales Tax Calculation Needed?). Specifically, you learn how to design your business process to interact with resources via controls. Your business process invokes a Web service and handles the data returned from the Web service. This step describes the following topics:

- What is the Tax Calculation Control?
- Design the Interaction Between Your Business Process and a Web Service

## What is the Tax Calculation Control?

Java Controls are server-side components managed by the Workshop framework. They encapsulate external resources and business logic for use in Workshop applications. In other words, controls represent the interfaces between your business process and other resources. The underlying control implementation takes care of most of the details of the interaction for you. Controls expose Java interfaces that may be invoked directly from your business process. You add an instance of a control to your project and then invoke its methods.

In this scenario, the business process calls a Web service, which calculates and returns a sales tax rate. Business Processes invoke Web services via Web Service controls. The Web service control (TaxCalcControl.jcx) is created for you and included in your application's project (specifically in the myapplications\Tutorial_Process_Application\Tutorial_Process_ApplicationWeb\requestquote\services folder, where myapplications represents the location in which you created your tutorial application).

A complete description of how to create the TaxCalc.jws Web service and its associated control (TaxCalcControl.jcx) is beyond the scope of this tutorial. The goal of Step 4 in this tutorial is to describe how to create the appropriate nodes in your business process, and design their communication with this Web Service control.

To learn about creating Web services, and creating a control from your Web service, see Tutorial: Web Services and Controls and Transactions.

Related Topics

Tutorial: Web Services

Buffering Methods and Callbacks

Transaction Boundaries