Chapter 3. Project storage and build options with Red Hat Process Automation Manager As you develop a Red Hat Process Automation Manager project, you need to be able to track the versions of your project with a version-controlled repository, manage your project assets in a stable environment, and build your project for testing and deployment. You can use Business Central for all of these tasks, or use a combination of Business Central and external tools and repositories. Red Hat Process Automation Manager supports Git repositories for project version control, Apache Maven for project management, and a variety of Maven-based, Java-based, or custom-tool-based build options. The following options are the main methods for Red Hat Process Automation Manager project versioning, storage, and building: Table 3.1. Project version control options (Git) Versioning option Description Documentation Business Central Git VFS Business Central contains a built-in Git Virtual File System (VFS) that stores all processes, rules, and other artifacts that you create in the authoring environment. Git is a distributed version control system that implements revisions as commit objects. When you commit your changes into a repository, a new commit object in the Git repository is created. When you create a project in Business Central, the project is added to the Git repository connected to Business Central. NA External Git repository If you have Red Hat Process Automation Manager projects in Git repositories outside of Business Central, you can import them into Red Hat Process Automation Manager spaces and use Git hooks to synchronize the internal and external Git repositories. Managing projects in Business Central Table 3.2. Project management options (Maven) Management option Description Documentation Business Central Maven repository Business Central contains a built-in Maven repository that organizes and builds project assets that you create in the authoring environment. Maven is a distributed build-automation tool that uses repositories to store Java libraries, plug-ins, and other build artifacts. When building projects and archetypes, Maven dynamically retrieves Java libraries and Maven plug-ins from local or remote repositories to promote shared dependencies across projects. Note For a production environment, consider using an external Maven repository configured with Business Central. NA External Maven repository If you have Red Hat Process Automation Manager projects in an external Maven repository, such as Nexus or Artifactory, you can create a settings.xml file with connection details and add that file path to the kie.maven.settings.custom property in your project standalone-full.xml file. Maven Settings Reference Packaging and deploying an Red Hat Process Automation Manager project Table 3.3. Project build options Build option Description Documentation Business Central (KJAR) Business Central builds Red Hat Process Automation Manager projects stored in either the built-in Maven repository or a configured external Maven repository. Projects in Business Central are packaged automatically as knowledge JAR (KJAR) files with all components needed for deployment when you build the projects. Packaging and deploying an Red Hat Process Automation Manager project Standalone Maven project (KJAR) If you have a standalone Red Hat Process Automation Manager Maven project outside of Business Central, you can edit the project pom.xml file to package your project as a KJAR file, and then add a kmodule.xml file with the KIE base and KIE session configurations needed to build the project. Packaging and deploying an Red Hat Process Automation Manager project Embedded Java application (KJAR) If you have an embedded Java application from which you want to build your Red Hat Process Automation Manager project, you can use a KieModuleModel instance to programmatically create a kmodule.xml file with the KIE base and KIE session configurations, and then add all resources in your project to the KIE virtual file system KieFileSystem to build the project. Packaging and deploying an Red Hat Process Automation Manager project CI/CD tool (KJAR) If you use a tool for continuous integration and continuous delivery (CI/CD), you can configure the tool set to integrate with your Red Hat Process Automation Manager Git repositories to build a specified project. Ensure that your projects are packaged and built as KJAR files to ensure optimal deployment. NA S2I in OpenShift (container image) If you use Red Hat Process Automation Manager on Red Hat OpenShift Container Platform, you can build your Red Hat Process Automation Manager projects as KJAR files in the typical way or use Source-to-Image (S2I) to build your projects as container images. S2I is a framework and a tool that allows you to write images that use the application source code as an input and produce a new image that runs the assembled application as an output. The main advantage of using the S2I tool for building reproducible container images is the ease of use for developers. The Red Hat Process Automation Manager images build the KJAR files as S2I automatically, using the source from a Git repository that you can specify. You do not need to create scripts or manage an S2I build. For the S2I concept: Images in the Red Hat OpenShift Container Platform product documentation. For the operator-based deployment process: Deploying an Red Hat Process Automation Manager environment on Red Hat OpenShift Container Platform 4 using Operators . In the KIE Server settings, add a KIE Server instance and then click Set Immutable server configuration to configure the source Git repository for an S2I deployment.

Commands: