Wednesday, October 26, 2011

Oracle SOA Suite – Creating Resource Adapter Connection factories through WLST for Database Adapter,MQ Adapter and FTP Adapter


Oracle SOA Suite – Creating Resource Adapter Connection factories through WLST for Database Adapter,MQ Adapter and FTP Adapter:

WLST script can be use to create the Resource Adapter connection factories (DB, FTP and MQ) and set the different configuration parameters in weblogic server.
Here we will use the property file to configure the connection factories details, the WLST script will create the connection factories in the server based on the property file.
Just edit the ResourceAdapter.properties file with the connection factories details.
Set the global.resource.deployment.plan.path property with the where the generated deploymentPlan files needs to be stored.

ResourceAdapter.properties


domain.AdminIP=xxxxxxxx
domain.AdminPort=xxxx
domain.AdminPasswd=xxxxxxxxxx
global.resource.deployment.plan.path= /config/deployplan
domain.resource.ftpHost = 10.10.10.10
domain.resource.ftpUserName=
domain.resource.ftpPassword=
domain.resource.mqQueueManager=TCRMGEN1
domain.resource.mqHost=LOCALHOST
domain.resource.mqport=2022
domain.resource.mqChannel=L_CRM_FUSION_CLNT_N2

The below WLST code snippet will create the required connection factories in the server.
Set the DB data source Connection Factory JNDI Name and the data source name as per the requirement. In this sample we are creating two connection factories. Change the method createDBConnectionFactory to create more Database Adapter connection factories.
Change the method createFTPConnectionFactory to create more FTP Adapter connection factories.
Change the method createMQConnectionFactory to create more FTP Adapter Connection factories.

ResourceAdapterCreation.py


