Thursday 17 March 2016

Renaming BPEL Process Names


Renaming the BPEL process name is very difficult in SOA 11G, But we can achieve by follow the below steps.

1) Copy the below code and SAVE it as build.xml

Here is a build.xml Ant script which takes care of the above requirements.
<?xml version="1.0" encoding="UTF-8" ?>
<project default="RenameBPELProcessInJDeveloper11gR1">
    <target name="RenameBPEL">
        <echo>Workdir: ${PROJECT_DIR}</echo>
        <echo>String replacement: ${FILENAME_NO_EXT} -> ${NEW_FILENAME}</echo>
        <replace dir="${PROJECT_DIR}" token="${FILENAME_NO_EXT}" value="${NEW_FILENAME}">
            <exclude name="**/.svn*"/>
        </replace>
        <echo>complete...</echo>
        <echo>Renaming ${FILENAME_NO_EXT} -> ${NEW_FILENAME} in ${PROJECT_DIR}</echo>
        <move todir="${PROJECT_DIR}">
            <fileset dir="${PROJECT_DIR}">
                <exclude name=".svn*"/>
            </fileset>
            <mapper type="glob" from="${FILENAME_NO_EXT}*" to="${NEW_FILENAME}*"/>
        </move>
        <echo>Renaming ${FILENAME_NO_EXT} -> ${NEW_FILENAME} in ${PROJECT_DIR}/xsd</echo>
        <move todir="${PROJECT_DIR}/xsd">
            <fileset dir="${PROJECT_DIR}/xsd">
                <exclude name=".svn*"/>
            </fileset>
            <mapper type="glob" from="${FILENAME_NO_EXT}*" to="${NEW_FILENAME}*"/>
        </move>
        <echo>Renaming ${FILENAME_NO_EXT} -> ${NEW_FILENAME} in ${PROJECT_DIR}/xsl</echo>
        <move todir="${PROJECT_DIR}/xsl">
            <fileset dir="${PROJECT_DIR}/xsd">
                <exclude name=".svn*"/>
            </fileset>
            <mapper type="glob" from="${FILENAME_NO_EXT}*" to="${NEW_FILENAME}*"/>
        </move>
        <echo>complete...</echo>
     </target>
</project>
Next follow these steps:
  1. Tools -> External Tools...
  2. New
  3. Tool Type: Apache Ant
  4. Ant Build File: (Browse to build.xml file)
  5. Move RenameBPEL target from Available Targets to Selected Targets.
  6. Add Property -> Insert -> File Directory | Property Name: PROJECT_DIR
  7. Add Property -> Insert -> File Name Without Extension | Property Name: FILENAME_NO_EXT
  8. Add Property -> Insert -> Prompt | Property Name: NEW_FILENAME
  9. Options Page, no changes required. Click Next.
  10. Process Page, no changes required. Click Next.
  11. Classpath Page, no changes required. Click Next.
  12. Display Page: Caption for Menu Items: Rename BPEL ProcessIcon Location: (Browse to renameBpelIcon.gif)Click Next.
  13. Integration Page:Add Items to Menus: Tools MenuNavigator Context MenuAdd Buttons to Toolbars:Main ToolbarBefore Tool Starts:Save AllAfter Tool Exits:Reload Open File:Log Output to Messages LogClick Next
  14. Availability Page:Select: When Specific File Types are SelectedMove BPEL Process from Available Types to Selected Types
  15. Click Finish
  16. Click OK
So what does the result look like?
Select a BPEL process in the Application Navigator of JDeveloper. Now you have two options for invoking the Rename BPEL process 'External Tool'.
As shown below, you can press the new icon in the toolbar. 
Alternatively you can select from the context menu. 
The complete process should look something like this: 
Notice that the original filename was foo.bpel and we have renamed it to bar.bpel.
You need more details you can refer the below link....
https://blogs.oracle.com/middleware/entry/renaming_bpel_process_names