Oracle SOA Suite Online Training

Interested in learning Oracle SOA Suite 12c?
Learn from the author of this blog!
A complete and comprehensive course on the #1 platform on SOA - Oracle SOA Suite

Click here to find the complete course details
Click here to check the first session on Oracle SOA Suite 12c


Business Rule Error :: Fact not found in the rule engine working memory, rule session execution failed

You may encounter the following error while working with Oracle Business Rules

Non Recoverable System Fault :
<errorMessage>Fact not found in the rule engine working memory, rule session execution failed. The rule session 800009 failed because an instance of the fact could not be found in the working memory of the rule session. This is most likely a rule modeling error. The xxx service interaction expects the fact instance to exist in the working memory of the rule session. Check the rule actions in rule designer and make sure that a fact of the expected type is being asserted. If the error persists, contact Oracle Support Services. 800009</errorMessage>

The bolded variable, which in my case is the response variable, is the cause of the error in this case. This is coming because the none of the rules have passed and so the response object could not be asserted with a value. Since there is no instantiated response object, and the BusinessRule tries to reply with the response object, you end up with 'Not Found' error.

In such cases, make sure atleast one rule passes when you send an input. Otherwise, add a rule for '1=1' which always passes.

Hope this helps.

Server Policy vs Clinet Policy

When you start working with security policies, during initial days, often you get confused with server policy vs client policy.

Every policy will have a client and a server version

Server Policy : This policy does the actual work.
For ex,
The OWSM policy oracle/wss_http_token_server_policy does the http basic authentication, i.e. checks the provided userid/pwd against the server's LDAP/IDAM/watever...

Client Policy :: Adds the security information
On the other hand, the client policy asserts/includes the required security information to the SOAP HTTP header before sending the request out
For ex, OWSM policy oracle/wss_http_token_client_policy adds the security header with userid/pwd or csf-key to the outgoing request

So, a service policy will be applied to the service provider, whereas the client policy will be applied to the service consumer/caller

Without a client policy to the service caller, the security information cannot be propagated to the service provider and thus the service policy on the service rejects the message. So, a service caller will have the client version of the policy on the actual service

the exception reported is: java.lang.IllegalStateException: this is only a psuedo object

Sometimes, you may endup with the following error during deployment - the jar builds up fine, but error during deployment.

[11:04:54 PM] HTTP error code returned [500]
[11:04:54 PM] Error message from server:
There was an error deploying the composite on AdminServer: Deployment Failed: Error occurred during deployment of component: DetermineDeadline to service engine: implementation.bpel, for composite: Complaint_Decision: ORABPEL-05250

Error deploying BPEL suitcase.
error while attempting to deploy the BPEL component file "/oracle/fmwhome/user_projects/domains/dev_soa_osb/servers/AdminServer/dc/soa_1d83d7f5-1d65-4788-b497-f5ee15431311"; the exception reported is: java.lang.IllegalStateException: this is only a psuedo object

This error contained an exception thrown by the underlying deployment module.
Verify the exception trace in the log (with logging level set to debug mode).

[11:04:54 PM] Check server log for more details.
[11:04:54 PM] Error deploying archive sca_xxx_rev1.0.0.0.jar to partition "xxx" on server AdminServer [http://SOABPM-VM:7001] 
[11:04:54 PM] ####  Deployment incomplete.  ####

The same project that was deploying properly suddenly stops working. This may be because one or more wsdl's/xsd's used in the project are changed recently or the references have updated their wsdl's. Just refresh the bindings, update the MDS(if you are using MDS), and that solves the issue.

Tokenize a CSV and do a for-each in XSLT 1.0

There are cases where you'll have a csv and need to do a for-each on each of the tokens.
For ex, a CSV stored in a DVM has to be iterated and needs to be assigned to a target for each of the token

Here is how you can tokenize

<xsl:stylesheet version="1.0"
<xsl:template match="/">
<!-- Here I'm hardcoding the value, but this could be from any xml where you'll give an expression instead of a value, or from a DVM -->
<xsl:variable name='csv' select="'a,b,c'"/>
<xsl:for-each select="tokenize($csv,',')">
<xsl:value-of select="."/>

And the result is

<?xml version="1.0" encoding="UTF-8"?>