Friday, December 20, 2013

Oracle BPM Case Management - Not able to assign case id from start case output

Problem Desc:

This is oracle product issue. When your are creating xslt mapping for case-output variable, it is uses http://xmlns.oracle.com/CaseService/types name space but actual response namespace is different  http://xmlns.oracle.com/bpm/CaseService/types . Due to this namespace issue, we can't assign value from case output variable.

Solution: 

You have to replace   this namespace

http://xmlns.oracle.com/CaseService/types

with


in you xslt.

That's it. 

It will work.

Cannot read from policy store. Reason is PolicyStore Error, javax.xml.stream.XMLStreamException

This error comes when system-jazn-data.xml file is corrupted.

<20-Dec-2013 10:50:35 o'clock GMT> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: weblogic.security.SecurityInitializationException: The loading of OPSS java security policy provider failed due to exception, see the exception stack trace or the server log file for root cause. If still see no obvious cause, enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: Cannot read from policy store. Reason is PolicyStore Error, javax.xml.stream.XMLStreamException: javax.xml.stream.XMLStreamException: Premature end of file encountered
weblogic.security.SecurityInitializationException: The loading of OPSS java security policy provider failed due to exception, see the exception stack trace or the server log file for root cause. If still see no obvious cause, enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: Cannot read from policy store. Reason is PolicyStore Error, javax.xml.stream.XMLStreamException: javax.xml.stream.XMLStreamException: Premature end of file encountered
                at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.loadOPSSPolicy(CommonSecurityServiceManagerDelegateImpl.java:1402)
                at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(CommonSecurityServiceManagerDelegateImpl.java:1022) 


Solution:

Just need to replace this file with new one which you can get from other soa domains or any backup if you have.

Thursday, December 12, 2013

Error in starting cases - : java.util.MissingResourceException: Can't find resource for bundle

Some time starting i case i was following exception again and again. I googled it but did not find any solutiuon for this.

Error in starting cases.
Error in starting cases.
Contact system administrator for assistance.

    at oracle.bpm.casemgmt.impl.CaseInstanceServiceImpl.startCase(CaseInstanceServiceImpl.java:169)


Caused by: java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key

Due to this exception case manager is not triggered and not returning any case ID


Then i try following options and it worked.

1. Go to your project folder  <Your Project>\SCA-INF\classes
2.  Delete everying thin in this folder
3. Go to  <Your Project>\resources and delete everything from this folder
4. Redeploy your project again

You would not see this problem again.






Friday, November 22, 2013

Oracle BPM 11g Case Management - Case API - jcooper(User) don't have access to case for case id

 jcooper(User)  don't access to case for case id

I have deployed the case manager project and triggered  one instance of it. Then i was trying get case details using case management api but i was getting above error for every user i was trying.

User should have  READ and UPDATE access for cases he is trying to access which we can check in EM console

Click on "Weblogic domain" -> SOA Domain

From top of SOA domain click on application policies



You can see following policies for Stakeholders you defined in case manager


But some time if we don't see these policies and get the error mentioned above(user don't have access)



It means we have update issue  with system-jazn-data.xml  file.

Sol:

Go to the following location of the file
Linux:

/oracle/fmwhome/user_projects/domains/dev_soa_osb/config/fmwconfig

Windows:

C:\Oracle\Middleware\user_projects\domains\bpm_domain\config\fmwconfig

Right click on the file system-jazn-data.xml and select properties and change permission from read-only to none

Linux
Go to Permissions tab and change the permission for Group access and other access to “None”

It will solve you problem.

BPM 11g Case Management: Could not find records in table using query select count(caseInstance) from Case as caseInstance

Caused By: BPM-73004

Unable to find records in table.
Could not find records in table using query select count(caseInstance) from Case as caseInstance join caseInstance.caseHeader as caseHeader join caseInstance.caseTranslations as caseTranslations where ( caseTranslations.locale = :locale ) and exists (select caseStakeHolders from caseInstance.caseStakeHolders as caseStakeHolders join caseStakeHolders.caseStakeHolderMembers as caseStakeHolderMembers where ((caseStakeHolderMembers.stakeHolder = :stakeHolder and caseStakeHolderMembers.stakeHolderType = 'USER') or (caseStakeHolderMembers.stakeHolder IN :stakeHolderAppRoleList and caseStakeHolderMembers.stakeHolderType = 'APPLICATION_ROLE') or (caseStakeHolderMembers.stakeHolder IN :stakeHolderGroupList and caseStakeHolderMembers.stakeHolderType = 'GROUP'))) order by caseInstance.caseHeader.caseNumber desc .
Contact system administrator for assistance.


