14.10. Synchronizing JBoss Developer Studio Workspace with Business Central Repositories

JBoss BPM Suite allows you to synchronize your local workspace with one or more repositories that are managed inside Business Central with the help of Eclipse tooling for Git. Git is a popular distributed source code version control system. You can use any Git tool of your choice.
When you create and execute processes inside JBoss Developer Studio, they get created on your local file system. Alternatively, you can import an existing repository from Business Central, apply changes and push these changes back into the Business Central repositories. This synchronization enables collaboration between developers using JBoss Developer Studio and business analysts or end users using Business Central.

14.10.1. Importing a Business Central Repository using EGit Import Wizard

Procedure 14.11. Task

  1. Open JBoss Developer Studio.
  2. Navigate to FileImport ...GitProjects from Git and click Next.
  3. Select URI to connect to a repository that is managed by Business Central and click Next.
    This opens a Import Project from Git dialog box.
  4. Provide the URI of the repository you would like to import in the URI field.
    Provide the following URI to connect to your Business Central repositories:
    ssh://<hostname>:8001/<repository_name>
    For example, if you are running the Business Central on your local host by using the jbpm-installer, you would use the following URI to import the jbpm-playground repository:
    ssh://localhost:8001/jbpm-playground
    You can change the port used by the server to provide ssh access to the git repository if necessary, using the system property org.uberfire.nio.git.ssh.port.
  5. Click Next.
  6. Specify where on your local file system you would like this repository to be created in the Directory field.
  7. Select the master branch in the Initial branch field and click Next.
  8. Select Import as general project to import the repository you downloaded as a project in your JBoss Developer Studio workspace and click Next>.
  9. Provide a name for the repository and click Finish.
This adds your repository to your workspace and you can now browse, open and edit the various assets inside it.

14.10.2. Committing Changes to Business Central

To commit and push your local changes back to the Business Central repositories:

Procedure 14.12. Task

  1. Open your repository project in JBoss Developer Studio.
  2. Right-click on your repository project and select TeamCommit ....
    A new dialog box open showing all the changes you have on your local file system.
  3. Select the files you want to commit, provide an appropriate commit message, and click Commit.
    You can double-click each file to get an overview of the changes you did for that file.
  4. Right-click your project again, and select TeamPush to Upstream.

14.10.3. Retrieving the Changes from the Business Central Repository

To retrieve the latest changes from the Business Central repository:

Procedure 14.13. Task

  1. Open your repository project in JBoss Developer Studio.
  2. Right-click your repository project and select TeamFetch from Upstream.
    This action fetches all the changes from the Business Central repository.
  3. Right-click your project again and select TeamMerge.
    A Merge 'master' dialog appears.
  4. In the Merge 'master' dialog box, select origin/master branch under Remote Tracking.
  5. Click Merge.
This merges all the changes from the original repository in Business Central.

Note

It is possible that you have committed and/or conflicting changes in your local version, you might have to resolve these conflicts and commit the merge results before you will be able to complete the merge successfully. It is recommended to update regularly, before you start updating a file locally, to avoid merge conflicts being detected when trying to commit changes.

14.10.4. Importing Individual Projects from Repository

When you import a repository, it downloads all the projects that are inside that repository. It is however useful to mount one specific project as a separate Java project in JBoss Developer Studio. When you do this, JBoss Developer Studio is able to:
  • Interpret the information in the project pom.xml file that you created in Business Central.
  • Download and include any dependencies you specified.
  • Compile any Java classes you have in your project.
To import a project as a separate Java project:

Procedure 14.14. Task

  1. In the JBoss Developer Studio, right-click on one of the projects in your repository project and select Import ....
  2. Under the Maven category, select Existing Maven Projects and click Next.
    The Import Maven Project dialog box opens displaying the pom.xml file of the project you selected.
  3. Click Finish .

14.10.5. Adding JBoss BPM Suite libraries to your Project Classpath

You need to add the JBoss BPM Suite libraries to the classpath of your project to ensure it compiles and executes correctly. To do this:

Procedure 14.15. Task

  • Right-click your project and select ConfigureConvert to jBPM Project.
This converts your project into a JBoss BPM Suite project and adds the JBoss BPM Suite library to your project's classpath