Tabnine Logo
ProcessDefinitionService
Code IndexAdd Tabnine to your IDE (free)

How to use
ProcessDefinitionService
in
org.bonitasoft.engine.core.process.definition

Best Java code snippets using org.bonitasoft.engine.core.process.definition.ProcessDefinitionService (Showing top 20 results out of 315)

origin: bonitasoft/bonita-engine

public static SProcessDefinition getServerProcessDefinition(final long processDefinitionId, final ProcessDefinitionService processDefinitionService)
    throws SProcessDefinitionNotFoundException, SBonitaReadException {
  return processDefinitionService.getProcessDefinition(processDefinitionId);
}
origin: bonitasoft/bonita-engine

@Override
public void execute() throws SBonitaException {
  processDefinitionService.disableProcessDeploymentInfo(processDefinitionId);
  final SProcessDefinition processDefinition = processDefinitionService.getProcessDefinition(processDefinitionId);
  handleAutoLoginConfiguration(processDefinition);
  disableStartEvents(processDefinition);
  if (logger.isLoggable(this.getClass(), TechnicalLogSeverity.INFO)) {
    logger.log(this.getClass(), TechnicalLogSeverity.INFO, "The user <" + username + "> has disabled process <" + processDefinition.getName()
        + "> in version <" + processDefinition.getVersion() + "> with id <" + processDefinition.getId() + ">");
  }
}
origin: bonitasoft/bonita-engine

@Override
public void execute() throws SBonitaException {
  final SProcessDefinition sProcessDefinition = processDefinitionService.getProcessDefinition(processId);
  handleAutoLoginConfiguration(sProcessDefinition);
  handleStartEvents(sProcessDefinition);
  processDefinitionService.enableProcessDeploymentInfo(processId);
  if (logger.isLoggable(this.getClass(), TechnicalLogSeverity.INFO)) {
    logger.log(this.getClass(), TechnicalLogSeverity.INFO, "The user <" + userName + "> has enabled process <" + sProcessDefinition.getName()
        + "> in version <" + sProcessDefinition.getVersion() + "> with id <" + sProcessDefinition.getId() + ">");
  }
}
origin: bonitasoft/bonita-engine

private long getTargetProcessDefinitionId(final String callableElement, final String callableElementVersion) throws SBonitaReadException,
    SProcessDefinitionNotFoundException {
  if (callableElementVersion != null) {
    return processDefinitionService.getProcessDefinitionId(callableElement, callableElementVersion);
  }
  return processDefinitionService.getLatestProcessDefinitionId(callableElement);
}
origin: bonitasoft/bonita-engine

  @Override
  public void delete(long processDefinitionId) throws SProcessDefinitionNotFoundException, SObjectModificationException {
    try {
      final SProcessDefinition processDefinition = processDefinitionService.getProcessDefinition(processDefinitionId);
      businessArchiveArtifactsManager.deleteDependencies(processDefinition);
      processDefinitionService.delete(processDefinition.getId());
      classLoaderService.removeLocalClassLoader(ScopeType.PROCESS.name(), processDefinition.getId());
    } catch (SBonitaReadException | SProcessDeletionException | SDeletingEnabledProcessException | SRecorderException | SClassLoaderException e) {
      throw new SObjectModificationException("Unable to delete the process definition <" + processDefinitionId + ">", e);
    }
  }
}
origin: bonitasoft/bonita-engine

@Override
public BusinessArchive export(long processDefinitionId) throws SBonitaException, InvalidBusinessArchiveFormatException {
  final DesignProcessDefinition designProcessDefinition = processDefinitionService.getDesignProcessDefinition(processDefinitionId);
  return businessArchiveArtifactsManager.exportBusinessArchive(processDefinitionId, designProcessDefinition);
}
origin: bonitasoft/bonita-engine

@Override
public long executeCount(final QueryOptions searchOptions) throws SBonitaReadException {
  return processDefinitionService.getNumberOfProcessDeploymentInfos(searchOptions);
}
origin: bonitasoft/bonita-engine

