Examples of RepositoryService


Examples of org.camunda.bpm.engine.RepositoryService

      }
    }
    ProcessEngine otherEngine = otherProcessEngineConfiguration.buildProcessEngine();

    // 2. deploy again
    RepositoryService otherRepositoryService = otherEngine.getRepositoryService();

    String deploymentId = otherRepositoryService.createDeployment()
      .addClasspathResource(resource)
      .deploy().getId();

    // 3. start instance (i.e. create job)
    ProcessDefinition newDefinition = otherRepositoryService.createProcessDefinitionQuery().deploymentId(deploymentId).singleResult();
    otherEngine.getRuntimeService().startProcessInstanceById(newDefinition.getId());

    return deploymentId;
  }
View Full Code Here

Examples of org.camunda.bpm.engine.RepositoryService

      // get the application name
      String processApplicationName = processApplication.getName();

      // build the deployment
      final RepositoryService repositoryService = processEngine.getRepositoryService();

      final ProcessApplicationDeploymentBuilder deploymentBuilder = repositoryService.createDeployment(processApplication.getReference());

      // enable duplicate filtering
      deploymentBuilder.enableDuplicateFiltering(PropertyHelper.getBooleanProperty(processArchive.getProperties(), ProcessArchiveXml.PROP_IS_DEPLOY_CHANGED_ONLY, false));

      // enable resuming of previous versions:
View Full Code Here

