@Test public void taskAssigningPlanningServerExtension() { List<Pair<String, String>> previousValues = buildPreviousValues(TASK_ASSIGNING_PROPERTIES); setSystemSystemProperties(previousValues); TaskAssigningPlanningKieServerExtension extension = (TaskAssigningPlanningKieServerExtension) configuration.taskAssigningPlanningServerExtension(); assertTrue(extension.isActive()); assertSystemProperty(TASK_ASSIGNING_PROCESS_RUNTIME_URL, properties.getProcessRuntime().getUrl()); assertSystemProperty(TASK_ASSIGNING_PROCESS_RUNTIME_USER, properties.getProcessRuntime().getUser()); assertSystemProperty(TASK_ASSIGNING_PROCESS_RUNTIME_PWD, properties.getProcessRuntime().getPwd()); assertSystemProperty(TASK_ASSIGNING_KEY_STORE_PROCESS_RUNTIME_ALIAS, properties.getProcessRuntime().getKey().getAlias()); assertSystemProperty(TASK_ASSIGNING_KEY_STORE_PROCESS_RUNTIME_PWD, properties.getProcessRuntime().getKey().getPwd()); assertSystemProperty(TASK_ASSIGNING_PROCESS_RUNTIME_TIMEOUT, Integer.toString(properties.getProcessRuntime().getTimeout())); assertSystemProperty(TASK_ASSIGNING_PROCESS_RUNTIME_TARGET_USER, properties.getProcessRuntime().getTargetUser()); assertSystemProperty(TASK_ASSIGNING_PUBLISH_WINDOW_SIZE, Integer.toString(properties.getPublishWindowSize())); assertSystemProperty(PLANNING_USER_ID_PROPERTY, properties.getCore().getModel().getPlanningUserId()); assertSystemProperty(TASK_ASSIGNING_SYNC_INTERVAL, properties.getSolutionSyncInterval()); assertSystemProperty(TASK_ASSIGNING_SYNC_QUERIES_SHIFT, properties.getSolutionSyncQueriesShift()); assertSystemProperty(TASK_ASSIGNING_USERS_SYNC_INTERVAL, properties.getUsersSyncInterval()); assertSystemProperty(TASK_ASSIGNING_WAIT_FOR_IMPROVED_SOLUTION_DURATION, properties.getWaitForImprovedSolutionDuration()); assertSystemProperty(TASK_ASSIGNING_IMPROVE_SOLUTION_ON_BACKGROUND_DURATION, properties.getImproveSolutionOnBackgroundDuration()); assertSystemProperty(TASK_ASSIGNING_SOLVER_CONFIG_RESOURCE, properties.getSolver().getConfigResource()); assertSystemProperty(TASK_ASSIGNING_SOLVER_MOVE_THREAD_COUNT, properties.getSolver().getMoveThreadCount()); assertSystemProperty(TASK_ASSIGNING_SOLVER_MOVE_THREAD_BUFFER_SIZE, Integer.toString(properties.getSolver().getMoveThreadBufferSize())); assertSystemProperty(TASK_ASSIGNING_SOLVER_THREAD_FACTORY_CLASS, properties.getSolver().getThreadFactoryClass()); assertSystemProperty(TASK_ASSIGNING_SOLVER_CONTAINER_ID, properties.getSolver().getContainer().getId()); assertSystemProperty(TASK_ASSIGNING_SOLVER_CONTAINER_GROUP_ID, properties.getSolver().getContainer().getGroupId()); assertSystemProperty(TASK_ASSIGNING_SOLVER_CONTAINER_ARTIFACT_ID, properties.getSolver().getContainer().getArtifactId()); assertSystemProperty(TASK_ASSIGNING_SOLVER_CONTAINER_VERSION, properties.getSolver().getContainer().getVersion()); assertSystemProperty(TASK_ASSIGNING_USER_SYSTEM_NAME, properties.getUserSystem().getName()); assertSystemProperty(TASK_ASSIGNING_USER_SYSTEM_CONTAINER_ID, properties.getUserSystem().getContainer().getId()); assertSystemProperty(TASK_ASSIGNING_USER_SYSTEM_CONTAINER_GROUP_ID, properties.getUserSystem().getContainer().getGroupId()); assertSystemProperty(TASK_ASSIGNING_USER_SYSTEM_CONTAINER_ARTIFACT_ID, properties.getUserSystem().getContainer().getArtifactId()); assertSystemProperty(TASK_ASSIGNING_USER_SYSTEM_CONTAINER_VERSION, properties.getUserSystem().getContainer().getVersion()); assertSystemProperty(USERS_FILE, properties.getUserSystem().getSimple().getUsers()); assertSystemProperty(SKILLS_FILE, properties.getUserSystem().getSimple().getSkills()); assertSystemProperty(AFFINITIES_FILE, properties.getUserSystem().getSimple().getAffinities()); assertSystemProperty(TASK_ASSIGNING_RUNTIME_DELEGATE_PAGE_SIZE, Integer.toString(properties.getRuntimeDelegate().getPageSize())); configuration.handleContextRefreshEvent(mock(ContextClosedEvent.class)); previousValues.forEach(previousValue -> assertSystemProperty(previousValue.getKey(), previousValue.getValue())); }
@Bean @ConditionalOnMissingBean(name = "taskAssigningPlanningServerExtension") @ConditionalOnProperty(name = "kieserver.taskAssigning.planning.enabled") public KieServerExtension taskAssigningPlanningServerExtension() { initProperties(); return new TaskAssigningPlanningKieServerExtension(); }
TaskAssigningPlanningKieServerAutoConfiguration { @Bean @ConditionalOnMissingBean(name = "taskAssigningPlanningServerExtension") @ConditionalOnProperty(name = "kieserver.taskAssigning.planning.enabled") public KieServerExtension taskAssigningPlanningServerExtension() { initProperties(); return new TaskAssigningPlanningKieServerExtension(); } }
TaskAssigningPlanningKieServerAutoConfiguration { @Bean @ConditionalOnMissingBean(name = "taskAssigningPlanningServerExtension") @ConditionalOnProperty(name = "kieserver.taskAssigning.planning.enabled") public KieServerExtension taskAssigningPlanningServerExtension() { initProperties(); return new TaskAssigningPlanningKieServerExtension(); } TaskAssigningPlanningKieServerAutoConfiguration(TaskAssigningPlanningProperties properties); }
TaskAssigningPlanningKieServerAutoConfiguration { @Bean @ConditionalOnMissingBean(name = "taskAssigningPlanningServerExtension") @ConditionalOnProperty(name = "kieserver.taskAssigning.planning.enabled") public KieServerExtension taskAssigningPlanningServerExtension() { initProperties(); return new TaskAssigningPlanningKieServerExtension(); } TaskAssigningPlanningKieServerAutoConfiguration(TaskAssigningPlanningProperties properties); @Bean @ConditionalOnMissingBean(name = "taskAssigningPlanningServerExtension") @ConditionalOnProperty(name = "kieserver.taskAssigning.planning.enabled") KieServerExtension taskAssigningPlanningServerExtension(); @EventListener void handleContextRefreshEvent(ContextClosedEvent evt); }
TaskAssigningPlanningKieServerAutoConfiguration { @Bean @ConditionalOnMissingBean(name = "taskAssigningPlanningServerExtension") @ConditionalOnProperty(name = "kieserver.taskAssigning.planning.enabled") public KieServerExtension taskAssigningPlanningServerExtension() { initProperties(); return new TaskAssigningPlanningKieServerExtension(); } TaskAssigningPlanningKieServerAutoConfiguration(TaskAssigningPlanningProperties properties); @Bean @ConditionalOnMissingBean(name = "taskAssigningPlanningServerExtension") @ConditionalOnProperty(name = "kieserver.taskAssigning.planning.enabled") KieServerExtension taskAssigningPlanningServerExtension(); @EventListener void handleContextRefreshEvent(ContextClosedEvent evt);  }