|
Oracle Workshop for WebLogic controls make it easy to access enterprise resources, such as databases, Enterprise Java Beans (EJBs), and Web services, from within your application.
When you access a resource through a control, your interaction with the resource is greatly simplified; the underlying control implementation takes care of most of the details for you. You add an instance of a control to your business process project and then invoke its methods. Controls expose Java interfaces that can be invoked from your business process.
You can use controls generated from other services built with Oracle Workshop for WebLogic or generate controls from WSDL files available from other services (regardless of the programming language in which those services were implemented).
Control Send nodes represent points in business processes at which processes send asynchronous messages to resources (via controls). Control Receive nodes represent points in business processes at which processes receive asynchronous messages from resources (via controls). A business process waits at a Control Receive node until it receives a message from the specified control. Control Send with Return nodes handle synchronous exchange of messages between business processes and resources (via controls). These three types of controls are mutable. In other words, you can change them into another type of control by dragging and dropping a control method of a different type.
This section describes how to add nodes to your business process that represent the interactions of your business process with resources. It includes the following topics:
In the Design view, an interaction between a business process and an external resource is represented by one of three Control nodes: Control Send, Control Receive, or Control Send with Return. The following steps describe how to add a Control node to your business process:
As you drag your selection onto the Design view, targets
appear on your business process. Each target represents a location in the flow where you can place the node. As you drag the node near a location, the target is activated
and the cursor changes to an arrow
. When this happens, you can release the mouse button and the node snaps to the business process at the location indicated by the active target. If the location you chose is not a valid one, an
will appear next to your node. If you place your cursor over this icon, Oracle Workshop for WebLogic will display a message about the violation.
The Control node is created in your business process in the Design view; it is named according to the method you dragged and dropped from the Data Palette.
Control Send—Choose the Control Send if you want to create an asynchronous call from your business process to a control.
Control Send with Return—Choose the Control Send with Return node if you want to create a synchronous call from your business process to a control.
Control Receive—Choose the Control Receive if you want to create a handler for a callback from a control to your business process.
The Control node is created in your business process in the Design view, it is named Control Send, Control Send with Return, or Control Receive, depending on which control you dragged onto the Design view from the Node Palette.
The node in the Design view indicates only the type of interaction (asynchronous send, asynchronous receive, or synchronous send/receive) between your business process and a resource; it does not identify the resource.
is a placeholder for a type of control. That is, it represents a location in your business process where you must specify the type of resource (control) with which you want your business process to interact.
– Drag a control method from an instance of a control in the Data Palette and drop it onto the placeholder control in the Design view. (To learn how to add instances of controls to your project, see Adding Instances of Controls to Your Business Process Project.)
– Double click the placeholder control
in the Design view to open the node builder for this control and complete the specifications in the node builder.
Note the following properties for the Control nodes:
indicates that the design of this node is incomplete. To complete the design, see
Configuring Control Nodes.
Designing the Control nodes includes adding an instance of the control with which you want your business process to interact, then specifying the methods on the control, and the variables to which the messages exchanged between your business process and the control are assigned. This section describes how to design Control nodes. It includes the following topics:
Before you can specify the resource with which your business process interacts at this node, you must add an instance of the associated control to your project.
To add an instance of a control to your project:
on the Data Palette. A drop-down list of controls that represent the resources with which your business process can interact is displayed. Instances of controls already available in your project are displayed in the Controls tab.| Note: | Table 5-1contains information about the standard controls used in Oracle WebLogic Integration. Other custom and plug-in controls may be available. |
An Insert Control dialog box, which contains tasks specific for the control you selected, is displayed.
| Note: | For WLI Timer Control and WLW Timer Control, an Insert Control dialog box do not appear. |
This step completes the creation of an instance of a specific control in your application. The controls you create are displayed in the Controls tab.
The methods available on the control are shown in the Controls tab.
Transformations handle mapping heterogeneous data types in your application. Oracle Workshop for WebLogic provides a data mapping tool to map between heterogeneous data types. The data transformations you create using the tool are stored in data transformation files. They can hold multiple transformations and are designed to enable packaging, sharing and reuse of transformation formats. When data transformation files containing your data transformations are built, they are built as controls. The controls expose transformation methods, which business processes invoke to map the disparate data types.
In addition to creating Transformations from the Controls tab in the Design view, as described in this section, you can create them in the following ways:
In the Controls tab, right-click on the control to display a drop-down menu. Select Delete or Edit from the menu. When you select Edit, the control, including its methods and callbacks, is displayed in the Design view.
This section describes how to finalize the design of Control nodes in your business process.
After you add a Control node specific for the type of interaction you want to design—Control Send, Control Receive, or Control Send with Return—the Control node you selected is displayed in your business process in the Design view, see Figure 5-1.

