Using the Http Control in a Business Process
The business process starts with a client request node, representing a point in the process at which a client sends a request to a process. In this case, the client invokes the SetProperties method on the process to specify a dynamic property for your Http control.
Complete the following tasks to design your business process to send and receive data using your Http control, using a dynamic property setting that specifies the target URL to send and receive data.
- Create an instance of the WLI Http control, and call it MyHttpControl. Use the steps provided in Creating a New WLI Http Control.
- Your new Http control will be visible under the Controls tab in the Data Palette. Expand MyHttpControl to see the Http methods that you can use in your business process.
- Design a Control Send Node in Your Business Process and specify a dynamic property to be used during run time.
To Design a Control Send Node in Your Business Process
- Expand the MyHttpControl control instance in the Data Palette. Then click the following method:
setProperties(HttpControlPropertiesDocument propsDoc)
- Drag the method from the Data Palette and drop it on your business process in the Design View, placing it immediately after the Client Request node.
- Double-click the SetProperties node. Its node builder opens on the General Settings tab.
- Confirm that MyHttpControl is displayed in the Control field and that the following method is selected in the Method field:
setProperties(HttpControlPropertiesDocument propsDoc)
- Click Send Data to open the second tab in the node builder. The Control Expects field is populated with the data type expected by the SetProperties method: HttpControlProperties.
- In the Select variables to assign field, choose Create new variable... using the name dynamicprop. Close the window.
- Double click on the client request node to open the node builder.
- Click Receive Data to open the second tab on the node builder. The Client Expects field is populated with the data type expected, in this case HttpControlPropertiesDynamicProperties. In the Select variables to assign field, click the arrow to display the list of variables in your project. Then choose dynamicprop.
- Click Apply and Close.
This step completes the design of your Http control node.
At run time, the dynamic property that you defined will override the static property defined using the Property Editor.