IT Innovation

Build Process-Oriented Applications

Model, implement, and execute a business process for requesting, approving, and applying salary raises.

By Lucas Jellema

May/June 2011

Today’s applications are not necessarily data-centric. Many of today’s sophisticated applications are better described as multifaceted implementations of real-world business processes. These business processes represent sets of logically organized activities spanning multiple IT systems, departments, and roles. Some activities are automated and performed by machines, whereas others are manual and performed by people.

Organizations that adopt a process-driven approach need to have both a methodology and supporting tools to analyze and model business processes in a nontechnical, business-friendly manner. They also need technology for implementing, executing, and monitoring end-to-end processes as well as their individual steps. The combination of Oracle Unified Business Process Management Suite 11g (Oracle Unified BPM Suite 11g) and Oracle SOA Suite 11g provides everything organizations need. The products are based on industry standards and provide “design time at runtime” support to allow for dynamic, business-driven, on-the-fly reconfiguration and restructuring of business processes.

This article demonstrates the design of a very simple business process for requesting, approving or rejecting, and implementing a salary raise, using Oracle Unified BPM Suite 11g in conjunction with other Oracle SOA Suite components. Instead of designing the database and creating a create, read, update, delete (CRUD)–style user interface as a one-size-fits-all approach, this example shows how to implement these requirements by leading with a business process view. Data services support both automated and manual activities, and user interfaces handle specific manual tasks.


To follow along with the example in this article, you will need Oracle JDeveloper 11g Release (Patch Set 2) or later, with the Oracle SOA Composite Editor and Oracle BPM Studio 11g extensions. To deploy and run the application, you will need the Oracle SOA Suite 11g and Oracle Unified BPM Suite 11g runtime environment that also includes Oracle WebLogic Server 11g and Oracle Database 10g Release 2 or higher with the HR sample schema. A quick, easy way to set up the required environment is to use the Oracle VM VirtualBox appliance, along with a preinstalled, preconfigured, ready-to-run BPM and SOA environment. Downloads and installation instructions are available here.

Once the environment is set up, you can find the supporting resource pack for this column here. The starter application for this column, SalaryRaiseBPM.jws, contains a bare-bones SalaryRaiseBPM project, along with a straightforward Model project with an application module that provides the HRService Web service on top of the EMPLOYEES table in the HR schema. This service is developed according to the process described in Steve Muench’s column “Services with a Smile”.

Note that the steps in this article focus primarily on the modeling of business processes with Oracle Unified BPM Suite 11g. The supporting resource pack also contains an Oracle JDeveloper application that shows the end-state project, with full implementations for every process activity.

Analyzing the Business Process

As you work through this article, imagine your role to be that of a business analyst without much technical knowledge of SOA, Web services, or XML. You will model the process for requesting, approving, and applying a salary increase. Your primary focus will be on defining the logical structure and sequence of the process itself, rather than its underlying implementation.

In Oracle JDeveloper, launch the SalaryRaiseBPM.jws starter application. Navigate to the SalaryRaiseBPM project, and open the composite.xml file. The Oracle SOA Composite Editor will appear for this file.

Drag a BPMN Process (BPMN stands for Business Process Modeling Notation) component from the Component Palette and drop it in the Components area of the editor. The BPMN Process wizard appears. Select From Pattern, and select Asynchronous Service as the pattern. Click Next.

On the next screen, specify SalaryRaiseApprovalProcess as the process name. Provide a description, and enter any text for the process definition author.

Next, on the Arguments Definition tab, you can specify what information to make available when the process starts. In this case, specify two data elements: the employee’s ID and the proposed new salary. On the Inputs tab, click + to add a new argument, called employeeIdentifier, of type Int. Click + again to add another Int argument named proposedSalary. On the Outputs tab, create a new Boolean argument named salaryRaiseAwarded and a String argument named comment. Click Finish to create the BPMN process.

Next, double-click the newly created SalaryRaiseApprovalProcess component to open it in a new tab. Click the blue activity icon in the top left corner to create your first business activity. This activity gathers information about the employee in question. Click the flow connecting the Start and End activities. The activity editor appears. Set the name of the new activity to GatherEmployeeFile. Click OK.