Examples of org.camunda.bpm.engine.RepositoryService

        }
        else
          throw new ProcessEngineException("Could not find a process engine with name '" + processEngineName + "', no engines found. " +
                  "Make sure an engine configuration is present on the classpath");
      }
      RepositoryService repositoryService = processEngine.getRepositoryService();

      log("Starting to deploy " + files.size() + " files");
      for (File file: files) {
        String path = file.getAbsolutePath();
        log("Handling file " + path);
        try {
          FileInputStream inputStream = new FileInputStream(file);
          try {
            log("deploying bar "+path);
            repositoryService
                .createDeployment()
                .name(file.getName())
                .addZipInputStream(new ZipInputStream(inputStream))
                .deploy();
          } finally {
View Full Code Here

Examples of org.camunda.bpm.engine.RepositoryService

*/
public class HalProcessDefinitionResolver implements HalLinkResolver {

  public List<HalResource<?>> resolveLinks(String[] linkedIds, ProcessEngine processEngine) {

    RepositoryService repositoryService = processEngine.getRepositoryService();

    List<ProcessDefinition> processDefinitions = repositoryService.createProcessDefinitionQuery()
      .processDefinitionIdIn(linkedIds)
      .listPage(0, linkedIds.length);

    List<HalResource<?>> resolved = new ArrayList<HalResource<?>>();
    for (ProcessDefinition procDef : processDefinitions) {
View Full Code Here

Examples of org.camunda.bpm.engine.RepositoryService

*/
public class HalCaseDefinitionResolver implements HalLinkResolver {

  public List<HalResource<?>> resolveLinks(String[] linkedIds, ProcessEngine processEngine) {

    RepositoryService repositoryService = processEngine.getRepositoryService();

    List<CaseDefinition> caseDefinitions = repositoryService.createCaseDefinitionQuery()
      .caseDefinitionIdIn(linkedIds)
      .listPage(0, linkedIds.length);

    List<HalResource<?>> resolved = new ArrayList<HalResource<?>>();
    for (CaseDefinition caseDefinition : caseDefinitions) {
View Full Code Here

Examples of org.camunda.bpm.engine.RepositoryService

    if (processDefinitionId != null && processDefinitionKey != null) {
      String message = "Only one of processDefinitionId or processDefinitionKey should be set to update the suspension state.";
      throw new InvalidRequestException(Status.BAD_REQUEST, message);
    }

    RepositoryService repositoryService = engine.getRepositoryService();

    Date delayedExecutionDate = null;
    if (executionDate != null && !executionDate.equals("")) {
      delayedExecutionDate = DateTimeUtil.parseDate(executionDate);
    }

    if (processDefinitionId != null) {
      // activate/suspend process definition by id
      if (getSuspended()) {
        repositoryService.suspendProcessDefinitionById(processDefinitionId, includeProcessInstances, delayedExecutionDate);
      } else {
        repositoryService.activateProcessDefinitionById(processDefinitionId, includeProcessInstances, delayedExecutionDate);
      }
    } else

    if (processDefinitionKey != null) {
      // activate/suspend process definition by key
      if (getSuspended()) {
        repositoryService.suspendProcessDefinitionByKey(processDefinitionKey, includeProcessInstances, delayedExecutionDate);
      } else {
        repositoryService.activateProcessDefinitionByKey(processDefinitionKey, includeProcessInstances, delayedExecutionDate);
      }
    } else {
      String message = "Either processDefinitionId or processDefinitionKey should be set to update the suspension state.";
      throw new InvalidRequestException(Status.BAD_REQUEST, message);
    }
View Full Code Here

Examples of org.camunda.bpm.engine.RepositoryService

    if(caseDefinitionKey == null) {
      throw new InvalidRequestException(Status.BAD_REQUEST, "Query parameter 'caseDefinitionKey' cannot be null");
    }

    ProcessEngine engine = getProcessEngine();
    RepositoryService repositoryService = engine.getRepositoryService();
    CaseDefinitionQuery query = repositoryService.createCaseDefinitionQuery();

    query
      .caseDefinitionKey(caseDefinitionKey)
      .latestVersion();
View Full Code Here

Examples of org.drools.guvnor.client.rpc.RepositoryService

    }

    @Test
    public void testCopyAsset() throws Exception {
        RepositoryService impl = getServiceImplementation();
        RepositoryCategoryService repositoryCategoryService = getRepositoryCategoryService();
        repositoryCategoryService.createCategory( "/",
                                                  "templates",
                                                  "ya" );
        String uuid = impl.createNewRule( "testCopyAsset",
                                          "",
                                          "templates",
                                          RulesRepository.DEFAULT_PACKAGE,
                                          AssetFormats.DRL );
        RepositoryAssetService repositoryAssetService = getRepositoryAssetService();
View Full Code Here

Examples of org.drools.guvnor.client.rpc.RepositoryService

                      asset.name );
    }

    @Test
    public void testRemoveAsset() throws Exception {
        RepositoryService impl = getServiceImplementation();
        RepositoryPackageService repositoryPackageService = getRepositoryPackageService();
        RepositoryCategoryService repositoryCategoryService = getRepositoryCategoryService();
        String cat = "testRemoveAsset";
        repositoryCategoryService.createCategory( "/",
                                                  cat,
                                                  "ya" );
        String pkgUUID = repositoryPackageService.createPackage( "testRemoveAsset",
                                                                 "" );
        @SuppressWarnings("unused")
        String uuid = impl.createNewRule( "testRemoveAsset",
                                          "x",
                                          cat,
                                          "testRemoveAsset",
                                          "testRemoveAsset" );
        @SuppressWarnings("unused")
        String uuid2 = impl.createNewRule( "testRemoveAsset2",
                                           "x",
                                           cat,
                                           "testRemoveAsset",
                                           "testRemoveAsset" );
        @SuppressWarnings("unused")
        String uuid3 = impl.createNewRule( "testRemoveAsset3",
                                           "x",
                                           cat,
                                           "testRemoveAsset",
                                           "testRemoveAsset" );
        String uuid4 = impl.createNewRule( "testRemoveAsset4",
                                           "x",
                                           cat,
                                           "testRemoveAsset",
                                           "testRemoveAsset" );
        RepositoryAssetService repositoryAssetService = getRepositoryAssetService();
View Full Code Here

Examples of org.eclipse.egit.github.core.service.RepositoryService

        Object service = registry.lookupByName("githubRepositoryService");
        if (service != null) {
            LOG.debug("Using RepositoryService found in registry " + service.getClass().getCanonicalName());
            repositoryService = (RepositoryService) service;
        } else {
            repositoryService = new RepositoryService();
        }

        initService(repositoryService);
        repository = repositoryService.getRepository(endpoint.getRepoOwner(), endpoint.getRepoName());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.