Wednesday 28 February 2018

Promoting Views/Flex Fields defined using workspace in lower environment to higher environment

Often we use views and protected flex fields in a BPM project. These are one of those few artifacts that resides outside of your main source code (BPM Application and BPM project in your jdeveloper). During development the BPM developers login to bpm workspace running on their local bpm runtime (most cases a local compact bpm domain or bpm domain on integrated weblogic ).

So the question is, how we promote these configuration to another environment. Certainly manually making the same changes in the each of the higher environment is erroneous and thus ruled out. The suggested option is to export the configuration from local environment into XML files, store it in the source control system and deploy through script to other environment. the step are illustrated as below -

Export Flex fields and Views
Login to the server from which you want to export.
> cd <MW_HOME>\soa\bin
> set ANT_HOME=<Your Path>\apache-ant-1.10.1
> set PATH=%ANT_HOME%\bin\;%PATH%

Export Flex fields
ant -v -f ant-t2p-worklist.xml -Dbea.home={ MW_HOME } -Dsoa.home={ MW_HOME/soa } -Dsoa.hostname={hostname} -Dsoa.rmi.port={port} -Dsoa.admin.user={admin user name}-Dsoa.admin.password={admin password} -Drealm=jazn.com -Dmigration.file={full path with filename  to store generated flex_data.xml} -Dmap.file=={full path with filename  to store generated flex_data_map.xml } -DoperationType=EXPORT -DobjectType=TASK_PAYLOAD_FLEX_FIELD_MAPPING -Dname=ALL -Duser={bpm admin user} -DgrantPermission=true  -DmigrateAttributeLabel=true
Parameters -
-Dbea.home=<MW_HOME>
-Dsoa.home=<MW_HOME>/soa
-Dsoa.hostname=Server ip/name
-Dsoa.rmi.port=Server port
-Dsoa.admin.user=admin user
-Dsoa.admin.password=admin user p
-Drealm=realname
-Dmigration.file=file in which the data will be exported
-Dmap.file=File  in which mapping data will be exported
Example -
ant -v -f ant-t2p-worklist.xml -Dbea.home=C:/Oracle/Middleware/Oracle_Home -Dsoa.home=C:/Oracle/Middleware/Oracle_Home/soa -Dsoa.hostname=localhost -Dsoa.rmi.port=7001 -Dsoa.admin.user=weblogic -Dsoa.admin.password=password1$ -Drealm=jazn.com -Dmigration.file=C:/workspace/ViewMigration/data/flex_data.xml -Dmap.file=C:/workspace/ViewMigration/data/flex_data_map.xml -DoperationType=EXPORT -DobjectType=TASK_PAYLOAD_FLEX_FIELD_MAPPING -Dname=ALL -Duser=weblogic -DgrantPermission=true  -DmigrateAttributeLabel=true


To export Views
ant -v -f ant-t2p-worklist.xml -Dbea.home={ MW_HOME } -Dsoa.home={ MW_HOME/soa } -Dsoa.hostname={hostname} -Dsoa.rmi.port={port} -Dsoa.admin.user={admin user name}-Dsoa.admin.password={admin password} -Drealm=jazn.com -Dmigration.file={full path with filename  to store generated view_data.xml} -Dmap.file=={full path with filename  to store generated view_data_map.xml } -DoperationType=EXPORT -DobjectType= VIEW -Dname=ALL -Duser={bpm admin user} -DgrantPermission=true  -DmigrateAttributeLabel=true
Parameters -
Most of the parameters remains same as Export Flex Fields
-DobjectType=VIEW
Example –
ant -f ant-t2p-worklist.xml -Dbea.home=C:/Oracle/Middleware/Oracle_Home -Dsoa.home=C:/Oracle/Middleware/Oracle_Home/soa -Dsoa.hostname=localhost -Dsoa.rmi.port=7001 -Dsoa.admin.user=weblogic -Dsoa.admin.password=password1$ -Drealm=jazn.com -Dmigration.file=C:/workspace/ViewMigration/data/view_data.xml -Dmap.file=C:/workspace/ViewMigration/data/view_data_map.xml -DoperationType=EXPORT -DobjectType=VIEW -Dname=ALL -Duser=weblogic -DgrantPermission=true

