Uploaded image for project: 'BxMS Documentation'
  1. BxMS Documentation
  2. BXMSDOC-6786

Missing important notes on Spring Boot Business Application.

XMLWordPrintable

    • Undefined

      I notice some important notes are missing in the Spring Boot Configuration guide.

      The guide does not mention the need for the kie-server state file. This file is automatically generated by the spring boot maven archetype and is used by the application service to deploy the kjar module.

      Detailed information about this file is described in this document: https://docs.google.com/document/d/1wiedsaEUPRIAQoa4OGzfHdlLE_1zqu1Bwj0q9o5ty9o/edit#heading=h.ikljwt4u8f7g

      See the section below:

      Runtime Configuration

      The runtime configuration relies on 3 sources:

      • The spring boot configuration: application.properties
      • System properties passed at JVM start up (-DpropName=propValue)
      • The kie server status file that has an xml format and it’s read from current working directory at runtime startup. The name of the file is <kie-server-id>.xml

       

      The kie server status defines the deployment unit (container) that host the business logic.

      E.g.

         <container>
      
           <containerId>business-application-kjar</containerId>
      
           <releaseId>
      
             <groupId>com.company</groupId>
      
             <artifactId>business-application-kjar</artifactId>
      
             <version>1.0-SNAPSHOT</version>
      
           </releaseId>
      
           <status>STARTED</status>
      
           <scanner>
      
             <status>STOPPED</status>
      
           </scanner>
      
           <configItems>
      
             <config-item>
      
               <name>KBase</name>
      
               <value></value>
      
               <type>BPM</type>
      
             </config-item>
      
             <config-item>
      
               <name>KSession</name>
      
               <value></value>
      
               <type>BPM</type>
      
             </config-item>
      
             <config-item>
      
               <name>MergeMode</name>
      
               <value>MERGE_COLLECTIONS</value>
      
               <type>BPM</type>
      
             </config-item>
      
             <config-item>
      
               <name>RuntimeStrategy</name>
      
               <value>PER_PROCESS_INSTANCE</value>
      
               <type>BPM</type>
      
             </config-item>
      
           </configItems>
      
           <messages/>
      
           <containerAlias>business-application</containerAlias>
      
         </container>
      
      

       

      The key information provided are:

      • containerId used across almost all the APIs to identify the specific project deployment
      • releaseId the kjar project GAV
      • scanner status is always stopped for immutable images
      • containerAlias that could be shared among multiple deployments of the same project. This becomes handy when the user needs to address the latest running container.

      Note

      Originally, the kieserver was designed to deploy multiple containers at the same time. In “microservice wise” approach, it’s likely that one deployment will just host one container.

       

            mramendi Mikhail Ramendik
            rafael.soares Rafael Soares
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: