Saturday, March 27, 2010

ActiveVOS BPEL Simulation

ActiveVOS Designer also provides simulation facility. This is very useful feature of this IDE. Simulation helps us for unit testing of single BPEL process without invoking other partner services (Those services that are invoked by BPEL).

How can we simulate?
  1. Create BPEL process.
  2. Create Sample files for the request or response for the activities wherever we are expecting input from the out-side of BPEL process. Mostly we needs sample files at the receive activity or for the response of any invoke activity.
  3. Go to Run menu and choose Simulate Process. Press F5 to move step by step or F8 to complete simulation in one shot.
Can we check intermediate data during simulation?

Yes, we can. When we simulate the BPEL process then we can also check current value of any variable at any time. Some times, You may see "value not initialized" as value of any variable. It means simulation is not reached to the point where this particular value supposed to be updated (at first time).

How?
  1. Make sure that you project doesn't have any error (compile time error).
  2. Make sure that Process Variables window is open. If it is not visible then please click on the Windows Menu and then choose show views-> Process Variables.
  3. Start simulation.
  4. Double click on any variable (whose value you want to see).
  5. A new window will open for that particular element in the same window, if it is already not opened.
  6. If it is complex type element expand that variable otherwise you should be able to see its value there only.
  7. If you are not able to see its value in last step, then right click on the variable and choose view data rather then view definition.
  8. If you want to change value of any particular value during simulation then you can double click on that variable or at any particular element, in case of if it is complex. One pop-up box will come out with its current value then you can change its value. It is very useful during unit testing.
PS: Once you complete simulation, then (best practice says) you should click on the Clear Execution State in Run Menu, before starting simulation again.

Friday, March 26, 2010

Bypass wait/any activity at run time - ActiveVOS BPEL

Some time we may need to use wait activity (to wait BPEL process for some specific time) as per business requirement. This waiting time can be in mins, hours, days or even in years. But during testing it is not feasible that you wait for hours, days or months. ActiveVOS BPM allows you to bypass this particular activity.

How?
  1. Login into the activeVOS BPEL Console.
  2. Click on Monitor and then on the Active Processes links. These link will be visible on the left side of the screen.
  3. Select process instance
  4. Go to wait activity (it will be visible as clock). Select this activity.
  5. You can see suspend button on the left of the screen. (Two bold parallel lines in Green-Yellow colour, tool tip message will be Suspend). Click on that. Now suspend button should be disabled and resume button should be enabled (Just in right of suspend button).
  6. Now you should be able to see action list in the upper-right side of lower window. (Now if you still stick to you decision of by passing this activity go to next step otherwise go to 8th point. ... :) )
  7. There should be 3 buttons, first two should be disabled and 3rd one (complete button) should be enabled. Click on this.
  8. Click on the resume button.
Now you can see that process has been by passed that wait activity.

Note:
  • Similarly, you can by pass ANY OTHER activity also.
  • This is working fine for activeVOS BPM 6.2, hope it will also work for other versions.

ActiveVOS Assignment

If your BPEL process is giving some problem in the assignment. Then you need to check that all the assignments are in the proper sequence.
Suppose there is one request (say employeeDetails) expecting employee information in the following sequence (suppose this sequence is defined in the xsd):
  • name
  • age
  • salary
  • company
  • DOB
Suppose you are doing assignment operation in assign activity like this:
  • name
  • salary (age is expected here)
  • age
  • company
  • DOB
PS: this problem will come only if all the above listed elements are defined in the sequence.

Now in assign activity, if you are not following sequence, then you will get run time fault at that assignment.

Solution:
You can select any assignment the click on the up/down button to make proper assignment.

ActiveVOS Designer

In activeVOS designer (7.2 vestion) we can see BPEL process in two different modes. One is classic mode (activeVOS notations) and other one is BPMN (BPMN notations).