private void executeGateway(final SProcessDefinition sProcessDefinition, final STransitionDefinition sTransitionDefinition,
    final SFlowNodeInstance flowNodeThatTriggeredTheTransition) throws SBonitaException {
  final long parentProcessInstanceId = flowNodeThatTriggeredTheTransition.getParentProcessInstanceId();
  final long rootProcessInstanceId = flowNodeThatTriggeredTheTransition.getRootProcessInstanceId();
  final SFlowNodeDefinition sFlowNodeDefinition = processDefinitionService.getNextFlowNode(sProcessDefinition, String.valueOf(sTransitionDefinition.getId()));
  try {
    List<SGatewayInstance> gatewaysToExecute = new ArrayList<>(1);
    final SProcessInstance parentProcessInstance = processInstanceService.getProcessInstance(parentProcessInstanceId);
    final SStateCategory stateCategory = parentProcessInstance.getStateCategory();
    final SGatewayInstance gatewayInstance = getActiveGatewayOrCreateIt(sProcessDefinition, sFlowNodeDefinition, stateCategory,
        parentProcessInstanceId,
        rootProcessInstanceId);
    gatewayInstanceService.hitTransition(gatewayInstance, sFlowNodeDefinition.getTransitionIndex(sTransitionDefinition.getId()));
    if (gatewayInstanceService.checkMergingCondition(sProcessDefinition, gatewayInstance)) {
      gatewaysToExecute.add(gatewayInstance);
      gatewaysToExecute.addAll(gatewayInstanceService.setFinishAndCreateNewGatewayForRemainingToken(sProcessDefinition, gatewayInstance));
    }
    for (final SGatewayInstance gatewayToExecute : gatewaysToExecute) {
      executeFlowNode(gatewayToExecute.getId(), null, null);
    }
  } catch (final SBonitaException e) {
    setExceptionContext(sProcessDefinition, flowNodeThatTriggeredTheTransition, e);
    logger.log(this.getClass(), TechnicalLogSeverity.ERROR, e);
    throw e;
  }
}
origin: bonitasoft/bonita-engine

@Override
public void execute() throws SBonitaException {
  this.processDefId = this.processDefinitionService.getLatestProcessDefinitionId(this.processName);
}
origin: bonitasoft/bonita-engine

  @Override
  public void delete(long processDefinitionId) throws SProcessDefinitionNotFoundException, SObjectModificationException {
    try {
      final SProcessDefinition processDefinition = processDefinitionService.getProcessDefinition(processDefinitionId);
      businessArchiveArtifactsManager.deleteDependencies(processDefinition);
      processDefinitionService.delete(processDefinition.getId());
      classLoaderService.removeLocalClassLoader(ScopeType.PROCESS.name(), processDefinition.getId());
    } catch (SBonitaReadException | SProcessDeletionException | SDeletingEnabledProcessException | SRecorderException | SClassLoaderException e) {
      throw new SObjectModificationException("Unable to delete the process definition <" + processDefinitionId + ">", e);
    }
  }
}
origin: bonitasoft/bonita-engine

private long getTargetProcessDefinitionId(final String callableElement, final String callableElementVersion) throws SBonitaReadException,
    SProcessDefinitionNotFoundException {
  if (callableElementVersion != null) {
    return processDefinitionService.getProcessDefinitionId(callableElement, callableElementVersion);
  }
  return processDefinitionService.getLatestProcessDefinitionId(callableElement);
}
origin: bonitasoft/bonita-engine

@Override
public BusinessArchive export(long processDefinitionId) throws SBonitaException, InvalidBusinessArchiveFormatException {
  final DesignProcessDefinition designProcessDefinition = processDefinitionService.getDesignProcessDefinition(processDefinitionId);
  return businessArchiveArtifactsManager.exportBusinessArchive(processDefinitionId, designProcessDefinition);
}
origin: bonitasoft/bonita-engine

@Override
public long executeCount(final QueryOptions searchOptions) throws SBonitaReadException {
  return processDefinitionService.getNumberOfProcessDeploymentInfos(userId, searchOptions, "UserSupervised");
}
origin: bonitasoft/bonita-engine

private void executeGateway(final SProcessDefinition sProcessDefinition, final STransitionDefinition sTransitionDefinition,
    final SFlowNodeInstance flowNodeThatTriggeredTheTransition) throws SBonitaException {
  final long parentProcessInstanceId = flowNodeThatTriggeredTheTransition.getParentProcessInstanceId();
  final long rootProcessInstanceId = flowNodeThatTriggeredTheTransition.getRootProcessInstanceId();
  final SFlowNodeDefinition sFlowNodeDefinition = processDefinitionService.getNextFlowNode(sProcessDefinition, String.valueOf(sTransitionDefinition.getId()));
  try {
    List<SGatewayInstance> gatewaysToExecute = new ArrayList<>(1);
    final SProcessInstance parentProcessInstance = processInstanceService.getProcessInstance(parentProcessInstanceId);
    final SStateCategory stateCategory = parentProcessInstance.getStateCategory();
    final SGatewayInstance gatewayInstance = getActiveGatewayOrCreateIt(sProcessDefinition, sFlowNodeDefinition, stateCategory,
        parentProcessInstanceId,
        rootProcessInstanceId);
    gatewayInstanceService.hitTransition(gatewayInstance, sFlowNodeDefinition.getTransitionIndex(sTransitionDefinition.getId()));
    if (gatewayInstanceService.checkMergingCondition(sProcessDefinition, gatewayInstance)) {
      gatewaysToExecute.add(gatewayInstance);
      gatewaysToExecute.addAll(gatewayInstanceService.setFinishAndCreateNewGatewayForRemainingToken(sProcessDefinition, gatewayInstance));
    }
    for (final SGatewayInstance gatewayToExecute : gatewaysToExecute) {
      executeFlowNode(gatewayToExecute.getId(), null, null);
    }
  } catch (final SBonitaException e) {
    setExceptionContext(sProcessDefinition, flowNodeThatTriggeredTheTransition, e);
    logger.log(this.getClass(), TechnicalLogSeverity.ERROR, e);
    throw e;
  }
}
origin: bonitasoft/bonita-engine

