Friday, September 13, 2013

Migration/Deployment of Human Workflow Data/Attributes/Views In Oracle BPM 11g



We create views/flexfields(Human Workflow Data) in BPM Workspace and often find it troublesome to create the same across the environment. Also creating the same across different environment makes it more error prone.


Here  is the solution to migrate/move them across environment.

Steps for Migrating Views:


1)      Ensure that the PATH environment variable contains the JAVA_HOME and ANT_HOME environment variables and that they point to the locations within the Oracle SOA Suite installation.

Eg.
ANT_HOME = $MW_HOME/modules/org.apache.ant_1.7.1

               2)      Create a migration.properties file in any location to export user metadata for the worklist application.


                Sample migration.properties with field description :

#############################################################################

# Set following property to denote whether an EXPORT or IMPORT needs to be

#performed.  During an EXPORT operation, data is migrated from a SOA server

#instance into an XML file.  During an IMPORT operation, data is migrated from

#the XML file into the SOA server instance.

#

# The possible values are: <EXPORT,IMPORT>

#############################################################################

operationType = EXPORT



#############################################################################

# Set following property to denote the type of object to be migrated.

#

# The possible values are: <VIEW,RULE,APPROVAL_GROUP,

# TASK_PAYLOAD_FLEX_FIELD_MAPPING>

#############################################################################

objectType = VIEW



#############################################################################

# The following property to denotes the object name in the case of VIEW,

# APPROVAL_GROUP and TASK_PAYLOAD_FLEX_FIELD_MAPPING.  This property refers to

# viewName in the case of VIEW, approvalGroupName in the case of Approval Group,

# and taskDefinitionId in the case of TASK_PAYLOAD_FLEX_FIELD_MAPPING.  The value

# ALL denotes all objects of that kind.

#############################################################################

name = ALL



#############################################################################

# The following property denotes the user name.  It pertains to VIEW or RULE.

#  In the case of VIEW, if user is not specified, then it implies STANDARD_VIEW.

#############################################################################

user = weblogic



#############################################################################

# The following property only pertains to RULE.  It denotes the group name.

#############################################################################

group =



#############################################################################

# The following property only pertains to VIEW. If true, then the View definitions

# and grants are migrated.  If false, then the View definition alone are migrated.  

#############################################################################

grantPermission = true



#############################################################################

# If true, this option denotes that only Attribute labels needs to be migrated.

# This also means that, the payload mappings will not be migrated.

#

# If false, this option denotes that the Attribute labels would not be

# migrated.  This means that the payload mappings will not be migrated.

#############################################################################

migrateAttributeLabel = false



#############################################################################

# If true, then always override the workflow user configurable data onto the

# target SOA server even if present.  If false, then do not over-ride if the

# target SOA server instance already has the workflow user configurable data.

#############################################################################

override = true



#############################################################################

# This option is for error handling.  If true, then the encountered errors are

# skipped and the Migration utility proceeds further.  If false, then any

# encountered error would halt the migration.

#############################################################################

skip = true



#############################################################################

# This option is for mapping task definition ids to the active version in the

# target SOA server instance.

#############################################################################

migrateToActiveVersion = true

#############################################################################



         3 )      Export/Import the data with the ant script.


          Example:
              
       ant -f ant-t2p-worklist.xml
-Dbea.home=<MW_HOME>
-Dsoa.home=<SOA_HOME>
-Dmigration.properties.file=<Full path of migration.properties>
-Dsoa.hostname=hostname
-Dsoa.rmi.port=8001
-Dsoa.admin.user=your Admin user
-Drealm=jazn.com
-Dmigration.file=<full path for the file export_all_userRules.xml>
-Dmap.file=<full path for the file export_all_userRules_mapper.xml>

While Importing copy the files migration.properties Dmap.file and Dmigration.file before executing the above command and give full path of the location where the files has been copied.

[Note] :

           
1) The location of file ant-t2p-worklist.xml is inside SOA_HOME/bin. If you want to get the password as prompt add below code to the file ant-t2p-worklist.xml. 
<!-- Promopt For UserName and password -->
<input message="Please enter User Name:" addproperty="soa.admin.user"/>
<input message="Please enter Password:" addproperty="soa.admin.password">
    <handler classname="org.apache.tools.ant.input.SecureInputHandler" />
</input>


2)  You can create your own build.xml rather than using ant-t2p-worklist.xml  to perform the migration of user data (we have created our own build.xml).



In case you face any errors or issues you can contact us by mail or leave us a comment here :):) ....

Cheers,
LetsLearnOracleSOA Team

1 comment:

  1. You can find more about the data migration consultant by visiting the data migration plans offered by this company. I had trusted this company, which helped me in transferring the data from the old system to a new one by following all the essential functions and conversion strategies.

    ReplyDelete