WID 6012.9 Business Process How to
WID V6.0.1.2, Interim Fix 009
Table of Contents
How to establish transaction boundaries within a business process
How to generate a business process implementation
How to create a Business Module
How to add a Visual Snippet to a business process
How to setup a Business Process Invoke activity
How to add an activity to a Business Process
How to Configure BPEL activities using the properties view
How to add activities inside a While Loop
How to add a variable-Business Process
How to initialize a variable using the Assign Activity
How to implement an event handler
How to implement a fault handler
How to add Qualities of Service (QoS) qualifiers to a Business Service
Related links
Building Business Processes
Creating a business process
Business processes in a service-oriented world
How to use the business process editor to create a business process component (including path conditions, activities, snippets, etc.)
Related links | |
Business Process Editor example
This is a business process editor window with a completed business process.
Receive activity
A receive activity is an entry point to a process; it is the point where the process starts or continues.
You need one receive activity per operation you define in the process's interface.
In the process editor, you can specify which operation corresponds to which receive activity. That means that when a call is made to one of the process's operations, the corresponding receive activity accepts the call, and the process continues running from there.
A process requires at least one receive activity to start. A receive activity can also occur in the middle of a business process. In this case, if the process encounters a receive activity while it is running, the process stops and waits for the corresponding operation to be called.
Below, you will find out other capabilities of the business process editor. | |
Using the Business Process Editor
Here are some of the functions you can do with the business process editor.l
| How to generate a business process implementation How to establish transaction boundaries within a business process How to create a Business Module How to add a Visual Snippet to a business process How to setup a Business Process Invoke activity How to Configure BPEL activities using the properties view How to add activities inside a While Loop How to add a variable-Business Process How to initialize a variable using the Assign Activity How to implement an event handler How to implement a fault handler How to add Qualities of Service (QoS) qualifiers to a Business Service |
How to establish transaction boundaries within a business process
Related links | |
Business processes execution modes
| A business process runs under one of two execution modes:
|
Transaction Boundaries | Business process developers can declare transaction behavior for invoke, human task, and snippet activities:
|
Setting up a process as long-running
Transaction boundaries are only applicable to long-running processes containing more than one transaction.
To setup a process as long-running, just check the Process is long-running checkbox.
| |
Setting up Human Task transaction behaviour
Set the transaction behaviour choices on the Properties/Server page. | |
Setting up Invoike transaction behaviour
Set the transaction behaviour choices on the Properties/Server page. | |
Setting up Snippet transaction behaviour
Set the transaction behaviour choices on the Properties/Server page. |
How to create a Business Module
Right-click in the Business Integration view and select New > Module | |
Enter a Module Name.
For Module Location, check Use default.
Click Finish. | |
A new module is created. | |
How to add a Visual Snippet to a business process
Related links | Visual snippet editor The building blocks of the visual snippet editor Customizing behavior with visual snippets Unleashing visual snippets and business state machines in your service-oriented application |
This is a Completed Visual Snippet. It will do the following:
The following steps below describe the activities in detail.
| |
1-Create a Visual Snippet
Right-click the Reply activity and select Insert Before > Snippet. | |
2-Empty Visual Snippet
An empty Visual Snippet is created with a default name of Snippet. Change the default snippet name as required.
| |
Select Visual Snippet
Right-click inside the visual snippet editor canvas and select the required visual snippet. | |
Print the input parameter on the Console
| |
Create a New Instance of of a Business Object.
Add the namespace and name of the Business Object to create BO ((Standard...> SCA Services folder)
| |
Return the date and time
|
How to setup a Business Process Invoke activity
Completed Invoke activity | |
1-Add an Invoke activity
Right-click the Reply activity and select Insert Before > Invoke. | |
2-Display interface list
| |
3-Select the Reference Partners Interface
Select the required interface to be invoked and click OK. | |
4-Setup Variables
| |
5-Select Variable names
| |
6-Done!
| |
How to generate a business process implementation
Generated Business Process implementation
WID generates a basic business process implementation that you can modify as required.
For a one way operation, only the Receive activity will be generated. For a two way operation, both Receive and Reply activities will be generated.
As you can see, the related partners (Interfaces and Reference), interfaces and Variables are defined based on the Assembly diagram, the wiring done, and the interfaces defined for each component.
To generate a business process implementation, do the following steps:
| Assembly Diagram Shipping interface (ShippingProcess component) |
Step 1 Generate Business Process implementation
In the Assembly Diagram, right-click the component you want to implement and select Generate Implementation/Process. |
|
Step 2 |
How to add an activity to a Business Process
Business Process activities
There are two ways of adding an activity to a business process:
The following is a list of business process activities: |
|
Add an activity
Right-click in the canvas and select Add > activity...
A new activity will be added and positioned as the last activity. | |
Insert an activity
Right-click an existing activity and select Insert Before > activity...
A new activity will be added and positioned before the selected (right-clicked) activity. | |
How to Configure BPEL activities using the properties view
Related links | Modifying an activity's properties Adding an activity to a business process Business processes in a service-oriented world |
Configure BPEL activities using the properties view
The properties for each activity are all displayed in the properties area of the process editor. The tabs that appear there depend on the activity or element that you have selected.
You can also click on the other tabs (i.e Details, Join Bahavior, Correlation, etc) to review/change their propertied. Below are the details of each tab for the Receive activity.
Note:
Different activities have different properties. | |
Details tab | |
Join Behavious tab | |
Correlation tab | |
Server tab | |
Human Task tab | |
Event Monitor tab |
How to create a While Loop
Add a While Loop activity
Use this activity to repeat one or more activities as long as specific conditions are in place. This is a structured activity in that it contains other activities that are repeated while success criteria that you specify are met. If the condition that leads to the activity evaluates to false, then none of the activities within will be executed. You can specify the success criteria as a condition, or use the condition builder to compose an appropriate course of action.
A While Loop allows you to do something repeatedly until some condition/s occur.
Thus, a While Loop must contain a condition to exit the loop and must contain an activity or a series of activities to make the loop useful.
In the business process editor, right-click on the ShippingTask activity and select Insert Before > While Loop.
A new activity called WhileLoop is added. Rename this activity as required. | |
Create a New Condition
A While Loop condition enables you to continue doing the loop or to exit from the loop.
In the business process editor:
| |
Change the default Condition
The default condition generated by WID returns false which will effectively get you out of the loop: None of the activities you define inside the loop will get done.
In general, you must set the condition initially to true so that the activities that you define inside the While Loop will be done at least once. You should then set the condition to false in one or more of your activities to exit the loop as appropriate.
In the Visual Snippet editor:
| |
The modified Condition
Before entering the While Loop, ensure that the shippingComplete variable is of type Boolean and set to true.
To exit the loop, set the variable to false. Do this in one or more of the activities you will be defining inside the loop. |
How to add activities inside a While Loop
Add Activities by using Add/Insert Before
You can add activities inside a While Loop by right-clicking inside the While Loop activity and selecting either Add > Activities or Insert Before > activities | |
Add Activities by dragging existing activities
You can add activities inside a While Loop by dragging existing activities into the While Loop. For example, you can drag ShippingTask and/or NotifyShipped activities into the While Loop. | |
How to add a variable (Business Process)
Add a Variable
In the Business Process editor, click the Variables V icon . | |
Rename variable
Rename the new variable (Variable) as required (i.e shippingComplete).
Click the Browse button to find and set the Data Type for the new variable. | |
Select Data Type
Select the required Data Type and click OK. | |
Variable added
A new variable, shippingComplete with a Data Type of boolean, has been added. |
How to initialize a variable using the Assign Activity
Add an Assign activity
In the business process editor, right-click on the ShippingTask activity and select Insert Before > Assign.
A new activity called Assign is added. Rename this activity as required (i.e Assign_Initialize). | |
Initialize a variable
Initialize a variable (i.e shippingComplete is a boolean) to false:
|
How to implement an event handler
Related links | Event Handling (Business Process Choreographer Samples) Event Handler (Guided Tour) Business process events Monitoring events Default events for business processes in WebSphere Integration Developer |
Add an Event handler
An event handler can be added to a scope activity only.
In the business process editor, right-click a scope and select Add Event Handler. | |
OnEvent element details
An event handler is created (i.e OnEvent).
In the Details section, click Browse to find Partner. | |
Select a Partner
Select the Partner (i.e Shipping) and click OK. | |
Set Partner details
In the Details section, the Partner and Interface details are automatically populated.
For Operation, click on the drop-down listbox and select an Operation (i.e shipOrder). | |
Assign work to the event handler
Right-click on the event handler (OnEvent) and select the activity you want to use (i.e java Snippet).
This event will be triggered when the shipOrder operation is called. |
How to implement a fault handler
Related links | Fault Handling (Business Process Choreographer Samples) Using a fault handler Error Handler Dealing with faults in your process BPEL fault handling in WebSphere Integration Developer and WebSphere Process Server |
Add Fault handler
A fault handler can be added to a scope or invoke activity.
In the business process editor, right-click either a scope or invoke activity and select Add Fault Handler. | |
Catch element details
A fault (i.e ShippingFault) is created.
Set the following Catch element details as follows:
| |
Select Data Type
Select ShippingFault as the data type and click OK. | |
Catch element details complete
The Catch element details is complete. | |
Add Snippet activity
Under the ShippingFault element (Catch), add a snippet acvity and fill in the details as shown. |
No comments:
Post a Comment