You can also find this error when you try get list of Cases from from the case manager

Solution:


  • Download the patch for 14791221
  • Unzip the patch in a temporary directory
  • Copy patch-catalog_18499.xml and HLJ3.jar to  utils/bsu/cache_dir under your BEA Home. For e.g. this will be /oracle/fmwhome/utils/bsu/cache_dir in the BPM VirtualBox image
  • Change directory to /oracle/fmwhome/utils/bsu
  • Run ./bsu.sh
  • This will launch the Smart Update application. Once it initializes, you should see the patch in the Downloaded Patches panel. Click on the button in the Apply column to apply the patch
  Restart all the servers.

Tuesday, February 19, 2013

Oracle SOA/BPEL - To turn off the Auto recovery SOA Server 11g


You can try the following steps based on your process if it is: synchronous or async

Scenario 1:

 Auto Recovery only for BPEL Auto recovery is only applicable  for Async and Durable processes.

 To supress auto recovery at BPEL level:
 1. In the navigator, right-click soa-infra and select SOA Administration  BPEL Properties.
 2. Click More BPEL Configuration Properties.
 3. In the Name column, click RecoveryConfig.
 4. expand RecurringScheduleConfig :
     set maxMessageRaiseSize = 0 ( default : 50)
           stopWindowTime = 00:00 ( default: 04:00) 4. expand:
 StartupScheduleConfig
     set maxMessageRaiseSize = 0 ( default: 50)

 Scenario 2: Auto Recovery only for  for Sync processes

 1. In the navigator, right-click soa-infra and select SOA Administration  Common Properties  Advanced  More SOA Infra Advanced Configuration Properties...

 2. In the Name column, click GlobalTxMaxRetry ( The maximum number of times a GLOBAL_RETRY FabricInvocationException can be retried before bubbling up).

 3. set GlobalTxMaxRetry = 0 ( default : 2)

 4.similarly, GlobalTxRetryInterval ( The number of seconds between retries in the case of GLOBAL_RETRY FabricInvocationException )
     set GlobalTxRetryInterval = 0 ( default: 3)

Monday, February 18, 2013

Oracle SOA/ BPM - SQL Authenticator Integration with HWF/WorkList App

Please refer my previous blog to know how to configure SQL Authenticator
Configure SQL Authenticator

Please follow these steps

Changed default realm

(EM Console)Changed the value of key “WorkflowIdentityConfig.ConfigurationType” from default “jazn.com” to “myrealm” by executing the “setRealmName” operation

soa-infra ->Administration -> System Mbean Browser -> Application Defined Mbeans - > oracle.as.soainfra.config -> Server - > WorkflowIdentityConfig -> human-workflow -> WorkflowIdentityConfig.ConfigurationType -> select the configuration and rename by invoking the operation setRealmName




SQL Authenticator Configuration for BPM worklist and Human Task Flow

 

Download the attachment: workflow-120-SQLIdentityProvider.zip 
Copy dbprovider.jar from workflow-120-SQLIdentityProvider\lib to MW_HOME/user_projects/domains/{soa_domain}/lib