from java.io import FileInputStream
TargetServerName='AdminServer'
#Connect
#The directory of the SOA binaries
soaHome=os.environ["SOAHOME"]
print "SOAHOME="+soaHome
appPathDB=soaHome+'/soa/connectors/DbAdapter.rar'
appNameDB='DbAdapter'
moduleOverrideNameDB=appNameDB+'.rar'
appPathFTP=soaHome+'/soa/connectors/FtpAdapter.rar'
appNameFTP='FtpAdapter'
moduleOverrideNameFTP=appNameFTP+'.rar'
appPathMQ=soaHome+'/soa/connectors/MQSeriesAdapter.rar'
appNameMQ='MQSeriesAdapter'
moduleOverrideNameMQ=appNameMQ+'.rar'
moduleDescriptorName='META-INF/weblogic-ra.xml'
ConnFactory1JNDIName = 'eis/DB/OM'
ConnFactory1DataSourceName = 'eai/ds/EAIReference'
ConnFactory2JNDIName = 'eis/DB/XRef'
ConnFactory2DataSourceName = 'eai/ds/EAIXRef'
transactionSupport='LocalTransaction'
ftpJNDIName='eis/Ftp/ProductRefXML'
mqJNDIName='eis/MQ/MQSeriesAdapterRemoteCRMtoEAI'
domainName='standalone_domain'
def createDBConnectionFactory():
propInputStream = FileInputStream("ResourceAdapter.properties")
configProps1 = Properties()
configProps1.load(propInputStream)
planPathDB=configProps1.get('global.resource.deployment.plan.path')+'/'+domainName+'_PlanDB.xml'
edit()  
startEdit()
myPlanDB=loadApplication(appPathDB, planPathDB)
makeDeploymentPlanVariable(myPlanDB, 'ConnectionInstance_eis/DB/OM_JNDIName_13102979357209', ConnFactory1JNDIName , '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+ConnFactory1JNDIName+'"]/jndi-name',moduleOverrideNameDB)
makeDeploymentPlanVariable(myPlanDB, 'ConfigProperty_dataSourceName_Value_13102979357210', ConnFactory1DataSourceName,'/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+ConnFactory1JNDIName+'"]/connection-properties/properties/property/[name="xADataSourceName"]/value',moduleOverrideNameDB)
makeDeploymentPlanVariable(myPlanDB, 'ConnectionInstance_eis/DB/XRef_JNDIName_13102979357211', ConnFactory2JNDIName , '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+ConnFactory2JNDIName+'"]/jndi-name',moduleOverrideNameDB)
makeDeploymentPlanVariable(myPlanDB, 'ConfigProperty_dataSourceName_Value_13102979357213', ConnFactory2DataSourceName,'/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+ConnFactory2JNDIName+'"]/connection-properties/properties/property/[name="xADataSourceName"]/value',moduleOverrideNameDB)
makeDeploymentPlanVariable(myPlanDB, 'ConnectionDefinitionProperties_TransactionSupport_13123107532320', transactionSupport,'/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+ConnFactory1JNDIName+'"]/connection-properties/transaction-support',moduleOverrideNameDB)
makeDeploymentPlanVariable(myPlanDB, 'ConnectionDefinitionProperties_TransactionSupport_13123107532320', transactionSupport,'/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+ConnFactory2JNDIName+'"]/connection-properties/transaction-support',moduleOverrideNameDB)
myPlanDB.save();
save();
cd('/AppDeployments/DbAdapter/Targets');
updateApplication(appNameDB, planPathDB);
startApplication(appNameDB)
#redeploy(appNameDB, planPathDB,targets=cmo.getTargets());
activate(block='true');
def createFTPConnectionFactory():
propInputStream = FileInputStream("ResourceAdapter.properties")
configProps1 = Properties()
configProps1.load(propInputStream)
planPathFTP=configProps1.get('global.resource.deployment.plan.path')+'/'+domainName+'_PlanFTP.xml'
ftpHost=configProps1.get('domain.resource.ftpHost')
ftpUserName=configProps1.get('domain.resource.ftpUserName')
ftpPassword=configProps1.get('domain.resource.ftpPassword')
edit()
startEdit()
myPlanFTP=loadApplication(appPathFTP, planPathFTP)
makeDeploymentPlanVariable(myPlanFTP, 'ConnectionInstance_eis/Ftp/FtpPRD_JNDIName', ftpJNDIName, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+ftpJNDIName+'"]/jndi-name',moduleOverrideNameFTP)
makeDeploymentPlanVariable(myPlanFTP, 'ConfigProperty_useSftp_Value_FtpPRD', 'true', '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+ftpJNDIName+'"]/connection-properties/properties/property/[name="useSftp"]/value',moduleOverrideNameFTP)
makeDeploymentPlanVariable(myPlanFTP, 'ConfigProperty_host_Value_FtpPRD', ftpHost, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+ftpJNDIName+'"]/connection-properties/properties/property/[name="host"]/value',moduleOverrideNameFTP)
makeDeploymentPlanVariable(myPlanFTP, 'ConfigProperty_password_Value_FtpPRD', ftpUserName, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+ftpJNDIName+'"]/connection-properties/properties/property/[name="username"]/value',moduleOverrideNameFTP)
makeDeploymentPlanVariable(myPlanFTP, 'ConfigProperty_password_Value_FtpPRD', ftpPassword, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+ftpJNDIName+'"]/connection-properties/properties/property/[name="password"]/value',moduleOverrideNameFTP)
myPlanFTP.save();
save();
cd('/AppDeployments/FtpAdapter/Targets');
updateApplication(appNameFTP, planPathFTP);
startApplication(appNameFTP)
#redeploy(appNameFTP, planPathFTP,targets=cmo.getTargets());
activate(block='true');
def createMQConnectionFactory():
propInputStream = FileInputStream("ResourceAdapter.properties")
configProps1 = Properties()
configProps1.load(propInputStream)
planPathMQ=configProps1.get('global.resource.deployment.plan.path')+'/'+domainName+'_PlanMQ.xml'
mqQueueManager=configProps1.get('domain.resource.mqQueueManager')
mqHostName=configProps1.get('domain.resource.mqHost')
MqPort=configProps1.get('domain.resource.mqport')
mqChannelName=configProps1.get('domain.resource.mqChannel')
edit()
startEdit()
myPlanMQ=loadApplication(appPathMQ, planPathMQ)
makeDeploymentPlanVariable(myPlanMQ, 'ConnectionInstance_eis_MQ_MQSeriesAdapterRemoteCRMtoEAI_JNDIName', mqJNDIName, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+mqJNDIName+'"]/jndi-name',moduleOverrideNameMQ)
makeDeploymentPlanVariable(myPlanMQ, 'ConfigProperty_host_Value_mqQueueManagerPRD', mqQueueManager, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+mqJNDIName+'"]/connection-properties/properties/property/[name="queueManagerName"]/value',moduleOverrideNameMQ)
makeDeploymentPlanVariable(myPlanMQ, 'ConfigProperty_password_Value_mqHostNamePRD', mqHostName, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+mqJNDIName+'"]/connection-properties/properties/property/[name="hostName"]/value',moduleOverrideNameMQ)
makeDeploymentPlanVariable(myPlanMQ, 'ConfigProperty_password_Value_MqPortPRD', MqPort, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+mqJNDIName+'"]/connection-properties/properties/property/[name="portNumber"]/value',moduleOverrideNameMQ)
makeDeploymentPlanVariable(myPlanMQ, 'ConfigProperty_password_Value_mqChannelNamePRD', mqChannelName, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+mqJNDIName+'"]/connection-properties/properties/property/[name="channelName"]/value',moduleOverrideNameMQ)
myPlanMQ.save();
save();
cd('/AppDeployments/MQSeriesAdapter/Targets');
updateApplication(appNameMQ, planPathMQ);
startApplication(appNameMQ)
#redeploy(appNameFTP, planPathMQ,targets=cmo.getTargets());
activate(block='true');
def makeDeploymentPlanVariable(wlstPlan, name, value, xpath,overrideName, origin='planbased'):
wlstPlan.destroyVariable(name)
wlstPlan.destroyVariableAssignment(name, overrideName, moduleDescriptorName)
variableAssignment = wlstPlan.createVariableAssignment(name, overrideName, moduleDescriptorName)
variableAssignment.setXpath(xpath)
variableAssignment.setOrigin(origin)
wlstPlan.createVariable(name, value)
print 'moduleDescriptorName=',moduleDescriptorName
def main():
propInputStream1 = FileInputStream("ResourceAdapter.properties")
domainProps = util.Properties()
domainProps.load(propInputStream1)
adminURL='t3://'+domainProps.get('domain.AdminIP')+':'+domainProps.get('domain.AdminPort')
adminUserName='weblogic'
adminPassword=domainProps.get("domain.AdminPasswd")
connect(adminUserName, adminPassword, adminURL)
createDBConnectionFactory()
createFTPConnectionFactory()
createMQConnectionFactory()
disconnect()
main()

Set the environment variable “SOAHOME”  in the server and execute the WLST script that will create the required Resource Adapter connection factories. Also this will create the deploymentPlan files to the location specified. The generated plan file can be used to modify the configuration of connection factories also to move the connection factories from one server to another server.

>$ORACLE_HOME/common/bin/wlst.sh ResourceAdapterCreation.py

Download: ResourceAdapter.properties   ResourceAdapterCreation.py

Oracle SOA Suite – Creating weblogic database resources through WLST

Oracle SOA Suite – Creating weblogic database resources through WLST:


WLST script can be use to create the data sources and set the different configuration parameters in weblogic server.
Here we will use the property file to configure the data source details, the WLST script will create the data sources in the server based on the property file.
Just edit the JDBCResources.properties file with the data source details.

JDBCResources.properties

DBURL=jdbc:oracle:thin:@::EAIDB14A
domain.AdminIP=xxxxxxxxx
domain.AdminPort=xxxx
domain.AdminPasswd=xxxxx

datasource.connectionpool.driver.class=oracle.jdbc.OracleDriver
datasource.connectionpool.test.query=SQL SELECT * FROM DUAL
datasource.total=2

datasource.prefix.1=xref
datasource.xref.connectionpool.name.1=ESBXRefDataConnectionPool
datasource.xref.connectionpool.username.1=SOA_SOAINFRA
datasource.xref.connectionpool.password.1=val11g
datasource.xref.connectionpool.initCapacity.1=10
datasource.xref.connectionpool.maxCapacity.1=60
datasource.xref.name.1=ESBXRefDataSource
datasource.xref.jndi.name.1=eai/ds/EAIXRef
datasource.xref.target.1=Clusters/SOACluster,Clusters/WLSCoreCluster

datasource.prefix.2=om
datasource.om.connectionpool.name.2=OMConnectionPool
datasource.om.connectionpool.username.2=SOA_EAIOWNER
datasource.om.connectionpool.password.2=val11g
datasource.om.connectionpool.initCapacity.2=10
datasource.om.connectionpool.maxCapacity.2=180
datasource.om.name.2=CRM6EAIReference
datasource.om.jndi.name.2=eai/ds/EAIReference
datasource.om.target.2=Clusters/SOACluster,Clusters/WLSCoreCluster


The below WLST code snippet will create the required data sources and set the corresponding connection parameters to the data source.

JDBCResourceCreation.py

from java.io import FileInputStream
def createJDBCResources():
propInputStream = FileInputStream("JDBCResources.properties")
configProps = Properties()
configProps.load(propInputStream)
adminURL='t3://'+configProps.get('domain.AdminIP')+':'+configProps.get('domain.AdminPort')
adminUserName='weblogic'
adminPassword=configProps.get("domain.AdminPasswd")
connect(adminUserName, adminPassword, adminURL)
edit()
startEdit()
totalDataSource_to_Create=configProps.get("datasource.total")
server='AdminServer'
cd("Servers/"+server)
target=cmo
cd("../..")
print '========================================='
print 'Creating DataSource....'
print '========================================='
dsTestQuery=configProps.get("datasource.connectionpool.test.query")
dsDriverName=configProps.get("datasource.connectionpool.driver.class")
i=1
while (i <= int(totalDataSource_to_Create)) :
#try:
cd('/')
prefix = configProps.get("datasource.prefix."+ str(i))
poolName = configProps.get("datasource."+prefix+".connectionpool.name."+ str(i))
dsUserName = configProps.get("datasource."+prefix+".connectionpool.username."+ str(i))
dsPassword = configProps.get("datasource."+prefix+".connectionpool.password."+ str(i))
initCapacity = configProps.get("datasource."+prefix+".connectionpool.initCapacity."+ str(i))
maxCapacity = configProps.get("datasource."+prefix+".connectionpool.maxCapacity."+ str(i))
dsName = configProps.get("datasource."+prefix+".name."+ str(i))
jndiname = configProps.get("datasource."+prefix+".jndi.name."+ str(i))
datasourceTargets = configProps.get("datasource."+prefix+".target."+ str(i)).split(",")
print 'prefix',prefix
print 'poolName',poolName
print 'dsUserName',dsUserName
print 'dsPassword',dsPassword
print 'initCapacity',initCapacity
print 'maxCapacity',maxCapacity
print 'dsName',dsName
print 'jndiname',jndiname
print 'datasourceTargets',datasourceTargets
print 'Creating DataSource: ',dsName,' ....'
print("")
print("*** Creating JDBC with property prefix " + prefix)
myResourceName = dsName
print("Here is the Resource Name: " + myResourceName)
jdbcSystemResource = create(myResourceName,"JDBCSystemResource")
myFile = jdbcSystemResource.getDescriptorFileName()
print ("HERE IS THE JDBC FILE NAME: " + myFile)
jdbcResource = jdbcSystemResource.getJDBCResource()
jdbcResource.setName(myResourceName)
# Create the DataSource Params
dpBean = jdbcResource.getJDBCDataSourceParams()
myName=jndiname
dpBean.setJNDINames([myName])
#dpBean.setGlobalTransactionsProtocol('EmulateTwoPhaseCommit')
dpBean.setGlobalTransactionsProtocol('None')
# Create the Driver Params
drBean = jdbcResource.getJDBCDriverParams()
drBean.setPassword(dsPassword)
drBean.setUrl(configProps.get("DBURL"))
drBean.setDriverName(dsDriverName)
propBean = drBean.getProperties()
driverProps = Properties()
driverProps.setProperty("user",dsUserName)
e = driverProps.propertyNames()
while e.hasMoreElements() :
propName = e.nextElement()
myBean = propBean.createProperty(propName)
myBean.setValue(driverProps.getProperty(propName))
# Create the ConnectionPool Params
ppBean = jdbcResource.getJDBCConnectionPoolParams()
ppBean.setInitialCapacity(int(initCapacity))
ppBean.setMaxCapacity(int(maxCapacity))
ppBean.setTestConnectionsOnReserve(true)
ppBean.setTestTableName('SQL SELECT 1 FROM DUAL')
# Adding KeepXaConnTillTxComplete to help with in-doubt transactions.
xaParams = jdbcResource.getJDBCXAParams()
xaParams.setKeepXaConnTillTxComplete(1)
# Add Target
for datasourceTarget in datasourceTargets:
print 'DataSourceTargets',datasourceTargets
print 'DataSourceTarget',datasourceTarget
if datasourceTarget=='':
print ''
else:
jdbcSystemResource.addTarget(getMBean(datasourceTarget))
print 'DataSource: ',dsName,', has been created Successfully !!!'
print '========================================='
#except:
#print '***** CANNOT CREATE DATASOURCE !!! Check If the DataSource With the Name : ' , dsName ,' Alreday exists or NOT...'
#print ''
i = i + 1
print '========================================='
save()
activate()
disconnect()

def main():
createJDBCResources();
print 'Successfully created JDBC resources for SOACoreDomain'
main()

Execute the WLST script that will create the required data sources and set the corresponding parameters.
>$ORACLE_HOME/common/bin/wlst.sh JDBCResourceCreation.py

Download: JDBCResourceCreation.py  JDBCResources.properties

Oracle SOA Suite – Creating Weblogic users and assign SOA and weblogic roles through WLST


Oracle SOA Suite – Creating Weblogic users and assign SOA and weblogic roles through WLST:

WLST script can be use to create the required users in Weblogic and to assign the required SOA and weblogic roles to the user.
Here we will use the property file to configure the user details,the WLST script will create the users in the server based on the property file.
Weblogic roles control the access permission of weblogic server and the SOA roles control the access permission of the EM console.
Just edit the UserManagement.properties with the users and group details.

UserManagement_SOADomain.properties


admin.url=t3://xxxxxxxx:8000
admin.userName=weblogic
admin.password=xxxxxxx
total.username=7
#
create.user.name.1=adminuser
create.user.password.1=Test1234
create.user.description.1= This is a Backup Administrator User
#Comma seperated roles
create.user.groups.1=Administrators
create.user.soarole.1=SOAAdmin,SOADesigner

create.user.name.2=soaadminuser
create.user.password.2=Test1234
create.user.description.2= This is a SOA ADMIN User Two
#Comma seperated roles
create.user.groups.2=Deployers,Operators,Monitors,IntegrationDeployers
create.user.soarole.2=SOAAdmin

create.user.name.3=nfttestuser
create.user.password.3=Test1234
create.user.description.3= This is a Test User Three
#Comma seperated roles
create.user.groups.3=Monitors,IntegrationMonitors
create.user.soarole.3=SOAMonitor,SOAAuditViewer

create.user.name.4=devtestuser
create.user.password.4=Test1234
create.user.description.4= This is a DEV User Three
#Comma seperated roles
create.user.groups.4=Deployers,IntegrationDeployers,IntegrationMonitors,Monitors,Operators
create.user.soarole.4=SOADesigner,SOAMonitor

WLST Script:

The below WLST code snippet will create the required users and assign the corresponding roles to the user.

UserManagement_SOADomain.py

from java.io import FileInputStream
from java.util import *
from javax.management import *

domainName=raw_input('Please enter the weblogic domain name for the user creation: ')
print 'domainName:',domainName

propInputStream = FileInputStream("UserManagement_"+domainName+".properties")
configProps = Properties()
configProps.load(propInputStream)

adminURL=configProps.get("admin.url")
adminUserName=configProps.get("admin.userName")
adminPassword=configProps.get("admin.password")
realmName=configProps.get("security.realmName")
totalUsers_to_Create=configProps.get("total.username")

connect(adminUserName, adminPassword, adminURL)
serverConfig()
authenticatorPath= '/SecurityConfiguration/' + domainName + '/Realms/myrealm/AuthenticationProviders/DefaultAuthenticator'
print authenticatorPath

cd(authenticatorPath)

print 'Creating Users . . .'

x=1
while (x <= int(totalUsers_to_Create)):
userName = configProps.get("create.user.name."+ str(x))
userPassword = configProps.get("create.user.password."+ str(x))
userDescription = configProps.get("create.user.description."+ str(x))
try:
cmo.createUser(userName , userPassword , userDescription)
print '-----------User Created With Name : ' , userName
except Exception, e:
print e
x = x + 1

print ' '
print ' '

print 'Adding Group Membership of the Users:'
y=1
while (y <= int(totalUsers_to_Create)):
grpNames = configProps.get("create.user.groups."+ str(y)).split(",")
userName = configProps.get("create.user.name."+ str(y))
for grpName in grpNames:
if grpName=='':
print ''
else:
cmo.addMemberToGroup(grpName,userName)
print 'USER:' , userName , 'Added to GROUP: ' , grpName

y=y+1

print 'Adding SOA Roles Membership of the Users:'
y=1
while (y <= int(totalUsers_to_Create)):
roleNames = configProps.get("create.user.soarole."+ str(y)).split(",")
userName = configProps.get("create.user.name."+ str(y))
for roleName in roleNames:
if roleName=='':
print ''
else:
grantAppRole(appStripe="soa-infra", appRoleName=roleName,principalClass="weblogic.security.principal.WLSUserImpl", principalName=userName)
print 'USER:' , userName , 'Added the Role: ' , roleName
y=y+1

Execute the WLST script that will create the required users and assign the corresponding roles.
>$ORACLE_HOME/common/bin/wlst.sh UserManagement_SOADomain.py

Download: UserManagement_SOADomain.properties  UserManagement_SOADomain.py

Tuesday, October 25, 2011

Oracle SOA Suite 10g to Oracle SOA Suite 11g Migration – FlowN execution issue

Oracle SOA Suite 10g to Oracle SOA Suite 11g Migration – FlowN execution issue:


We had a flow in 10g that invokes another composite inside the FlowN activity with different data based on the index variable and it was working properly but after the migration the composite has always invoked with the payload of the first flow branch.

We did some analysis and found that 10g FlowN activity and 11g FlowN activities are working in different manner.

In 10g ,the activities in the same flow branch is executed in sequence that after completing the first branch the second branch getting executed
But in 11g, the execution of the activities are swapped between branches that the first activity in the first branch is executed then the first activity in second branch then second activity in first branch and second activity in second activity and so on.

In 10g even though we are using the global variables inside the flowN activity each flowN branch is working with different message/payload based on the Index Variable.
In 11g if we are using the global variables inside the flowN activity all the flowN branches are executed with the same message/payload of the first flow branch.
To overcome this issue we have copied the global variable data to local FlowN scope variable and used the local variable inside the FlowN.

Below is the detailed execution of activities within FlowN in 10g:-

FlowN with two branches and both the branches are working on the same global variable ‘Varaible_1’
The value of ‘Varaible_1’ has incremented to 1 in Assign_2 and to 2 in Assign_3 (Assign_2 and Assign_3 data’s are displayed together) of Flow2


The value of ‘Varaible_1’ has incremented to 3 in Assign_2 and to 4 in Assign_3 (Assign_2 and Assign_3 data’s are displayed together) of Flow1