@Override
public void execute() throws SBonitaException {
  this.processDefId = this.processDefinitionService.getLatestProcessDefinitionId(this.processName);
}
origin: bonitasoft/bonita-engine

public static SProcessDefinition getServerProcessDefinition(final long processDefinitionId, final ProcessDefinitionService processDefinitionService)
    throws SProcessDefinitionNotFoundException, SBonitaReadException {
  return processDefinitionService.getProcessDefinition(processDefinitionId);
}
origin: bonitasoft/bonita-engine

@Override
public void execute() throws SBonitaException {
  processDefinitionService.disableProcessDeploymentInfo(processDefinitionId);
  final SProcessDefinition processDefinition = processDefinitionService.getProcessDefinition(processDefinitionId);
  handleAutoLoginConfiguration(processDefinition);
  disableStartEvents(processDefinition);
  if (logger.isLoggable(this.getClass(), TechnicalLogSeverity.INFO)) {
    logger.log(this.getClass(), TechnicalLogSeverity.INFO, "The user <" + username + "> has disabled process <" + processDefinition.getName()
        + "> in version <" + processDefinition.getVersion() + "> with id <" + processDefinition.getId() + ">");
  }
}
origin: bonitasoft/bonita-engine

@Override
public void execute() throws SBonitaException {
  final SProcessDefinition sProcessDefinition = processDefinitionService.getProcessDefinition(processId);
  handleAutoLoginConfiguration(sProcessDefinition);
  handleStartEvents(sProcessDefinition);
  processDefinitionService.enableProcessDeploymentInfo(processId);
  if (logger.isLoggable(this.getClass(), TechnicalLogSeverity.INFO)) {
    logger.log(this.getClass(), TechnicalLogSeverity.INFO, "The user <" + userName + "> has enabled process <" + sProcessDefinition.getName()
        + "> in version <" + sProcessDefinition.getVersion() + "> with id <" + sProcessDefinition.getId() + ">");
  }
}
origin: bonitasoft/bonita-engine

@Override
public DesignProcessDefinition getDesignProcessDefinition(final long processDefinitionId) throws ProcessDefinitionNotFoundException {
  try {
    return getTenantAccessor().getProcessDefinitionService().getDesignProcessDefinition(processDefinitionId);
  } catch (SBonitaReadException | SProcessDefinitionNotFoundException e) {
    throw new ProcessDefinitionNotFoundException(processDefinitionId, e);
  }
}
origin: bonitasoft/bonita-engine

@Override
public void execute() throws SBonitaException {
  numberOfProcesses = processDefinitionService.getNumberOfProcessDeploymentInfos();
}
org.bonitasoft.engine.core.process.definitionProcessDefinitionService

Most used methods

  • getProcessDefinition
    Get processDefinition by its id
  • delete
    Delete the id specified process definition and its deploy info
  • disableProcessDeploymentInfo
    Disable the process passed as parameter. If process is already disabled, this method fails with SPro
  • enableProcessDeploymentInfo
    Enable the specific process definition, set the process as ENABLED when it is in RESOLVED state. If
  • getDesignProcessDefinition
    Returns a specific process definition that include informations such as tasks definition, actors...
  • getLatestProcessDefinitionId
    Get the processDefinitionId of the most recent version of the process
  • getNextFlowNode
    Get target flow node for the given source flow node in the specific process
  • getNumberOfProcessDeploymentInfos
    Get number of all process definition deploy infos according to the specific search criteria
  • getNumberOfProcessDeploymentInfosCanBeStartedBy
    Get number of all process definitions for the specific user who can start
  • getNumberOfProcessDeploymentInfosCanBeStartedByUsersManagedBy
    Get number of all process definitions for the users managed by specific manager, or manager who can
  • getNumberOfProcessDeploymentInfosStartedBy
    Get number of all process deploy info started by the specific user
  • getNumberOfProcessDeploymentInfosUnrelatedToCategory
    Get number of SProcessDefinitionDeployInfos unrelated to the specific category
  • getNumberOfProcessDeploymentInfosStartedBy,
  • getNumberOfProcessDeploymentInfosUnrelatedToCategory,
  • getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasks,
  • getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor,
  • getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy,
  • getNumberOfUncategorizedProcessDeploymentInfos,
  • getNumberOfUncategorizedProcessDeploymentInfosCanBeStartedBy,
  • getNumberOfUncategorizedProcessDeploymentInfosSupervisedBy,
  • getNumberOfUsersWhoCanStartProcessDeploymentInfo,
  • getProcessDefinitionId

Popular in Java

  • Finding current android device location
  • getResourceAsStream (ClassLoader)
  • setRequestProperty (URLConnection)
  • getExternalFilesDir (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now