Cool! Since BPM 11g PS4FP you can import Oracle Workflow models in BPM 11g. From PS5 (11.1.1.6) it should be possible as well. See this whitepaper.
I'm going to try.
Wednesday, 16 May 2012
Monday, 14 May 2012
Using JDeveloper HTTP Analyser to intercept/forward requests
In my previous entry I showed how to create a SoapUI test case to do a WS-Adressing driven request-response interaction with an asynchronous BPEL Process. But how does this WS-Adressing request look like?
To get this above the water a tool like the HTTP Analyser of JDeveloper 11g may come in handy.
It is found in the tools option of JDeveloper:
This opens the HTTP Analyser normally at the bottom of the screen:
To use it for our purpose we have to create a HTTP-listener with a forwarding rule. This means that it just listens to request and forwards the request to a URL we provide.
To do this I added a new listener with a new port 8100:
Then click on the "Configure Rules" button, add a forward rule (click on the dropdown triangle of the Add button and choose Forward Rule):
In the reference URL part in the screen above you can put a URL that is used to test the URL Filter.
But after playing around I just left this URL Filter field.
In the Target URL I put the complete URL of the original endpoint of the WSDL from SoapUI, found in the Test Request step in SoapUI. But this one I've replaced by adding a new endpoint:
The added endpoint will have the original URL but with the hostname:port replaced to localhost:8100 (where the HTTP Analyser is listening):
Thus:
http://localhost:8100/soa-infra/services/default/M10HelloWorld/helloworld_client_epThen you can run the HTTP Analyser:
I've copied and pasted the message from the screendump into a new XML Document in JDeveloper and reformated it:
<?xml version="1.0" encoding="windows-1252" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:hel="http://xmlns.oracle.com/M10_Demo/M10HelloWorld/HelloWorld">
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Action soapenv:mustUnderstand="1">process</wsa:Action>
<wsa:ReplyTo soapenv:mustUnderstand="1">
<wsa:Address>http://hostname.darwin-it.nl:8989/HelloWorldCallbackBinding/processResponse</wsa:Address>
</wsa:ReplyTo>
<wsa:MessageID soapenv:mustUnderstand="1">uuid:36f10438-0270-4318-a5a5-fd2ad44d6136</wsa:MessageID>
</soapenv:Header>
<soapenv:Body>
<hel:process>
<hel:input>Astrid</hel:input>
</hel:process>
</soapenv:Body>
</soapenv:Envelope>
Here you can see the properties set in SoapUI (see previous blog in the WSA-header:
- Action - mustUnderstand="1"
- Action (defaulted): process
- ReplyTo - Address: http://hostname.darwin-it.nl:8989/HelloWorldCallbackBinding/processResponse
- MessageID (generated): uuid:36f10438-0270-4318-a5a5-fd2ad44d6136
A substitute rule will look like:
With this each request to localhost:8100 is forwarded to hostname.darwin-it.nl:8001.
Testing of Asynchronous BPEL Processes with SoapUI made simple
Recently I wrote some blog-entries about scripting in SoapUI. Now I had to help my current customer to test Asynchrounous BPEL processes using SoapUI.
Now calling a BPEL Process (in Oracle SOASuite 11g) from SoapUI is very easy. And if it is a synchronous process then you'll get the response right away.
But if the BPEL process is Asynchronous then the response is seperated from the request. In fact technically an asynchrounous webservice call that is implemented by a BPEL process are two complementary one-way requests.
The client calls the bpel process but let then listens to the response of the bpel service. The BPEL service calls then the client with the response.
The glue between the two is WS-Addressing. This standard enables the client to put in a little piece of xml in the request-message with information on:
To read more you can find a tutorial on OTN. However, unfortunately the pictures don't correspond to the text, so I found it a bit hard to read. Therefor I made a HelloWorld setup myself. I might extend it in next blogs, if my further experiences are worthy to share (and time let me).
Then name the BPEL process HelloWorld and make sure you base it on the asynchronous BPEL process template.
Then add an assign, drag the Expression Builder Icon (most left "fx" icon in the row of icons top right) on the result node of the output variable. Then add the line
to the expression:
then the Assign will look like:
resulting in the following bpel process.
This process can be deployed and run on enterprise manager resulting in the following audit-trail with request message.
Now start SoapUI and create a new project based on the wsdl of the deployed bpel process:
This creates a request message that can be used. to call the BPEL process:
As I explained above, the client (our SoapUI setup) will call the BPEL process, and as a result the BPEL process will call back our SoapUI client. This means that we need to create a Test Suite with a Test case with two steps:
(I obfuscated/blurred my hostname since it is a machine at my customer in this example).
With this name you can add a Mock Response step to the testcase:
This will ask you to set the operation to mock. Make sure to set the interface to the HelloWorldCallBackBinding, and the operation to processResponse.
In the port set a free listen port, for example 8989, and the path to "/HelloWorldCallbackBinding/processResponse":
(first set the interface, then the operation above will automatically set to the only one in that interface/binding).
For the path I choose to concatenate the binding-name with the operation-name from the WSDL. These two entries are important since they will make-up the end-point that is mentioned to the BPEL process in the WS-Addressing node as the address it should call to send the response back.
You might need to resize the window and drag the splitter between the request and response message panel to the right to see the tab at the bottom of the request pane.
Now you'll see the following tab/panel:
In this tab (see above) edit the following properties:
But how would the message adapted with the WS-Addressing node look like? Well that can be investigated using the HTTP Analyser in JDeveloper. Let me demo that in a next blog.
The glue between the two is WS-Addressing. This standard enables the client to put in a little piece of xml in the request-message with information on:
- the address of the endpoint to call to deliver the response message
- the message id to correlate the response message to the request message
To read more you can find a tutorial on OTN. However, unfortunately the pictures don't correspond to the text, so I found it a bit hard to read. Therefor I made a HelloWorld setup myself. I might extend it in next blogs, if my further experiences are worthy to share (and time let me).
Create a Asynchronous BPEL Process
First, let us create a HelloWorld project. For those that are new to SOASuite 11g: in JDeveloper create a SOAApplication with a SOAProject based on a BPEL process:Then name the BPEL process HelloWorld and make sure you base it on the asynchronous BPEL process template.
Then add an assign, drag the Expression Builder Icon (most left "fx" icon in the row of icons top right) on the result node of the output variable. Then add the line
concat("Hello ", bpws:getVariableData('inputVariable','payload','/client:process/client:input'))
to the expression:
then the Assign will look like:
resulting in the following bpel process.
This process can be deployed and run on enterprise manager resulting in the following audit-trail with request message.
Now start SoapUI and create a new project based on the wsdl of the deployed bpel process:
This creates a request message that can be used. to call the BPEL process:
Create a SoapUI Project
As I explained above, the client (our SoapUI setup) will call the BPEL process, and as a result the BPEL process will call back our SoapUI client. This means that we need to create a Test Suite with a Test case with two steps:
- Test Request
- Mock Service
Create a Test Request
So, in SoapUI create a 'Test Suite' with a 'Test Case' in it. Then the request created/generated above can be dragged and dropped into the Test Case. That will create a initiating Test Request:Create a Mock response
Now, at this point, you'll need the host name or ip-address of your SoapUI running computer. If your SoaSuite is running on the same machine as SoapUI then you could use localhost. But if it is on another server (being the host of your development or test environment) than localhost won't do of course. Since most development machines use DHCP to get an ip-address automatically this might change. So get the host name of your machine at the System Properties:(I obfuscated/blurred my hostname since it is a machine at my customer in this example).
With this name you can add a Mock Response step to the testcase:
This will ask you to set the operation to mock. Make sure to set the interface to the HelloWorldCallBackBinding, and the operation to processResponse.
In the port set a free listen port, for example 8989, and the path to "/HelloWorldCallbackBinding/processResponse":
(first set the interface, then the operation above will automatically set to the only one in that interface/binding).
For the path I choose to concatenate the binding-name with the operation-name from the WSDL. These two entries are important since they will make-up the end-point that is mentioned to the BPEL process in the WS-Addressing node as the address it should call to send the response back.
Edit the WS-Addressing properties of the Test Request
Now it's time to edit the WS-Addressing properties of the Test Request. So open the test request step editor. Then click on the WS-Adressing tab at the bottom of the request message:Now you'll see the following tab/panel:
In this tab (see above) edit the following properties:
- Check the "Enable/Disable WS-A addressing" check box
- Set the poplist "Must Understand" to true
- Check the "Add default WS-A:action" check box
- In the Reply to field put in the addres:
http://<name of your SoapUI client host>:8989/HelloWorldCallbackBinding/processResponse
Test the Test Case
Now this is in fact al there is to do to get it working. You run the test case and the response message will appear in the response pane of the Mock Response test step:Conclusion
As simple as that. Now you can expand your test with assertions and adhoc interactions with your BPEL process or call another with the output of this one. Also it might be handy to use the scripts in my former blogs to write the response to a file in a folder on the file system.But how would the message adapted with the WS-Addressing node look like? Well that can be investigated using the HTTP Analyser in JDeveloper. Let me demo that in a next blog.
Wednesday, 9 May 2012
SOA Infra starting problems
I'm helping my new customer in migrating an Oracle Forms application to a new 11g databased environment.
Since the application is using Oracle Workflow the transition includes replacing Workflow with BPEL11g.
So a SoaSuite installation is needed. The installation of the development server is done on a virtual (VMware ESX) Windows 2008 server.
Installing Weblogic and SoaSuite and configuring the domain is pretty straighforward.
However at starting the server the SOAInfra won't come up. After a while we encountered the following exception in the soa_server.out log:
<26-apr-2012 15:50:34 uur CEST> <Error> <org.springframework.web.context.ContextLoader> <BEA-000000> <Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SensorManager' defined in ServletContext resource [/WEB-INF/fabric-config-core.xml]: Cannot resolve reference to bean 'FabricMesh' while setting bean property 'fabricMesh'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FabricMesh': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FabricMeshTarget' defined in ServletContext resource [/WEB-INF/fabric-config.xml]: Cannot resolve reference to bean 'SpringServiceEngine' while setting bean property 'serviceEngines' with key [6]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [oracle.integration.platform.blocks.java.SpringServiceEngine] for bean with name 'SpringServiceEngine' defined in ServletContext resource [/WEB-INF/fabric-config.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: weblogic/sca/api/ScaReferenceProcessor
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
...
Apparently this is caused by a class not found: "java.lang.NoClassDefFoundError: weblogic/sca/api/ScaReferenceProcessor".
We (the administrator Gerrit and me) searched around the forums and eventually found that this was caused by a missing com.oracle.weblogic.sca.engine.jar in the weblogic classpath.
From there the solution is quite simple. The jar file is found in the modules folder in the COMMON_COMPONENTS_HOME, eg. in our case "D:\oracle\product\11.1.1\fmw\oracle_common\modules". But apparently in the domain configuration this is missed to be added to the class path in the setDomainEnv.cmd file.
So edit this file (setDomainEnv.cmd), which is found in DOMAIN_HOME/bin, in our case: "E:\oracle\admin\domains\soa_domain\bin\setDomainEnv.cmd".
At the top of that file you'll find the setting:
set COMMON_COMPONENTS_HOME=D:\oracle\product\11.1.1\fmw\oracle_commonThis variable can be used to add the jar file to the classpath. So search in the file to the lines that build up the POST_CLASSPATH variable and add the following line:
set POST_CLASSPATH=%COMMON_COMPONENTS_HOME%\modules\com.oracle.weblogic.sca.engine.jar;%POST_CLASSPATH%Then (in our case) the SOA_Infra should be able to start. In file E:\oracle\admin\domains\soa_domain\bin\setDomainEnv.cmd By the way, our SOASuite environment was a 11.1.1.6 setup on windows.
Tuesday, 10 April 2012
BIOS settings for VirtualBox
If you use VirtualBox you might check out a few BIOS settings regarding virtualization.
Running a 64 bit guest OS needs you to enable the VT-settings (on my HP ProBook 6550b it's called "Virtualization Technology setting"). On other notebooks it might be called otherwise.
Make sure you reboot your OS.
Another thing to consider is so called "trusted execution" or "Data Execution Prevention". Of course you want this enabled to be more secure against mal-ware. However it turns out that it is quite a performance-drain when using VirtualBox. A colleague who tipped me told that he copied a VM with SOASuite to his new laptop, where Weblogic need 15 minutes to start! After a change in the settings he managed to decrease this to 5 minutes. Which is pretty normal for a Weblogic startup. He couldn't remember the settings, it had something to do with "security".
So I turned "Data Execution Prevention" (as it is called on my HP) off and it turns out that my complete VM "feels" faster. I did not time my VM yet, but it seems to cope with the performance improvement of my colleague (thanks).
Wednesday, 4 April 2012
Unexpire passwords of Meta Data Service Repository
Today I ran into the unability to deploy my SOA/BPM project to my development SOASuite installation in my Virtual Machine. I haven't used it for a while, and it turns out that the passwords of my MDS users in the database are expired.
Since it is my personal dedicated development server I don't want passwords to expire at all. So I found out that I have to update the default profile to have the password expiration turn of:
Since it is my personal dedicated development server I don't want passwords to expire at all. So I found out that I have to update the default profile to have the password expiration turn of:
ALTER PROFILE DEFAULT LIMIT FAILED_LOGIN_ATTEMPTS UNLIMITED PASSWORD_LIFE_TIME UNLIMITED;To check this you can use the following query:
select LIMIT from dba_profiles where RESOURCE_NAME ='FAILED_LOGIN_ATTEMPTS'
and PROFILE = (select profile from dba_users where username like 'DEV_%');
But still the passwords are expired... You can alter user every MDS user one by one. But you can also use the following piece of plsql (run as System):
declare
cursor c_ddl
is select 'alter user '||username ||' identified by welcome1' ddl
from all_users
where username like 'DEV_%';
begin
for r_ddl in c_ddl loop
execute immediate r_ddl.ddl;
end loop;
end;
You should change the 'DEV_%' in the where clause of the cursor to reflect the prefix of the MDS users in your system.
And to possible show errors you might want to catch exceptions within a local block around the execute immediate.
Friday, 24 February 2012
Portable Apps
This week at my customer, I got my laptop replaced. Where I had a laptop with Windows XP and was Local Admin on it, I now have a Windows 7 with a standard user account. For my development work I have a remote pc in a closet (a closet-PC or "Ophok PC").
The most annoying thing is that I can't install my favorite browser Firefox. But I also want to use XMind mindmapping program and several other tools. For instance, Total Commander is becoming more and more my personal desktop. It's the first thing to start and from there I have buttons to start other apps.
Now I remembered that there are several initiatives to have a collection of apps on a USB stick. For Firefox, and XMind there are portable versions. And also Totalcommander is runnable from a USB stick.
So I got me a spare 8GB USB stick (or at least I made it "spare" for this purpose) and I searched and got into "Portable Apps". This initiative makes it really easy to get a stick with your favorite apps, where it gives a Start menu and a place to browse and work with your documents on a stick. It has an "exit" button to savely remove your stick from the machine.
After you install it on your stick, you can start it with the start.exe file.
Then you get this nice looking start menu:
With the link below, "All Portable Apps", you can switch to a categorized display of your apps. With the Apps menu option you get the possibility to install extra apps:
With Get More Apps it goes checking it's online repository and from there you can install apps just by checking them and press "Next".

Create an XMind installer
If you want to add your own apps, check the PortableApps.com Apps Installer:

With this App you can create your own installer.
For Xmind it is pretty easy. Download the Portable version. Unzip the common and the XMind_windows to a temp dir:

Then you can move the contents of the XMind_Windows folder to the upper folder besides the Commons folder. You have to edit the xmind.ini file to replace all occurences of "../Commons" with "./Commons".
Then you can direct the PortableApps installer to that folder, and follow the instructions. However, it will fail running the first time.
But it creates several folders, amongst others:
With a tool like Irfanview it is easy to replace these icon-files with a resized version of the picture that can be found if you search on xmind pictures in google. (http://lmgtfy.com/?q=icons+xmind and click on images).
Then it will complain for a help.html. You can copy that from an other portable app, like the one of Kompozer/NVU. With Kompozer/NVU you can edit the html file easily.
After these changes the PortableApps installer will work, and creates a nice XMind installer.
Here you see that I managed to install it in Portable Apps with even a correct Icon:
Total Commander
For TotalCommander, you simply install the TotalCommander Launcher. Then running it for the first time, it will complain that it hasn't got a correct TotalCommander installation. But it will suggest to copy the installed version to the stick. So just run it for the first time on a machine with a normal installation of TC.
Conclusion
So what does this have to do with Oracle? Almost nothing. But lots with being a consultant that has to do his "thing" on any machine of a customer, with his own favorite tools.
Have fun.
The most annoying thing is that I can't install my favorite browser Firefox. But I also want to use XMind mindmapping program and several other tools. For instance, Total Commander is becoming more and more my personal desktop. It's the first thing to start and from there I have buttons to start other apps.
Now I remembered that there are several initiatives to have a collection of apps on a USB stick. For Firefox, and XMind there are portable versions. And also Totalcommander is runnable from a USB stick.
After you install it on your stick, you can start it with the start.exe file.
Then you get this nice looking start menu:
With Get More Apps it goes checking it's online repository and from there you can install apps just by checking them and press "Next".
Create an XMind installer
If you want to add your own apps, check the PortableApps.com Apps Installer:
With this App you can create your own installer.
For Xmind it is pretty easy. Download the Portable version. Unzip the common and the XMind_windows to a temp dir:
Then you can direct the PortableApps installer to that folder, and follow the instructions. However, it will fail running the first time.
But it creates several folders, amongst others:
Here you see that I managed to install it in Portable Apps with even a correct Icon:
Total Commander
For TotalCommander, you simply install the TotalCommander Launcher. Then running it for the first time, it will complain that it hasn't got a correct TotalCommander installation. But it will suggest to copy the installed version to the stick. So just run it for the first time on a machine with a normal installation of TC.
Conclusion
So what does this have to do with Oracle? Almost nothing. But lots with being a consultant that has to do his "thing" on any machine of a customer, with his own favorite tools.
Have fun.
Subscribe to:
Posts
(
Atom
)






