The second activity in the process is a human task in which a person decides whether to accept the proposed salary raise. This activity would correspond, for example, to an HR manager’s deciding to approve or reject the requested pay raise. To model it, click the green human task icon. Then click the flow from GatherEmployeeFile to End. The UserTask dialog box appears. Specify the name as Decide on Salary Raise, and click OK.

The Role Properties dialog box automatically appears, prompting you to specify the name of the role that should execute the task. Click New. Enter HRManager as the name of the new role associated with this task. Click OK twice.

Conditional Execution with an Exclusive Gateway

The next step adds some conditional logic to the process. In a later step, you will add an activity to actually trigger a salary increase, but the execution of this activity depends on the outcome of the Decide on Salary Raise task. This conditional execution of activities can be modeled with an exclusive gateway. Click the conditional execution icon (which looks like an x), and then click the flow from the human task to the End activity. Set the name of the gateway to Approval granted switch in the gateway editor. Click OK.

Next, create a new activity called Apply Salary Raise. This activity will execute only when certain conditions are met. After you create the activity, the last step is to model its flows. Click the flow icon. Next click the gateway (the starting point for the flow) and then the Apply Salary Raise activity (the endpoint). After that, create another flow connecting the Apply Salary Raise activity to End.

The logical definition of the complete process is shown in Figure 1. This diagram clearly shows what the steps are, the order in which they will be executed, and the conditional execution of the Apply Salary Raise activity. Note that real-world process models are typically much larger and more complicated—with subprocesses, loops, parallel flows, timers, events, and signals. However, the steps for analyzing, designing, and implementing processes are largely the same, regardless of size and complexity.

o31bpm figure 1

Figure 1: The logical definition of the SalaryRaiseApproval process

Note that you can use Oracle BPM Studio to perform simulations on the business process. By defining average execution times and statistical distributions for each process activity, the number of resources available to execute activities, and the percentages for each conditional flow, you can perform process simulations and analyze their results. The analysis can help you identify bottlenecks and explore ways to optimize processes. These topics are outside the scope of this article.

Specifying the Business Object and Process Data Objects

The next step is to specify the information that is manipulated and produced by the various process activities. Remember that the focus at this stage is still largely nontechnical. The task is simply to define the pieces of information relevant to the business process and not to go into detail about underlying information systems or technical details about how the data is stored.

First, navigate to the BPM Project Navigator (as shown in Figure 2). Right-click Business Catalog, select New, and then select Module to create a new module. Specify Data as the name of the module. Next, right-click the newly created module, select New, and then select Business Object to create a business object called SalaryRaiseRequest. This new business object will describe the pieces of information required in the process. On the SalaryRaiseRequest tab that appears, create the following attributes and specify the types as shown below:

  • employeeIdentifier (Int)
  • proposedNewSalary (Int)
  • employeeName (String)
  • hiredateOfEmployee (Time)
  • currentSalaryForEmployee (Int)
  • jobForEmployee (String)
  • comment (String)

o31bpm figure 2

Figure 2: Adding a module in the BPM Project Navigator

The next step is to create process data objects, the variables of the business process. These objects can be based on standard types or custom business objects such as the just-created SalaryRaiseRequest.

In the BPM Project Navigator, navigate to and select SalaryRaiseApprovalProcess. Go down to the Structure window, right-click Process Data Objects, and select New.

In the dialog box that appears, enter salaryRaiseRequest for the name and click the Browse Types button to select the object type. Select <Component> from the menu, and select the SalaryRaiseRequest object as the object type. Click OK twice to create the object.

Next create a second process data object, called approvalOutcome, of type String. It will hold the outcome from the human task. At this point, select Save All from the File menu to save your work.

Introducing Data Objects into the Business Process

Now that you have defined the data objects, the next step is to describe how the process activities actually work with the data. In the SalaryRaiseApprovalProcess window, double-click the Start activity. Click the Implementation tab, check the Use Associations checkbox, and click the Edit Data Associations icon.

