Oracle WebLogic Integration extends the Oracle Workshop for WebLogic graphical design environment to allow the building of integrated enterprise applications. A WLI application in turn contains projects and files. A project can contain several components including, business processes, controls, Web services, and XML files.
This section describes the components of a WLI application, the steps you follow to create an application in Oracle Workshop for WebLogic, and how to incorporate a business process in your application. It includes the following topics:
This section outlines some of the high-level components you create as you build your business process application and how they appear in the deployed application based on the names that you choose for these components.
Application—The components of the application you are creating are represented in a tree structure on the Package Explorer pane in your Oracle Workshop for WebLogic environment. If the Package Explorer pane is not visible in Oracle Workshop for WebLogic, choose Window > Show View > Other > Java > Package Explorer from the Oracle Workshop for WebLogic menu. An example of Package Explorer pane is shown in Figure 2-1.
Figure 2-1 Sample Package Explorer
A WLI application will have the following projects (For example, the preceding figure represents an application named Tutorial_Process_Application and includes an Enterprise Application Project, Web Project, and Utility Project):
Enterprise Application (EAR) Project— A project that contains JAR files and deployment descriptors build files and auto-generated files. J2EE Applications and their components are deployed on the Oracle WebLogic Server as EAR files.
Utility Project— An optional project that contains the XML Schemas and the Message Broker channel file. When you create your process application through the wizard or using a template, the Utility project is created as part of the business process application folder .The Utility Project has a schemas folder in it. When you add XML Schemas and MFL files to the schemas folder in your business process project, they are compiled to generate XML Beans. In this way, Oracle Workshop for WebLogic generates a set of interfaces that represent aspects of your XML Schemas. XML Bean types correspond to types in the XML Schema itself. XML Beans provides Java counterparts for all built-in Schema types, and generates Java counterparts for any derived types in your Schema.
Web Project—A project that contains the Oracle WebLogic Server Web applications. In other words, when you create a project, you are creating a Web application. The name of your project "Tutorial_Process_Application_Web” which in turn contains a business process named RequestQuote.java. Clients can access your business process via the following URL:
In the preceding URL, host and port represent the name of your host server and the listening port.
When a project is created, various information is assembled to specify the type of project, add standard libraries, set compiler options, control publishing tasks, set build path, and/or add an annotation processor. This information is specified by choosing facets during project creation. Facets can also be added and deleted from a project after its initial creation. To edit a project facets, select Project > Properties > Project Facets. For the business process (Process.java) and Worklist application, the Project facets has already been configured.
Note:
A process can be created only in a WEB project which has Oracle WebLogic Integration Process facet (process-enabled) added to it. Similarly a Worklist task plan can be created in an EAR project which has Worklist Integration Worklist Application Module facet (worklist-enabled) added to it.
Schemas folder exported as a jar needs to be added to a Web Project or a Util project and not to an EAR project. Due to Eclipse and WTP restrictions, schema, channel builders, and controls are associated only with Web or Util project and not with EAR project. If you export or add the Schemas folder as a jar, into the module dependencies of the EAR project, the channel files will not be declared and the controls of the business process will not be availabe in the Data Palette.
Designing Your Application
You build your application in Oracle Workshop for WebLogic by adding projects to an application. A project contains components of your application such as business processes, Web services, control files, and XML files.
Creating a Business Process Application
To quickly get started designing business processes, you can create an application that contains a basic business process file, which you can customize with your business process logic. To do so, complete the following procedure:
To Create a New Application
From the Oracle Workshop for WebLogic menu, click File > New > Other....
The Select a wizard dialog box is displayed.
Expand WebLogic Integration and select Process Application and click Next.
In the Process Application dialog box, type the details as shown in the following example:
In the EAR Project Name field, enter Process_Application_EAR.
In the Web Project Name field, enter Process_Application_Web.
In the Utility Project Name field, enter Process_Application_Utility.
Select Add WebLogic Integration System and Control Schemas in Utility Project check box.
This adds the system schemas to the Utility Project/schemas folder.
Click Finish.
This creates an application that contains a basic business process project, which includes a business process file that contains only a Start and Finish node (process.java).
Note:
If you select Tutorial: Process Application instead of Process Application, Oracle Workshop for WebLogic creates an application containing components for the Business Process. To learn about taking the tutorial, see Tutorial: Building Your First Business Process.You can also build an ebXML or RosettaNet participant business process in Oracle Workshop for WebLogic by using specially created templates. For more information about how to create these participant processes, see
Building ebXML Participant Business Processes and Building RosettaNet Participant Business Processes.
In the displayed Open Associated Perspective? dialog box, click Yes to switch from J2EE Perspective to Process Perspective.
Note:
The Open Associated Perspective? dialog box appears when creating a Business Process for the first time in a Workspace.
The Process Application is created and displayed in the Package Explorer pane, as shown in Figure 2-2.
Figure 2-2 Package Explorer
The Tutorial:Getting Started with Workshop briefly describes the components and tools you use to design your business process in the Oracle Workshop for WebLogic graphical design environment.
Subsequent topics in this guide describe in detail how to design specific business process patterns, including tasks such as:
Adding methods and callbacks to client nodes in your business process to create the interface between your business process and its clients.
Adding controls to represent the interfaces with resources such as Web services, databases, and EJBs.
Mapping disparate data types in your business process, using XML Schemas, and constructing sequences of XML elements over which your business process can iterate to perform specified activities.
Viewing and editing the Process.java file in the Source view.
There are several properties which you can view and configure for your business process in the JPD Configuration pane.
To Set the Business Process Properties
Select the Start node of the business process for which you want to configure the properties.
If the JPD Configurationpane is not visible in Oracle Workshop for WebLogic, choose Window > Show View > Other > General > JPD Configuration from the Oracle Workshop for WebLogic menu bar.
Note:
The default Process view displays only the Properties pane. The JPD Configuration view and the Properties pane can not be used together in the Process perspective.
Note:
To modify values in the JPD Configuration pane, you need to first close the Properties pane and then open the JPD Configuration pane and reload the JPD. To return to the Properties pane, close the JPD Configuration pane, open the Properties pane and reload the JPD.
In the JPD Configuration pane the following properties are displayed:
generaland
process
.
general
name—This is the name of your business process, which is displayed throughout the Oracle Workshop for WebLogic application, including the Oracle WebLogic Integration Administration Console. You can change the name to anything you would like by clicking this property and entering a new name.
notes—Enter any notes that you want associated with your business process by clicking notes and then clicking to open the Notes dialog box. Enter your note and click OK. Notes entered in the editor will be also be displayed in the Oracle WebLogic Integration Administration Console.
process
freeze on failure—When a business process fails and there is no exception handler configured to handle the exception thrown, the business process is placed into an aborted state and no recovery is possible. However, if the business process is configured to freeze on failure, the business process rolls back to the last commit point and the state is persisted if it fails. The process can then be restarted from the Oracle WebLogic Integration Administration Console. To configure a business process to freeze on failure: select true from the freeze on failure drop-down menu.
For more information about business process exception handlers, see
Handling Exceptions. For more information about how to unfreeze business processes in the Oracle WebLogic Integration Administration Console, see Process Instance Monitoringin Using the Oracle WebLogic Integration Administration Console.
on sync failure—This property only applies to your process if it is configured to be a synchronous subprocess, it is ignored for any other business processes. If a synchronous subprocess fails, the default behavior is to mark it as rollback, which causes both the subprocess and the parent process to rollback. However, if the on sync failure property is set to rethrow, only the subprocess is rolled back. To learn more about synchronous subprocesses and the on sync failure property, see
Working with Subprocesses.
persistence—This property sets how a stateful business process is persisted. More specifically, it determines whether a conversation is maintained in memory or stored in a database repository. Normally, stateful processes are persisted to a database. However, you may want to use non-persistent stateful processes for the following:
When the native communication mechanism requires it.
When multiple send-receive operations need to be done in parallel.
When the performance of a stateful process using a database does not meet performance goals.
To set the type of persistence, from the persistent drop-down menu:
Select always when you want your process conversations saved in the database repository. These conversations can be recovered in the event of an abnormal shutdown or crash. This setting is the Oracle WebLogic Integration default.
Select never when you do not want your process conversations saved in the database repository. These conversations cannot be recovered in the event of an abnormal shutdown or crash.
Select on overflow when you want your process conversations saved in the database repository after reaching a certain number. Until this number is reached, conversations are non-persistent. To set the overflow, set the Max Beans in Cache deployment descriptor. To learn more about configuring deployment descriptors, see EJB->Configuration->Descriptors in the Oracle WebLogic Server Administration Console Online Help.
retry count—Specify how many times, after the first attempt, the process engine should try to execute the business process.
If your business process contains an asynchronous Client Request node or multiple Client Request nodes, any one of which is asynchronous, then you can set the retry count for the business process. You cannot set the retry count property for business processes that contain only synchronous Client Request nodes (that is, Client Request with Return nodes).
retry delay—Specify the amount of time (in seconds) you want to pass before a retry is attempted.
If your business process contains an asynchronous Client Request node or multiple Client Request nodes, any one of which is asynchronous, then you can set the retry delay for the business process. You cannot set the retry delay property for business processes that contain only synchronous Client Request nodes (that is, Client Request with Return nodes).
stateless—This property is for viewing only, it cannot be edited. It displays whether your business process is stateless (property displays true) or stateful (property displays false). To learn more about stateless and stateful business processes, see
Building Stateless and Stateful Business Processes.
Setting the Business Process Annotations
There are several properties which you can view and configure for your business process in the Properties pane of your business process start node.
To Set the Business Process Annotations
Select the Start node of the business process for which you want to configure the annotations.
If the Properties pane is not visible in Oracle Workshop for WebLogic, choose Window > Show View > Properties from the Oracle Workshop for WebLogic menu bar.
In the Properties pane, the following annotation are displayed:
BeanInfo
customizerclass— This annotation defines which bean properties are public, and which getter/setter methods should be used to access them. This class must reside in the same package and be similarly named to the tag (or bean) with BeanInfo appended to it.
ClassReliable
messageTimeToLive— This annotation specifies how long messages are maintained on the server, in order to detect duplicate messages.
value— This annotation specifies the one or more schema files whose types are referenced in the component class. This annotation can be added to the Process or Service Broker Control. Multiple name value entries are defined and each entry refers to one definition of a schema.
Stateful
maxAge— This annotation specifies the amount of time elapsed since a stateful process started, the conversation may remain active before it is ended by the Oracle WebLogic Server.
maxIdleTime— This annotation specifies the amount of time a stateful process remains idle before it is ended by the Oracle WebLogic Server.
runAsStartUser— This annotation specifies that the continue and finish methods will be run as the user who started the conversation.
singlePrincipal— This annotation specifies that only the principal who started the conversation can continue and finish the conversation.
TargetNamespace
value— This annotation specifies the XML namespace used for outgoing XML messages and generated WSDL files.
Version
Strategy—This describes how to invoke sub processes when differerent versions of the parent process exists. From the strategy drop-down menu:
Select loosely-coupled if you want the subprocess version to be set at the time the subprocess is invoked.
Select tightly-coupled if you want the subprocess version to be set at the time the parent process is invoked.
WSSecurityCallback
file— This annotation specifies the location of the WS-Security file.
WSSecurityService
file— This annotation specifies the path to the WS-Security policy file (WSSE file) used by the web service.
Wsdl
value— This annotation specifies a WSDL file that is implemented by a web service.
XmlNamespaces
Value— This annotation provide the namespace value and prefix value.
Com.bea.wli.common.XQuery
Prolog—This specifies the namespace and function declaration.
Version—Thisspecifies the XQuery version used in the Process file for inline XQueries.
Com.bea.wli.jpd.Process
binding—This property specifies whether the business process uses the Web service, ebXML, or RosettaNet protocol. The default value is webservice. If your business process is an ebXML or a RosettaNet process, select ebxml or rosettanet.
name— This is the name of you process.
process— This is a read-only annotation and displays the content of the process annotation.
WS-Security policy (WSSE) files are not supported for business processes (JPDs). Therefore, the following annotations are not supported for JPD files: com.bea.wli.common.WSSecurityCallback and com.bea.wli.common.WSSecurityService.
Note:
If you want to use WS-Security, then you must front-end the JPD with a JWS. The client would invoke a JWS using WS-Security, then the JWS would locally invoke the JPD via a Process Control.