@Override public Boolean checkUserCredentials(final String username, final String password, final Map<String, String> options) throws RemoteException { return getAPI(options).checkUserCredentials(username, password); }
@Override public void deleteAllProcesses(final Map<String, String> options) throws UndeletableInstanceException, RemoteException, UndeletableProcessException { getAPI(options).deleteAllProcesses(); }
@Override public void deleteProcess(final ProcessDefinitionUUID processUUID, final Map<String, String> options) throws ProcessNotFoundException, UndeletableProcessException, UndeletableInstanceException { getAPI(options).deleteProcess(processUUID); }
public Long execute(Environment environment) throws Exception { long newProcessInstanceNb; final String metaName = getMetadataName(processUUID); StandardAPIAccessorImpl accessor = new StandardAPIAccessorImpl(); final ManagementAPI managementAPI = accessor.getManagementAPI(); long lastInMemory = 0; final Long uuidValue = getUUIDValue(processUUID); if (uuidValue != null) { lastInMemory = uuidValue; } if (LOG.isLoggable(Level.FINE)) { LOG.fine("Last process instance number found in memory: " + lastInMemory); } long lastInDb = 0; final String metadataValue = managementAPI.getMetaData(metaName); if (metadataValue != null) { lastInDb = Long.valueOf(metadataValue); } if (LOG.isLoggable(Level.FINE)) { LOG.fine("Last process instance number found in database: " + lastInDb); } newProcessInstanceNb = Math.max(lastInDb, lastInMemory) + 1; setUUIDValue(processUUID, newProcessInstanceNb); managementAPI.addMetaData(metaName, Long.toString(newProcessInstanceNb)); return newProcessInstanceNb; } }
final List<Rule> applicableRules = managementAPI.getApplicableRules(RuleType.PROCESS_MANAGE, userUUID, roleUUIDs, groupUUIDs, membershipUUIDs, entityID); for (final Rule rule : applicableRules) { processUUIDs.add(new ProcessDefinitionUUID(processUUID)); final PrivilegePolicy processStartPolicy = managementAPI.getRuleTypePolicy(RuleType.PROCESS_MANAGE); switch (processStartPolicy) { case ALLOW_BY_DEFAULT:
@Override public ProcessDefinition deploy(final BusinessArchive businessArchive, final Map<String, String> options) throws DeploymentException { return getAPI(options).deploy(businessArchive); }
public List<Rule> getApplicableRules(RuleType ruleType, String userUUID, List<String> roleUUIDs, List<String> groupUUIDs, List<String> membershipUUIDs, String entityID, Map<String, String> options) throws RemoteException { return getAPI(options).getApplicableRules(ruleType, userUUID, roleUUIDs, groupUUIDs, membershipUUIDs, entityID); }
@Override public PrivilegePolicy getRuleTypePolicy(final RuleType ruleType, final Map<String, String> options) throws RemoteException { return getAPI(options).getRuleTypePolicy(ruleType); }
@Override public void archive(final Collection<ProcessDefinitionUUID> processUUIDs, final Map<String, String> options) throws DeploymentException, RemoteException { getAPI(options).archive(processUUIDs); }
@Override public void applyRuleToEntities(final String ruleUUID, final Collection<String> userUUIDs, final Collection<String> roleUUIDs, final Collection<String> groupUUIDs, final Collection<String> membershipUUIDs, final Collection<String> entityIDs, final Map<String, String> options) throws RuleNotFoundException, RemoteException { getAPI(options).applyRuleToEntities(ruleUUID, userUUIDs, roleUUIDs, groupUUIDs, membershipUUIDs, entityIDs); }
public <E extends AbstractUUID> void addExceptionsToRuleByUUID(final String ruleUUID, final Set<E> exceptions, final Map<String, String> options) throws RuleNotFoundException, RemoteException { getAPI(options).addExceptionsToRuleByUUID(ruleUUID, exceptions); }
@Override public void addMetaData(final String key, final String value, final Map<String, String> options) throws RemoteException { getAPI(options).addMetaData(key, value); }
final List<Rule> applicableRules = managementAPI.getApplicableRules(RuleType.PROCESS_READ, userUUID, roleUUIDs, groupUUIDs, membershipUUIDs, entityID); for (final Rule rule : applicableRules) { processUUIDs.add(new ProcessDefinitionUUID(processUUID)); final PrivilegePolicy processStartPolicy = managementAPI.getRuleTypePolicy(RuleType.PROCESS_READ); switch (processStartPolicy) { case ALLOW_BY_DEFAULT:
public Map<String, ProcessDefinition> deploy(URL xpdlURL, Class< ? >[] classes) throws DeploymentException { return getAPI().deploy(xpdlURL, classes); } public Map<String, ProcessDefinition> deployXpdl(URL xpdlURL) throws DeploymentException {
@Override public List<Rule> getApplicableRules(final RuleType ruleType, final String userUUID, final Collection<String> roleUUIDs, final Collection<String> groupUUIDs, final Collection<String> membershipUUIDs, final String entityID, final Map<String, String> options) throws RemoteException { return getAPI(options).getApplicableRules(ruleType, userUUID, roleUUIDs, groupUUIDs, membershipUUIDs, entityID); }
@Override public void archive(final ProcessDefinitionUUID processUUID, final Map<String, String> options) throws DeploymentException { getAPI(options).archive(processUUID); }
public void applyRuleToEntities(String ruleUUID, List<String> userUUIDs, List<String> roleUUIDs, List<String> groupUUIDs, List<String> membershipUUIDs, List<String> entityIDs, Map<String, String> options) throws RuleNotFoundException, RemoteException { getAPI(options).applyRuleToEntities(ruleUUID, userUUIDs, roleUUIDs, groupUUIDs, membershipUUIDs, entityIDs); }
@SuppressWarnings("unchecked") public <E extends AbstractUUID> void addExceptionsToRuleByUUID( String ruleUUID, RESTSet exceptions, Map<String, String> options) throws RuleNotFoundException, RemoteException { getAPI(options).addExceptionsToRuleByUUID(ruleUUID, (Set<E>)exceptions.getSet()); }
final List<Rule> applicableRules = managementAPI.getApplicableRules(RuleType.PROCESS_READ, userUUID, roleUUIDs, groupUUIDs, membershipUUIDs, entityID); for (final Rule rule : applicableRules) { processUUIDs.add(new ProcessDefinitionUUID(processUUID)); final PrivilegePolicy processStartPolicy = managementAPI.getRuleTypePolicy(RuleType.PROCESS_READ); switch (processStartPolicy) { case ALLOW_BY_DEFAULT:
public Void execute(Environment environment) throws Exception { final APIAccessor accessor = new StandardAPIAccessorImpl(); accessor.getManagementAPI().deleteAllProcesses(); accessor.getWebAPI().deleteAllCases(); return null; }