There are three critical steps in management of a business process: design, execution, and monitoring (see Figure 34.6). Figure 34.6. Stages in Business Process Management.
Process DesignIn the design phase of Business Process Management, the business process is conceptualized and designed using graphical tools such as Studio. The Studio tool helps to graphically describe a process, its inputs, and outputs. Using WebLogic Integration Studio, a process designer can put together a business process without knowing the underlying technical implementations . The designer identifies the process flow using entities called nodes . These nodes are steps in a business, which may represent a decision point or an end of the process. The nodes available in the BPM design tool, Studio, include the following:
Using nodes, a business process is designed and saved as a template definition as part of a template in an associated data store (Oracle, SQL Server, and so on) of the process engine. A template is equivalent to a business process. Just as a business process evolves as business requirements change, a template allows multiple template definitions. This template definition can be re-used and modified for other business processes. In the next phase of Business Process Management, the process engine executes an instance of the designed template definition. Process ExecutionIn the execution phase, XML is used for data representation, and JMS is used for messaging between workflows and/or other back-end applications (AI is the recommended way to connect to the back-end applications). A business process execution can be triggered in various ways, as illustrated in Figure 34.2. Typically, multiple instances of a business process are executing at a given time. In the integration sample, the E2E_OrderWorkflow executes when an XML message appears on a configured event queue. Process MonitoringOngoing monitoring is very important in Business Process Management. Monitoring may be extremely useful when statistical data is collected in real-time. Users can modify running workflows if needed. This monitoring can be done using Studio. In the integration sample described earlier, the E2E_OrderWorkflow simply receives the XML message, takes the data sent, and persists that data into back-end tables. The Studio tool can be used to monitor the scenario. You can monitor the E2E_OrderWorkflow by first starting the server; to do so, run the <WL_HOME>/weblogic700/samples/platform/e2eDomain/starte2e.bat script. After the server is up, log in as Rachel Adams on the B2C portal and add items to the shopping cart. Then proceed to Step 3, as shown in Figure 34.7. When you click the Submit Order button, an XML representation of the order is placed on a JMS queue, triggering a workflow. Figure 34.7. WebLogic Platform sample application B2C portal.
This workflow can be monitored using Studio. Figure 34.8 shows the XML order received in the workflow. Studio can also be used to change the running workflow without necessarily interrupting it. Figure 34.8. Monitoring workflow using Studio.
HelloWorld Workflow: A Workflow Which Triggers on an XML EventIn our first example, the workflow triggers on an XML event (see the properties of the start node in Figure 34.9). Many workflows can consume the messages placed on the default JMS queue. You can specify a root element for each workflow in the Start Properties dialog box to distinguish between messages it is interested in. In the HelloWorld workflow, the helloworld root element is specified. A driver in the sample source ( MyQueueSender.java ) sends an XML message to the default queue ( com.bea.wlpi.bpm.event ), as shown in the following code: Figure 34.9. Properties of the start node in the HelloWorld workflow.
<?xml version="1.0" encoding="UTF-8" ?> <helloworld> </helloworld> When the XML message is sent to the JMS queue, the workflow is triggered and completes execution. You can use Studio to see that the workflow started and completed (see Figure 34.10). Figure 34.10. Monitoring the HelloWorld workflow.
You can run Example1 as follows :
|