Follow the steps below:
1. Shutdown SOA and Admin Server
 2. Navigate to MW_HOME/user_projects/domains/{domain_name}/config/fmwconfig
 3. Backup jps-config.xml
 4. Edit jps-config.xml and make the following modifications
   A. Modify
   <serviceInstanceRef ref="idstore.ldap"/> to
   <serviceInstanceRef ref="idstore.custom"/>
     under <jpsContext name="default">
   B. Add
      <serviceInstance name="idstore.custom" provider="custom.provider"
 location="dumb">
                <description>Custom Identity Store Service Instance</description>
                 <property name="idstore.type" value="CUSTOM"/>
                 <property name="ADF_IM_FACTORY_CLASS"
 value="org.sample.providers.db.DBIdentityStoreFactory"/>
                 <property name="DB_SERVER_NAME" value="db_host_name"/>
                 <property name="DB_SERVER_PORT" value="db_port"/>
                 <property name="DB_DATABASE_NAME" value="db_sid"/>
                 <property name="ST_SECURITY_PRINCIPAL" value="db_user"/>        
                 <property name="ST_SECURITY_CREDENTIALS" value="db_passwd"/>   
                 </serviceInstance>
    under <serviceInstances>
      change the db_* parameters as per the environment
  C. Add
 <serviceProvider type="IDENTITY_STORE" name="custom.provider"
 class="oracle.security.jps.internal.idstore.generic.GenericIdentityStoreProvider">
               <description>Custom IdStore Provider</description>
                </serviceProvider>
  within <serviceProviders> </serviceProviders>
 .
 5. Start SOA/Admin server
  Now logging on to worklist application should work.


  I have tested this on my local machine and it works.
6. You can also configure human task from JDeveloper to add user from SQL authenticator.For that realm setting is must as mentioned in  "Changed default realm"  step.

Oracle SOA/BPM - Configure SQL Authenticator


Here i am going to demonstrate how to configure SQL authenticator on Weblogic server and view users and groups. I am using sample tables here. You can configure you own tables.

Database setup(sample)

  1. Create some database tables to be used for the SQL authenticator. SQLplus could be used. Use the following script to create the default schema used by WLS:
CREATE TABLE USERS (
U_NAME VARCHAR(200) NOT NULL,
U_PASSWORD VARCHAR(50) NOT NULL,
U_DESCRIPTION VARCHAR(1000))
;
ALTER TABLE USERS
ADD CONSTRAINT PK_USERS
PRIMARY KEY (U_NAME)
;
CREATE TABLE GROUPS (
G_NAME VARCHAR(200) NOT NULL,
G_DESCRIPTION VARCHAR(1000) NULL)
;
ALTER TABLE GROUPS
ADD CONSTRAINT PK_GROUPS
PRIMARY KEY (G_NAME)
;
CREATE TABLE GROUPMEMBERS (
G_NAME VARCHAR(200) NOT NULL,
G_MEMBER VARCHAR(200) NOT NULL)
;
ALTER TABLE GROUPMEMBERS
ADD CONSTRAINT PK_GROUPMEMS
PRIMARY KEY (
G_NAME,
G_MEMBER
)
;
ALTER TABLE GROUPMEMBERS
ADD CONSTRAINT FK1_GROUPMEMBERS
FOREIGN KEY ( G_NAME )
REFERENCES GROUPS (G_NAME)
ON DELETE CASCADE
  1. Populate the database using this script:
insert into USERS (U_NAME,U_PASSWORD,U_DESCRIPTION) values('system','weblogic','admin user');
insert into GROUPS (G_NAME,G_DESCRIPTION) values('Administrators','Administrators');
insert into GROUPMEMBERS (G_NAME,G_MEMBER) values('Administrators','system');

WebLogic server configuration

  1. Create a data source with the information of the database previously configured.
    • Data base type: Oracle
    • Driver: Oracle's Driver (thin) for instance connections; Versions: 9.0.1,9.2.0,10,11
    • Target: AdminServer/SOA Server
  2. Create a SQLAuthenticator:
          Log into the Administration Console.
          Go to Security Realms.
          Select myrealm > Providers.
       
  Click on New.
 Provide a name for the new provider (e.g. MySQLlProvider).



Set SQLAuthenticator as provider type.
Click on OK and the new provider should appear on the list of available providers.
Click on the new provider.
Change control flag to SUFFICIENT



Go to Provider Specific
Specify the Data Source Name. Use the information of the data source previously created.
Select the Password Style as Plaintext
Leave the rest as default.
Click on Save



Set the control flag to SUFFICIENT for all the authenticators (DefaultAuthenticator) in the list.

 Reorder the Authentication Providers



As non-dynamic changes were done, WebLogic Server needs to be restarted.

Testing the SQLAuthenticator

  1. Log into the Administration Console.
  2. Validate that users from the database were retrieved. Go to Security Realms -> myrealm -> Users and Groups and review if users of the provider sqlProvider were loaded.

In next blog, i will demonstarte how to integrate Human Task and Worklist app with SQL authenticator.