In this step, you define how your business process is started. As web services, business processes expose their functionality through methods, which clients invoke to make requests. You can also create Process controls from business processes. In the case of Process controls, other resources can interact with your process via the controls interface.
Note: | You will learn more about Process controls in Step 6: Invoke a Business Process. |
In this step, you design the Start node in your business process to receive a Request for Quote (RFQ) message from a client; receipt of the RFQ message is the trigger that starts the business process.You also create a variable to hold the incoming RFQ message.
In the Design view, interactions between a business process and a client are represented by Client Request and Client Response nodes. In this case, you add a Client Request node to your business process and, subsequently, create the code for this node to handle receipt of a message from a client.
Complete the following tasks to design the Client Request node that starts your business process:
RequestQuote.java
. The RequestQuote business process is displayed in the Design view.The empty node that was associated with the Start node changes to a Client Request node.
Designing the Client Request node includes creating a method and parameters that the client uses to trigger the start of the business process, and designing the logic for handling receipt of requests from the client.
Select the Client Request node and press F2. Enter Client Requests Quote
as the new name and press Enter. Your business process should now be as shown in the following figure:
The node builder is displayed.
Note: | Node builders provide a task-driven user interface to help you design the communication between a business process and its clients and other resources. To access the node builder for any node, double-click the node in the Design view. A node builder that is specific for the type of node that you selected is displayed in-line in your business process. |
The node builder for a Client Request node displays the two tabs: General Settings and Receive Data.
The following steps describe how to specify the method exposed by your business process. Clients invoke this method to start and make requests on your business process.
clientRequest
to quoteRequest
.Note: | When you make your business process available as a service, the name that you assign to a method on a Client Request node is the name of the method that is exposed through the Web Services Description Language (WSDL). It is recommended that you use a name that clearly indicates the service offered by the business process. |
quoteRequest
method:The RFQ is an XML message. So an XML data type is required at this node.
The panel displays a list of XML schema files under Typed and a list of Untyped XML objects that are available in your project.
The XML schemas that you need for this tutorial are in the Schemas
folder of the utility project. The schemas provided include QuoteRequest.xsd
, PriceQuote.xsd
, AvailQuote.xsd
, Quote.xsd
, and a system schema DynamicProperties.xsd
.
Note: | For XML schemas to be available to the services in your application, they must be located in Schemas folder under the web or utility project. |
In this step, you use the QuoteRequest.xsd
XML schema to specify the structure of documents that clients can send to trigger your business process.
QuoteRequest.xsd
node.
A graphical representation of the QuoteRequest.xsd
XML schema is displayed.
quoteRequest
node. It represents the parent element in your XML document.
The following value appears in the Type Name field: org.example.request.QuoteRequestDocument
.
requestXML
in place of the default parameter name (x0
).
The parameter type (QuoteRequestDocument
) and name (requestXML
) are displayed in the General Settings tab in the node builder.
This step completes the specification of the method exposed to clients by your business process. Messages from clients are expected to be typed XML; that is, the messages received from clients must contain XML data that is valid against an XML schema (in this case, QuoteRequest.xsd
).
Note: | Sample XML files (QuoteRequest.xml and QuoteRequest_a.xml ) that are provided in the testxml folder are used later in the tutorial to test the process. |
The General Settings tab is updated, as shown in the following figure, to indicate that you successfully completed the specification of a method name and parameters.
Note: | indicates a completed task; indicates an incomplete task. |
The Receive Data tab has two modes:
By default, the Receive Data tab opens in the Variable Assignment panel.
Note: | It is also possible to assign typed non-XML (MFL) data directly to XML variables in the Receive Data tabs; no transformation is necessary. A discussion about non-XML (MFL) data is outside the scope of this tutorial. To learn about MFL files and the assignment of the data to business process variables, see Business Process Variables and Data Types in Guide to Building Business Processes. |
For this tutorial, we use the Variable Assignment mode because we want to assign the XML message received from the client directly to a variable of the same data type. In subsequent steps, you create a variable of typed XML (QuoteRequestDocument
) to which your process assigns the incoming RFQs from clients.
The Create Variable dialog box is displayed.
requestXML
.
The following value appears in the Type Name field: org.example.request.QuoteRequestDocument
.
The new variable is created and displayed in the Receive Data tab.
Note: | The requestXML variable is shown as an XML variable in the Data Palette view. |
Both tabs in the node builder (General Settings and Receive Data) are marked as complete .
In the Design view, note the completeness indicator associated with the Client Requests Quote node changes from to , confirming that the design of the node is complete.