This blog is explaining some features about debugging Oracle SOA Suite 12c from another perspective.
Data perspectives
When you are debugging a composite and run at a particular breakpoint you probably wants to see you data from different data perspectives:- The message which was send to you service endpoint.
- The message which was send to a particular composite component.
- The global variables inside a BPEL component.
- The local variables inside a BPEL scope.
- The message which was send to an external reference.
Did you notice the normalizedRequestMessage above? Is this the normalized message which is send between service engines? It seems to me so.
The data shown in the Data tab is related to the components you have within you composite and at which point you are in the debugging process. This last point is very important and explained later on. For now you should know that the available data perspectives are related to the point you are in the code.
The debugger builds up a simple Stack which is shown in the Stack frame as part of the Structure Window. The general purpose of this Stack is to show the available data perspectives. They are presented in reverse order. Below you can find an example of this (_client_ep was the initial call).
When clicking on a particular row in the Stack frame, the Data tab is updated accordingly and the corresponding Data perspective is shown.
You should know that it isn't a complete instance flow trace! For example, when you leave a particular BPEL component only the data available at that point can be viewed, so the BPEL variables are gone. The same is true for BPEL scopes, etc.
As stated before: The Stack frame is only showing the data perspectives which are available at a particular point in the debug (walking through) process in reverse order.
When you want the complete picture (of the whole data flow) you should go to the Enterprise Manager and look at the instance flow trace.
When you read the debugging documentation you already are familiar with changing data during the debug process. But something seems not yet implemented. Please read further to know what.
Data Watches
Every debugging solution should provide the ability to update variables, and JDeveloper does so.You can update messages which are sent between service components and update variables within BPEL. Below you can find an example of the BPEL Global Variables Data perspective.
When expanding a particular variable you are able to drill down to the data inside it. It's all XML bases and you can choose between a tabular or a tree view. The look and feel of the tree view is more intuitive.
One of the nice features is that this data can be changed!!!
This can be very useful because you are able to change the data in case it isn't having the expected value (caused by a bug in the previously executed code).
By double clicking on an element the Modify Value modal window is given as shown below.
Only data elements could be changed, not reference elements (for example a reference to binary data). You should be aware of putting in data of the correct type to be sure not to run into unexpected behaviour.
So far nothing new, but do you have noticed the Smart Data and Watches tabs on both sides of the Data tab? And there are more...
All Debugger Tabs can be made available using Window->Debugger as shown here:
- Deployment - Log: Showing the startup of the debugger and connection to the to-be debugged process. Here you can check if debugger is started correctly and is attached to the project.
- Breakpoints: Giving a overview of set breakpoints.
- Smart Data: Don't know what this is. Documentation isn't saying anything about it.
- Data: The data as explained in this blog post.
- Watches: To show the watched messages and variables.
- Classes: I think this is only used for Java debugging.
- Threads: Showing the debugging threads. Usually you will put this as part of the Structure Window.
- Stack: Already talked about in this blog post. Usually you will put this as part of the Structure Window.
The documentation doesn't tell anything about it and when I try to create a Watch for a particular variable, I run into lots of errors.
You create a Watch from the Data tab by right-click a particular variable or message. This variable or message is show in the same way it is shown in the Data tab. But it is very buggy and you sometimes get the following strange watches (notice the ? between the two input variables):
I also was able to add the same watches more than ones and I was not sometimes not able to remove created watches.
You even can't save watches. I tried to find files in my project directory and haven't found one dealing with this information. So, when you restart JDeveloper or your debugger: all watches are gone!
On the other hand, breakpoints are saved locally but are saved within internal configuration files of JDeveloper.
It should be a nice feature when these configuration files (watches and breakpoints) are standardized and made available within JDeveloper itself. Then we have the possibility to define a good debug set with breakpoints and watches which we can reuse every time we made a change.
My conclusion about watches is that it isn't usable at this moment (first 12c release). The Data tab is doing the job well because of its context awareness (as explained in this blog).
The last thing I tried was the Inspect feature. Inspecting is nothing more than creating a special kind of watch in a separate modal window. You create a Inspect by right clicking on a variable or message.
This window looks like this:
Because it is a modal window it is always shown on top op JDeveloper anywhere you like. Can also be a on a second monitor.
For now here ends my dive into debugging with Oracle SOA Suite 12c. Next post will focus on other new 12c features.
No comments:
Post a Comment