use of org.jbpm.kie.services.impl.store.DeploymentStore in project jbpm by kiegroup.
the class DeploymentServiceWithSyncTest method configureDeploymentSync.
protected void configureDeploymentSync() {
assertNotNull(deploymentService);
store = new DeploymentStore();
if (commandService == null) {
commandService = new TransactionalCommandService(emf);
}
store.setCommandService(commandService);
DeploymentSynchronizer sync = new DeploymentSynchronizer();
sync.setDeploymentService(deploymentService);
sync.setDeploymentStore(store);
invoker = new DeploymentSyncInvoker(sync, 1L, 1L, TimeUnit.SECONDS);
invoker.start();
}
use of org.jbpm.kie.services.impl.store.DeploymentStore in project jbpm by kiegroup.
the class DeploymentStoreTest method setup.
@Before
public void setup() {
buildDatasource();
emf = EntityManagerFactoryManager.get().getOrCreate("org.jbpm.domain");
store = new DeploymentStore();
store.setCommandService(new TransactionalCommandService(emf));
}
use of org.jbpm.kie.services.impl.store.DeploymentStore in project jbpm by kiegroup.
the class DeploymentSynchronizerCDIImpl method configure.
@PostConstruct
public void configure() {
DeploymentStore store = new DeploymentStore();
store.setCommandService(commandService);
setDeploymentStore(store);
}
use of org.jbpm.kie.services.impl.store.DeploymentStore in project jbpm by kiegroup.
the class DeactivateDeploymentServiceWithSyncTest method configureDeploymentSync.
protected void configureDeploymentSync() {
assertNotNull(deploymentService);
store = new DeploymentStore();
if (commandService == null) {
commandService = new TransactionalCommandService(emf);
}
store.setCommandService(commandService);
sync = new DeploymentSynchronizer();
sync.setDeploymentService(deploymentService);
sync.setDeploymentStore(store);
invoker = new DeploymentSyncInvoker(sync, 1L, 1L, TimeUnit.SECONDS);
}
use of org.jbpm.kie.services.impl.store.DeploymentStore in project jbpm by kiegroup.
the class DeploymentServiceEJBIntegrationTest method testDeploymentOfProcessesVerifyTransientObjectOmitted.
@Test
public void testDeploymentOfProcessesVerifyTransientObjectOmitted() {
assertNotNull(deploymentService);
assertNotNull(commandService);
DeploymentUnit deploymentUnit = new KModuleDeploymentUnit(GROUP_ID, ARTIFACT_ID, VERSION);
deploymentService.deploy(deploymentUnit);
units.add(deploymentUnit);
DeployedUnit deployed = deploymentService.getDeployedUnit(deploymentUnit.getIdentifier());
assertNotNull(deployed);
assertNotNull(deployed.getDeploymentUnit());
assertNotNull(deployed.getRuntimeManager());
assertNotNull(runtimeDataService);
Collection<ProcessDefinition> processes = runtimeDataService.getProcesses(new QueryContext());
assertNotNull(processes);
assertEquals(5, processes.size());
DeploymentStore store = new DeploymentStore();
store.setCommandService(commandService);
Collection<DeploymentUnit> units = store.getEnabledDeploymentUnits();
assertNotNull(units);
assertEquals(1, units.size());
DeploymentUnit enabled = units.iterator().next();
assertNotNull(enabled);
assertTrue(enabled instanceof KModuleDeploymentUnit);
KModuleDeploymentUnit kmoduleEnabled = (KModuleDeploymentUnit) enabled;
DeploymentDescriptor dd = kmoduleEnabled.getDeploymentDescriptor();
assertNotNull(dd);
// ejb deployment service add transitively Async WorkItem handler that should not be stored as part of deployment store
assertEquals(0, dd.getWorkItemHandlers().size());
}
Aggregations