Import Flex fields and Views
Login to the server in which you want to import.
> cd <MW_HOME>\soa\bin
> set ANT_HOME=<Your Path>\apache-ant-1.10.1
> set PATH=%ANT_HOME%\bin\;%PATH%

Import Flex fields
ant -v -f ant-t2p-worklist.xml -Dbea.home={ MW_HOME } -Dsoa.home={ MW_HOME/soa } -Dsoa.hostname={hostname} -Dsoa.rmi.port={port} -Dsoa.admin.user={admin user name}-Dsoa.admin.password={admin password} -Drealm=jazn.com -Dmigration.file={full path with filename  of flex_data.xml} -Dmap.file=={full path with filename  of  flex_data_map.xml } -DoperationType=IMPORT -DobjectType=TASK_PAYLOAD_FLEX_FIELD_MAPPING -Dname=ALL -Duser={bpm admin user} -DgrantPermission=true  -DmigrateAttributeLabel=true

Parameters -
-Dbea.home=<MW_HOME>
-Dsoa.home=<MW_HOME>/soa
-Dsoa.hostname=Server ip/name
-Dsoa.rmi.port=Server port
-Dsoa.admin.user=admin user
-Dsoa.admin.password=admin user p
-Drealm=realname
-Dmigration.file=file from which data will be imported
-Dmap.file=File  from which mapping data will be imported

Example –
ant -v -f ant-t2p-worklist.xml -Dbea.home=C:/Oracle/Middleware/Oracle_Home -Dsoa.home=C:/Oracle/Middleware/Oracle_Home/soa -Dsoa.hostname=localhost -Dsoa.rmi.port=9001 -Dsoa.admin.user=weblogic -Dsoa.admin.password=password1$ -Drealm=jazn.com -Dmigration.file=C:/workspace/ViewMigration/data/flex_data.xml -Dmap.file=C:/workspace/ViewMigration/data/flex_data_map.xml -DoperationType=IMPORT -DobjectType=TASK_PAYLOAD_FLEX_FIELD_MAPPING -Dname=ALL -Duser=weblogic -DgrantPermission=true -DmigrateAttributeLabel=true

Import Views
ant -v -f ant-t2p-worklist.xml -Dbea.home={ MW_HOME } -Dsoa.home={ MW_HOME/soa } -Dsoa.hostname={hostname} -Dsoa.rmi.port={port} -Dsoa.admin.user={admin user name}-Dsoa.admin.password={admin password} -Drealm=jazn.com -Dmigration.file={full path with filename  of view_data.xml} -Dmap.file=={full path with filename  of  view_data_map..xml } -DoperationType=IMPORT -DobjectType= VIEW  -Dname=ALL -Duser={bpm admin user} -DgrantPermission=true  -DmigrateAttributeLabel=true
  
Parameters -
Most of the parameters remains same as above except
-DobjectType=VIEW

Example
ant -f ant-t2p-worklist.xml -Dbea.home=C:/Oracle/Middleware/Oracle_Home -Dsoa.home=C:/Oracle/Middleware/Oracle_Home/soa -Dsoa.hostname=localhost -Dsoa.rmi.port=9001 -Dsoa.admin.user=weblogic -Dsoa.admin.password=password1$ -Dhwf.t2p.config.file=C:/workspace/ViewMigration/source_cfg/config.properties -Drealm=jazn.com -Dmigration.file=C:/workspace/ViewMigration/data/view_data.xml -Dmap.file=C:/workspace/ViewMigration/data/view_data_map.xml -DoperationType=IMPORT -DobjectType=VIEW -Dname=ALL -Duser=weblogic -DgrantPermission=true



No comments:

Post a Comment