Trouble Shooting Wiki

Troubleshooting WS-BPEL

From TroubleshootingWiki

Jump to: navigation, search
WS-BPEL
Official Page
Project Documentation
Download
Source Book
200px-184719270X.jpg
ISBN 978-1-847192-70-7
Publisher Packt Publishing
Author(s) Yuli Vasiliev

The task of building a WS-BPEL application using asynchronous communication may be a challenge. What if your asynchronous application doesn't work as expected and you cannot understand what the problem is?

Let's try to simulate a problem. For example, you might remove the <wsa:ReferenceProperties> element from the async_service.pdd descriptor while creating the PDD Descriptor for the Calling Process. The code to be removed is given below in the listing of async_service.pdd.

<wsa:ReferenceProperties>
<wsa:ReplyTo>
<wsa:ServiceName
xmlns:s="http://localhost:8081/activebpel/
services/async_service.wsdl"
PortName="asyncRequesterServicePort"
>s:asyncRequesterService</wsa:ServiceName>
<wsa:Address>http://localhost:8081/activebpel/
services/asyncRequesterService</wsa:Address>
</wsa:ReplyTo>
</wsa:ReferenceProperties>

Then, re-deploy the sample as discussed in following steps :-

  • In the Navigator view, right-click the asyncSample folder.
  • In the pop-up menu, select New->Other
  • In the first screen of the New Wizard, select the Folder node in the box and click Next.
  • In the next screen of the Wizard, make sure that the Enter or select the parent folder editbox contains asyncSample. If so, enter bpr in the Folder name editbox and click Finish.
  • In the Navigator view, right-click the asyncSample folder.
  • In the pop-up menu, select Export
  • In the Export dialog, make sure that Business Process Archive File under the ActiveBPEL node is selected and click Next.
  • In the Export Business Process Archive dialog, make sure that both the async_service.pdd and async_called_service.pdd nodes within the asyncSample folder are checked on.
  • In the Export Business Process Archive dialog, move on to the BPR file textbox and enter the following into it: C:\ActiveBPEL_Designer\Designer\eclipse\workspace\asyncSample\bpr\asyncSample.bpr.
  • In the Export Business Process Archive dialog, move on to the Deployment group. In the Type combobox, select File. Next, move on to the Deployment location textbox and enter the following into it: C:\ActiveBPEL_Designer\Server\ActiveBPEL_Tomcat\bpr and click Finish.

Now if you open the ActiveBPEL Admin: http://localhost:8081/BpelAdmin, and then click the Deployment Log link in the ActiveBPEL Admin page, you should see the log regarding the preceding deployment, which might look as follows:

06/27/2007 11:15:11:406 [asyncSample.bpr] [async_service.wsdl] Added
resource mapped to location hint: project:/asyncSample/async_service.
wsdl
06/27/2007 11:15:11:406 [asyncSample.bpr] [async_called_service.wsdl]
Added resource mapped to location hint: project:/asyncSample/async_
called_service.wsdl
06/27/2007 11:15:11:453 [asyncSample.bpr] [async_called_service.pdd]
Successfully deployed.
06/27/2007 11:15:11:484 [asyncSample.bpr] [async_service.pdd]
Successfully deployed.

You should have no problem with deployment. However, when you run the SoapClient_asyncSample. php script, it hangs and eventually times out. In this particular case, you know what the problem is the calling process doesn't provide information about where to send a callback anymore and therefore, the called process cannot make a response. However, let's try to figure out the problem using the ActiveBPEL Admin tool installed by the default during the ActiveBPEL engine installation.

First, you should load the ActiveBPEL Admin. The address you enter might look as follows, assuming that you have installed your Tomcat server at http://localhost:8081: http://localhost:8081/BpelAdmin

Once it has been loaded, click the Configuration link. Then, on the Configuration page, set Logging Level to Full and click the Update button.

Assuming you have run the SoapClient_asyncSample.php script, click the Active Processes link in the ActiveBPEL Admin. As a result, you should see the Active Processes page, which might look like the following figure:

Now, on the Active Processes page, if you click the async_called_service link whose state is Faulted, you should see the page shown in the following figure:

As you can see in the figure, the problem occurred during processing the Invoke activity of the async_called_service process.

Now that you know where in the process the problem occurs, you might want to get more detailed information. To do this, you can select the Invoke activity on the Active Process Detail page and then click the View Process Log button that can be found in the panel located at the top-left corner of the page. As a result, the Process Details page should appear, providing the log information that might look as follows:

[15][2007-06-27 14:39:03.734] : Executing [/process]

[15][2007-06-27 14:39:03.734] : Executing [/process/sequence]

[15][2007-06-27 14:39:03.734] : Executing [/process/sequence/receive]

[15][2007-06-27 14:39:03.750] : Completed normally [/process/sequence/receive]

[15][2007-06-27 14:39:03.750] : Executing [/process/sequence/assign]

[15][2007-06-27 14:39:03.750] : Completed normally [/process/sequence/assign]

[15][2007-06-27 14:39:03.750] : Executing [/process/sequence/wait]

[15][2007-06-27 14:39:03.750] Wait : = Wed Jun 27 14:39:08 PDT 2007 [/process/sequence/wait]

[15][2007-06-27 14:39:08.750] : Completed normally [/process/sequence/wait]

[15][2007-06-27 14:39:08.750] : Executing [/process/sequence/invoke]

[15][2007-06-27 14:39:08.765] : Completed with fault: systemError (Error calling invoke: No service name for endpoint reference.) : [/process/sequence/invoke] [f]

[15][2007-06-27 14:39:08.781] : Completed with fault: systemError (...) : [/process/sequence] [f]

[15][2007-06-27 14:39:08.781] : Executing [/process_ImplicitFaultHandler]

[15][2007-06-27 14:39:08.781] : Executing [/process_ImplicitFaultHandler_ImplicitCompensateActivity]

[15][2007-06-27 14:39:08.781] : Completed normally [/process_ImplicitFaultHandler_ImplicitCompensateActivity]

[15][2007-06-27 14:39:08.781] : Completed normally [/process_ImplicitFaultHandler]

[15][2007-06-27 14:39:08.781] : Completed with fault: systemError (...) : [/process] [f]

As you can see in the above log, the Invoke activity failed because of No service name for endpoint reference. To make the sample work again, you should go back to the async_service.pdd deployment descriptor and replace the <wsa:ReferenceProperties> element and then re-deploy the sample as discussed earlier.

Additional References

  • For instructions on Setting Up a Work Environment for ActiveBPEL, click here

Source

The source of this content is Chapter 7: WS-BPEL Process Modeling of SOA and WS-BPEL by Yuli Vasiliev (Packt Publishing, 2007).