It is known that the process flows created in Pega do not follow any open standard, despite the fact that they look more like BPMN samples. People who want to jump start their Pega to Camunda migration by manually redrawing processes in Modeler. But manually redrawing process threads is tedious and time consuming, especially if there are many of them or the processes to be converted are complex. In this tutorial, we'll look at a utility that can help you generate a BPMN-compliant workflow that will serve as a starting point for moving from Pega to Camunda.
Pega XML to BPMN Converter Tutorial
Camunda Consulting has created a set of freely available tools for process flow migration. Pega workflow migration tools can be found
For this tutorial, we will be using Eclipse as our IDE.
- After cloning or downloading the Git repository, copy the contents of the Pega converter tools repository to a fresh workspace. If, for example, your Git repository is located at C:gitRepos, you can find the Pega converter at C:gitReposmigrate-to-camunda-toolsPegacreate BPMN from Pega XML.
- Copy the entire folder to the workspace of your choice.
- Then start Eclipse and select the workspace where you just copied the content. After starting Eclipse, go to File > Import > General > Projects from Folder or Archive.
- Click the button Next.
- In the dialog that appears, click on Directory and navigate to the folder you just copied to your workspace. Your screen should look something like this (see below).
- Press Finish.
The project will be imported into your workspace. You may want to update any Java compiler differences between the provided code and your environment, but it should work as is.
Next, we'll create a Run configuration that will allow you to run the converter in Eclipse:
- Right click on the project root folder and select Run As > Run Configurations…
- In the dialog that appears, click on Java Application to create a new configuration. The project name should already be filled in this dialog. You can give this configuration a new name if you wish.
- Next, you need to select the main class. Click on the Search button and be sure to select − BPMNGenFromPega-org.camunda.bpmn.generator. Select it and click OK.
- Your screen should look something like this:
You now need to provide two arguments, the first is the XML export from Pega and the second is the name of the converted file. Just in case, enter the path and filenames in the section program arguments tabs Argumentsenclosed in quotation marks. To get started, you will be provided with a sample Pega xml file. To use this example, enter the following data for the input and output files:
"./src/main/resources/SamplePegaProcess.xml" "./src/main/resources/ConvertedProcessFromPega.bpmn"
Your screen should look something like this:
Click on Run. A console window should open showing the following:
Diagram ./src/main/resources/SamplePegaProcess.xml converted from Pega and can be found at ./src/main/resources/ConvertedProcessFrom Pega.bpmn
The resources folder contains a PNG file (samplePegaProcessDiagram.png) of the original process in Pega and will look like this:
Using Camunda Modeler open ConvertedProcessFromPega.bpmn and it should look something like this:
jar file creation
If you just want to create a utility jar file, you have several options:
- Or right click on the file pom.xml and then Run As > Maven Install.
- Or right click on the root folder and select Show in Local Terminal and run the following Maven command: mvn clean package install.
Either way (or using your preferred method) you should get the jar file in the folder / target. Copy this jar anywhere and issue the following command in the terminal:
java -jar yourGeneratedJarFile.jar “your input file” “your output file”
Like this! Please feel free to leave feedback on our
Source: habr.com