In the Data Associations dialog box that appears, you should see the Start activity on the left having access to the two input arguments of the process (see Figure 3). You want to associate these arguments with the corresponding attributes of the salaryRaiseRequest process data object. In the right panel, expand the data object. Drag the employeeIdentifier attribute to the output field corresponding to the employeeIdentifier output argument. Follow the same steps to associate the proposedNewSalary attribute. Click OK twice to close each dialog box.

o31bpm figure 3

Figure 3: Associating data with process activities

Next, double-click the End activity. Follow the same steps you performed with the Start activity to edit the data associations for this activity. Drag the comment attribute in the salaryRaiseRequest process data object to the input corresponding to the comment input argument. For the salaryRaiseAwarded output argument, type

approvalOutcome == "APPROVE"

in the input field to derive the Boolean value you want to assign to this argument. Click OK twice to close each dialog box.

The process should not execute the Apply Salary Raise activity until approval is granted from within the human task. Apply this logic in the flow from the exclusive gateway to the optional activity. To do so, right-click this flow and select Properties from the menu. On the Properties tab, set Type to Condition. Specify as the condition the same simple expression used before:

approvalOutcome == "APPROVE"

Click OK to close the editor and save your current process.

At this stage, the process is pretty well defined. You’ve defined and described the purpose of each activity. You’ve also specified each data element, and you’ve defined how the data may influence the conditional elements in the process. To an unsuspecting business analyst, it might seem as if you were actually done with this process. Unfortunately, it is clearly not finished. For each activity in the process, you still need to specify what the activity should do and how to implement it.

Implementing the Process Activities

At this point in process development, the business analyst usually starts to hand the process over to a developer to work on the implementation details. Note that two automated process activities are implemented by operations in the HRDataService that will be registered in the Oracle BPM business catalog. The third activity is implemented by a human task component with two possible outcomes: APPROVE and REJECT.

Before implementation of the process modeled above, the first technical step is to deploy the Web service implemented by the HRService application module in the Model project. This Web service requires access to the HR sample schema, so start by ensuring that the HR database connection is valid. Open the Application Resources panel, select Connections and then Database, right-click HR, and select Properties. Configure the HR connection to suit your environment, and click Test Connection to ensure that the database connection is working properly.

Next, deploy the SalaryRaiseBPM application to the Oracle WebLogic Server instance, using the HRServices deployment profile. To do so, select the context menu for the SalaryRaiseBPM project, select Deploy, and select HRServices (see Figure 4). In the Deploy dialog box that appears, select Deploy to Application Server and click Next. Select the target application server (the localhost server, if you are using the preconfigured SOA environment), and click Next. Choose to deploy to selected instances, select the target server for deployment, and click Next. Verify the information on the summary screen, and click Finish.

o31bpm figure 4

Figure 4: Deploying the SalaryRaiseBPM application to Oracle WebLogic Server

Test the successful deployment of the service by opening a Web browser and entering the URL for the service:


(If you are using the preconfigured environment, your URL may look like this: http://localhost:7001/HRDataServices/HRService.)

The Test page for the HRService Web service should appear.

With the Web service deployed, the next step is to inject this Web service into the Oracle BPM application. Click the composite.xml tab in the Editor window, and drag a Web Service reference from the Component Palette to External References. Enter HRDataService as the name for the Web service binding. Set the WSDL URL field to the WSDL URL for the HRService exposed by the application you just deployed (see Figure 5). Click OK.

o31bpm figure 5

Figure 5: Adding a Web service to the application

Because you are creating a BPM application, Oracle JDeveloper will now prompt you to specify which operations from the Web service to add to the business catalog. Adding these operations will make them available as candidate implementations for activities in the business process.

In the Customize Adapter Service dialog box that appears, start by checking the checkboxes for the getEmployeeByKey (for the Gather Employee File activity) and updateSalary (for the implementation of the Apply Salary Raise activity) operations. In the same dialog box, create a new module in the business catalog to group these operations. Click the Browse button, and click the create icon in the Browse Modules dialog box. Enter ExternalServices as the name for the new module, and click OK. Select the newly created module, and click OK.

At this point, the business catalog should be customized to suit your needs. Click OK to add the two selected operations to the business catalog.

Finishing the Application

From here, the supporting resource pack provides detailed instructions on how to further implement the process activities and configure the data associations for them. The resource file contains the Oracle JDeveloper application with the completed application. The final SOA composite application is shown in Figure 6.

o31bpm figure 6

Figure 6: The final SOA composite application

After implementing all process activities (as shown in the end state application), it’s time to deploy the application. Deploying the SalaryRaiseBPM SOA composite application is no different from deploying composite applications that do not contain BPMN Process components. Just select the SalaryRaiseBPM deployment profile option under Deployment from the context menu for the SalaryRaiseBPM project and complete the deployment wizard. When the business process executes, newly created tasks will be assigned to the enterprise group HRManager. You therefore will need to create the HRManager group in the default security realm on the target Oracle WebLogic Server instance. Make the Oracle WebLogic Server user a member of this group.

Running and Monitoring the SalaryRaiseApproval Process

Once deployment is done, it is time to eat dessert. Open the Oracle Enterprise Manager console, typically at http://{hostname}:7001/em. Open the dashboard page for the SalaryRaiseBPM composite application you just deployed. Click Test to bring up the Test Web Service page.

Enter values for the employee identifier (for example, use 102 for Lex De Haan) and the proposed new salary. Click Test Web Service.

Because the Web service is asynchronous, you will not receive a response. The test framework will report that the service has been invoked and will offer an option to open the message flow trace, an audit trail for the composite instance that is instantiated by invocation of the service exposed by SalaryRaiseApprovalProcess. It should show that the first HRDataService invocation—the implementation of the GatherEmployeeFile process activity—has successfully completed. The DecideOnSalaryRaise human workflow component should be running, indicating that a task has been assigned but not completed.

Business analysts and operational managers can monitor the progress of business processes by using the Business Process Workspace application, typically available at http://{hostname}:{port}/bpm/workspace/.

In the running process just started, the Decide on Salary Raise task has been created and assigned to the HRManager group. Because the Oracle WebLogic Server user is a member of that group, he can act on this task. The Actions menu for this task includes the two final outcome values of the task: Approve and Reject. Figure 7 shows the case in which the user decides to approve the salary raise request.

o31bpm figure 7

Figure 7: Approving the salary raise request

After processing the approval, the Business Process Workspace application informs the user that it has successfully processed the action. The task then disappears from the My Tasks list for the Oracle WebLogic Server user, because the task is now complete.

The Business Process Workspace application also provides insight into completed process instances. On the Process Tracking tab, the Oracle WebLogic Server user can find the instance of SalaryRaiseApprovalProcess he just participated in.

Figure 8 provides a visual overview of a completed process instance. The Process Tracking view clearly shows which conditional path each completed instance took, and it indicates the current status of all currently executing process instances.

o31bpm figure 8

Figure 8: Viewing a completed process instance

In this example, if you were to check the value of the Salary column in HR’s Employees table for Employee 102, you would find that execution of the Apply Salary Raise process step updates the salary to 9700.

Business-Process-Oriented Architecture

This article has shown that the business-oriented way of describing a process in Oracle BPM Studio works hand in glove with the more technical approach used by Oracle SOA Suite. Together, these tools helped you deliver a running SalaryRaiseApprovalProcess without coding and—more importantly—with a business process focus from start to finish. The process can be triggered, executed, and monitored from browser-based Web interfaces. Another browser-based application called BPM Composer (accessible at http://{hostname}:{port}/bpm/composer) can provide insight into BPM process definitions and enable business analysts to document and edit these definitions online.

Oracle Unified BPM Suite 11g enables organizations to rethink the way IT supports the business, by focusing on modeling business processes that span roles, departments, and enterprise resources. Analyzing and modeling these processes with BPMN can lead to a seamless implementation of process activities through services and human tasks. Execution of process instances is centrally coordinated and monitored—allowing for real-time insight into exceptions and bottlenecks as well as on-the-fly intervention and adjustments within the process flow.

Next Steps

READ more about
 Oracle Unified BPM Suite 11g
 Oracle Fusion Middleware 11g Release 1

 starter project for this article
 completed project for this article


Photography bySebastian Kanczok,Unsplash