As with other nodes in your business process, you can design the properties and behavior of Control nodes by invoking their node builders. This section describes how to complete the design of the interaction with resources via your Control nodes.
Double-click the appropriate Control node in your business process to invoke its node builder.
Each Control node builder provides a task-driven interface through which you can design the communication between the Control node and a control. The tasks are displayed on tabs on Control node builders: General Settings, Send Data, and Receive Data.
The following sections describe how to specify your control settings on the tabs in the node builders:
| Note: | Asynchronous send and return methods, as well as synchronous send and receive methods can be defined for a given control. Only the methods appropriate for the kind of control node you are designing (Control Send, Control Receive, or Control Send with Return) are displayed in the list. |
If your Control node is expecting data or sending data, in other words it is a Control Send, a Control Receive, or a Control Send with Return, the node builders display either Send Data or Receive Data tabs in addition to the General Settings tab. Tasks on these tabs allow you to define one or more variables to map to method parameters. At run time, input data sent by your business process to controls, or data returned by controls is assigned to these variables.
This tab allows you to define one or more variables to hold the data that your business process receives from clients.
The Control Expects field is populated with the parameter(s) you specified on the General Settings tab.
The node builder transformation screen is displayed with the data types expected by your method displayed in the Control Expects pane.
| Note: | To remove a variable from the node builder pane, select the variable in the list and then click Remove. This action removes the variable from the node builder, not from your business process. The variable is still included in your business process; it is visible in the Variables pane in the Data Palette. |
When designing a business process, you use a Transformation to create maps between disparate data types. Your project must contain an instance of a Transformation control defined by a data transformation file) for you to create the map.
The mapping tool displays a representation of the source schema and target schema in Source and Target panes. You can create a map between the data type of the method parameter and the data type of the variable, or variables, to which you assign the data.
| Note: | To return to node builder, in the Package Explorer pane, double-click the Process.java file. |
| Note: | In the Advanced Option window, if you enter the right input parameter and it matches with the signature of the transformation method, the Ok button will be enabled. |
In the Design view, the
icon indicates that you completed the configuration and design of this node and
is replaced with an icon that represents the resource with which this node communicates. That is, a new control-specific icon replaces the former placeholder icon.
Instances of controls that you create in your business process are represented in the Data Palette. You can view and edit the properties of control instances and their parent types in the JPD Configuration pane and Properties pane.
To View and Edit Properties for Control Types
To View and Edit Annotations for Control Instances
Double-click the control type on the Package Explorer pane.
The file is displayed in the Source view, and its properties are displayed in the JPD Configuration pane. The properties you see and edit in the JPD Configuration pane depend on the control you are using.
Values you specify for the properties in the JPD Configuration pane are written to the file. In other words, the Source view is updated in keeping with the work you do in the JPD Configuration pane. Properties you specify for the control are inherited by any instances of the control you create based on this type.
The file is displayed in the Source view, and its annotations are displayed in the Properties pane. The properties you see and edit in the Properties pane depend on the control you are using.
Values you specify for the annotations in the Properties pane are written to the file. In other words, the Source view is updated in keeping with the work you do in the Properties pane. Annotations you specify for the control are inherited by any instances of the control you create.
Follow the above, to view and edit annotations for control instances.
Double-click the control instance in the Data Palette to display its properties in the Properties pane. The annotations you can see and edit depend on the control you are using. Note that when you open the Properties pane for an instance of a control, the annotations for that instance, are listed at the top of the Properties pane. You can edit the referenced control properties by opening the file as described in To View and Edit Properties for Control Types.
| Note: | Follow the above instructions for the annotations. |
|