Forum Stats

  • 3,751,259 Users
  • 2,250,338 Discussions
  • 7,867,365 Comments

Discussions

Copy a BPM Application

vermio
vermio Member Posts: 28

Hello,

I would like to copy a bpm application to a new one but changing its name.

For BPM it will be an entirely new app.

Or perhaps I could do my job if I export the app (in an exp file for example) and import back but changing its name.

Is this possible?

Thank you in advance,

Nikos

Tagged:
Martien van den Akker
«1

Answers

  • Martien van den Akker
    Martien van den Akker Member Posts: 2,775 Bronze Crown
    edited Mar 25, 2020 7:03AM

    Hi,

    If you want to copy the whole application, maybe the easiest thing to do is create a new BPM application in Jdeveloper with the new name.

    Copy the old project folder into the new application and rename the project folder. Rename the project folder, and the .jpr file accordingly. Then open the composite.xml and change the name attribute at the top. Then in JDeveloper open the renamed .jpr file in the application.

    Or you can copy the whole application folder, rename the .jws file and do then rename the project as I wrote above. You can rename the reference to the .jpr file at the bottom of the .jws file and open the application jws file in JDeveloper. If you don't change the .jws file, then on opening in JDeveloper, it will note that the .jpr file is missing and it will remove it. Just open the project into the application and you're good to go.

    If you want just copy the new bpm project in the existing application then just copy the project folder and rename the copy as described above.

    In jdeveloper you can do a rename of the bpm process by do a right click on the process file and do refactor->rename. You should do that while not having the composite.xml and process file open. After that you should also do a rename of the component in the composite.xml. You can do that in JDeveloper, but I personally prefer doing that by just changing the composite.xml file by hand.
    By the way, none of the suggestions above are supported. So make sure you have a copy (use a version control system), save every change under way and make sure you know and understand what you're doing.
    Kind regards,
    Martien
    vermio
  • vermio
    vermio Member Posts: 28
    edited Mar 26, 2020 4:56AM

    Hi Martien,

    Thank you for your response.

    I haven't tried yet but regarding the edit that I must do in the old composite.xml...

    Are you sure that I don't have to change composite-id which is currently 016ffdd5-d0bc-4325-af6f-16a1812212c9, with the new one?

    BR,

    Nikos

  • Martien van den Akker
    Martien van den Akker Member Posts: 2,775 Bronze Crown
    edited Mar 26, 2020 6:38AM

    Hi Nikos,

    I don't think so. I never touched that. I think it's used to make sure that if you have a unique test url in the webservice test client. See for instance this nice article: https://technology.amis.nl/2014/07/08/soa-suite-12c-obtaining-composite-resources-wsdls-xsds-wadls/ . However, if you rename the composite then it is already unique.

    But it wouldn't hurt if you replaced it with a new one. I found https://www.guidgenerator.com/online-guid-generator.aspx  on google that generates a guid like that.

    Kind regards,
    Martien

    vermio
  • vermio
    vermio Member Posts: 28
    edited Mar 26, 2020 6:49AM

    Hi Martien,

    I was afraid that those ID's exist in database and if two apps/projects point at the same id could make the app useless (I have a backup in any case).

    It seems that there is no such case. So, I will try and update here.

    (the url you sent me is great!)

    Thank you

    Martien van den Akker
  • Martien van den Akker
    Martien van den Akker Member Posts: 2,775 Bronze Crown
    edited Mar 26, 2020 8:03AM

    No, it certainly does not refer to a value in the database. You could by the way also change a few random digits.

    You're welcome.

    (Would appreciate if you would mark my answers as helpfull or even as answered. It would help others as well having potentially the same question.)

    Kind regards,
    Martien

    vermio
  • vermio
    vermio Member Posts: 28
    edited Mar 27, 2020 5:30AM

    Hi Martien,

    I followed your advice.

    I opened the app from jdev and seems ok.

    Try to save it to PAM and I get a message that the project is already versioned.

    I'd like to be sure that there are no references to the old project.

    Thank you,

    Nikos

  • Martien van den Akker
    Martien van den Akker Member Posts: 2,775 Bronze Crown
    edited Mar 27, 2020 10:41AM

    Oh, it's been a while that I worked with that (my current customer only uses SOASuite).

    Did you regenerate the composite-ID?

    You could try to create a new project from scratch with an empty process and try to version that using PAM.

    Then merge the two: copy all the contents from the old project folder into the new empty project and then merge the composite (from all the imports services, components, reference and wires). Or just replace the identifying parts of the new empty composite.xml into the old composite.xml.

    Kind regards,
    Martien

  • vermio
    vermio Member Posts: 28
    edited Mar 27, 2020 11:55AM

    Sorry, I didn't understand.

    1) Try to version that using PAM:

    How exactly? When I right click on the project I have the option to "Version" the project. When I select it, I have the following options. Is this the way?

    pastedImage_0.png

    2) Merge the two:

    a) Copy all the folders from the old project to new: You mean copy everything replacing the new files with the same name?

    b) merge the composite : Can you give me an example?

    Sorry for the trouble but I don't have experience in BPM developing apps

    BR.

    Nikos

  • Martien van den Akker
    Martien van den Akker Member Posts: 2,775 Bronze Crown
    edited Mar 28, 2020 10:43AM

    Hi NIkos,

    I refered to your comment "Try to save it to PAM and I get a message that the project is already versioned". What does it actually say?

    b) merge the composite : Can you give me an example? Yes: could you provide your composite.xml?

    Kind regards,
    Martien

  • vermio
    vermio Member Posts: 28
    edited Mar 31, 2020 11:02AM

    Hi Martien,

    Sorry I didn't reply earlier but I have lot of work - not BPM - to do those days...

    I followed those steps to create the new app from the old one:

    * Create a new Application named Business-Expense-Approval and a new EMPTY project named Business-Expense-Approval.

    * Try to "Save to PAM" --> No message of course (I didn't save)

    * Now I open the new composite.xml where I see the following info: Composite name="Business-Expense-Approval". The project name and folder have the same name: "Business-Expense-Approval"

    * Rename the project folder to Business-Expense-Approval.bak (I could delete it of course)

    * Copy the folder of the old project into the new project and rename it to "Business-Expense-Approval"

    * Rename the .jpr file to Business-Expense-Approval.jpr.

    * Open composite.xlm and update the name to "Business-Expense-Approval".

    * Open the app in Jdeveloper:

      a) "BPMN/BPMN Processes" is empty while it should have

      b) SOA/Schemas is empty

      c) Even then, when I try to SAME to PAM, the error "The project "Business-Expense-Approval is already versioned" is displayed

    pastedImage_0.png

    I noticed that the old references exist to other files as well (eg. pom.xml) and I changed that too; no luck.

    Have I done something wrong?

    Thanks,

    Nikos