Class KModuleDeploymentService

    • Constructor Detail

      • KModuleDeploymentService

        public KModuleDeploymentService()
    • Method Detail

      • onInit

        public void onInit()
      • getRegisterableItemsFactory

        protected org.kie.api.runtime.manager.RegisterableItemsFactory getRegisterableItemsFactory​(AuditEventBuilder auditLoggerBuilder,
                                                                                                   org.kie.api.runtime.KieContainer kieContainer,
                                                                                                   KModuleDeploymentUnit unit)
      • boostrapRuntimeEnvironmentBuilder

        protected org.kie.api.runtime.manager.RuntimeEnvironmentBuilder boostrapRuntimeEnvironmentBuilder​(KModuleDeploymentUnit deploymentUnit,
                                                                                                          DeployedUnit deployedUnit,
                                                                                                          org.kie.api.runtime.KieContainer kieContainer,
                                                                                                          org.kie.internal.runtime.conf.MergeMode mode)
        This creates and fills a RuntimeEnvironmentBuilder instance, which is later used when creating services.

        A lot of the logic here is used to process the information in the DeploymentDescriptor instance, which is part of the DeploymentUnit.
        Parameters:
        deploymentUnit - The KModuleDeploymentUnit, which is filled by the method
        deployedUnit - The DeployedUnit, which is also filled by the method
        kieContainer - The KieContainer, which contains information needed to fill the above two arguments
        mode - The MergeMode used to resolve conflicts in the DeploymentDescriptor.
        Returns:
        A RuntimeEnvironmentBuilder instance ready for use
      • buildContextParameters

        protected Map<String,​Object> buildContextParameters​(org.kie.api.runtime.KieContainer kieContainer)
      • getInstanceFromModel

        protected Object getInstanceFromModel​(org.kie.internal.runtime.conf.ObjectModel model,
                                              org.kie.api.runtime.KieContainer kieContainer,
                                              Map<String,​Object> contaxtParams)
      • processResources

        protected void processResources​(org.drools.compiler.kie.builder.impl.InternalKieModule module,
                                        Collection<String> files,
                                        org.kie.api.runtime.KieContainer kieContainer,
                                        DeploymentUnit unit,
                                        DeployedUnitImpl deployedUnit,
                                        org.kie.api.builder.ReleaseId releaseId,
                                        Map<String,​ProcessDescriptor> processes)
        Goes through all files in a deployment, and processes them so that they are then ready for use after deployment.
        Parameters:
        module - The InternalKieModule, necessary to get form content
        files - The List of file (names) to process.
        kieContainer - The KieContainer, necesary in order to load classes
        deploymentUnit - The DeploymentUnit, necessary to get the deployment id
        deployedUnit - The DeployedUnit, which contains the results of actions here
      • addClassToDeployedUnit

        protected void addClassToDeployedUnit​(Class deploymentClass,
                                              DeployedUnitImpl deployedUnit)
      • processClassloader

        protected void processClassloader​(org.kie.api.runtime.KieContainer kieContainer,
                                          DeployedUnitImpl deployedUnit)
        This processes the deployment dependencies, which are made available by the KieContainer ClassLoader.
        Parameters:
        kieContainer - The KieContainer, used to get the ClassLoader
        deployedUnit - The DeployedUnitImpl, used to store the classes loaded
      • setFormManagerService

        public void setFormManagerService​(FormManagerService formManagerService)
      • setExecutorService

        public void setExecutorService​(org.kie.api.executor.ExecutorService executorService)
      • activate

        public void activate​(String deploymentId)
        Description copied from interface: DeploymentService
        Activates given deployment by making sure it will be available for execution.
      • deactivate

        public void deactivate​(String deploymentId)
        Description copied from interface: DeploymentService
        Deactivates given deployment by making it only available for already running instances.
      • getProcessId

        protected String getProcessId​(String processSource)
      • getCaseId

        protected String getCaseId​(String processSource)