public static WebAPI getWebAPI() { return getAPIAccessor().getWebAPI(); }
public static WebAPI getWebAPI() { return getAPIAccessor().getWebAPI(); }
public Void execute(Environment environment) throws Exception { final APIAccessor accessor = new StandardAPIAccessorImpl(); final WebAPI webAPI = accessor.getWebAPI(); webAPI.removeLabels(new HashSet<String>(Arrays.asList(labelName))); return null; }
public Void execute(Environment environment) throws Exception { final APIAccessor accessor = new StandardAPIAccessorImpl(); final WebAPI webAPI = accessor.getWebAPI(); webAPI.removeLabels(new HashSet<String>(Arrays.asList(labelName))); return null; }
private void addCasesToLabel(String ownerName, String labelName, Set<ProcessInstanceUUID> instanceUUIDs) { if (instanceUUIDs != null && !instanceUUIDs.isEmpty()) { final APIAccessor accessor = new StandardAPIAccessorImpl(); accessor.getWebAPI().addCasesToLabel(ownerName, labelName, instanceUUIDs); } }
private void addCasesToLabel(String ownerName, String labelName, Set<ProcessInstanceUUID> instanceUUIDs) { if (instanceUUIDs != null && !instanceUUIDs.isEmpty()) { final APIAccessor accessor = new StandardAPIAccessorImpl(); accessor.getWebAPI().addCasesToLabel(ownerName, labelName, instanceUUIDs); } }
public void removeCasesFromLabel(String ownerName, String labelName, Set<ProcessInstanceUUID> instanceUUIDs) { if (instanceUUIDs != null && !instanceUUIDs.isEmpty()) { final APIAccessor accessor = new StandardAPIAccessorImpl(); accessor.getWebAPI().removeCasesFromLabel(ownerName, labelName, instanceUUIDs); } } }
public void removeCasesFromLabel(String ownerName, String labelName, Set<ProcessInstanceUUID> instanceUUIDs) { if (instanceUUIDs != null && !instanceUUIDs.isEmpty()) { final APIAccessor accessor = new StandardAPIAccessorImpl(); accessor.getWebAPI().removeCasesFromLabel(ownerName, labelName, instanceUUIDs); } } }
public Void execute(Environment environment) throws Exception { final APIAccessor accessor = new StandardAPIAccessorImpl(); final WebAPI webAPI = accessor.getWebAPI(); webAPI.removeAllLabelsExcept(labelNames); return null; }
public Void execute(Environment environment) throws Exception { final APIAccessor accessor = new StandardAPIAccessorImpl(); final WebAPI webAPI = accessor.getWebAPI(); webAPI.removeAllLabelsExcept(labelNames); return null; }
@Override public Void execute(final Environment environment) throws Exception { final APIAccessor accessor = new StandardAPIAccessorImpl(); if (instancesUUIDs != null && !instancesUUIDs.isEmpty()) { final WebAPI webAPI = accessor.getWebAPI(); final Set<ProcessInstanceUUID> uuids = new HashSet<ProcessInstanceUUID>(); final Set<String> instanceUuidsAsString = new HashSet<String>(); for (final ProcessInstanceUUID uuid : instancesUUIDs) { uuids.add(uuid); instanceUuidsAsString.add(uuid.getValue()); if (uuids.size() == 100) { webAPI.removeAllCasesFromLabels(uuids); uuids.clear(); instanceUuidsAsString.clear(); } } webAPI.removeAllCasesFromLabels(uuids); accessor.getRuntimeAPI().deleteProcessInstances(instancesUUIDs); } return null; }
@Override public Void execute(final Environment environment) throws Exception { final APIAccessor accessor = new StandardAPIAccessorImpl(); if (instancesUUIDs != null && !instancesUUIDs.isEmpty()) { final WebAPI webAPI = accessor.getWebAPI(); final Set<ProcessInstanceUUID> uuids = new HashSet<ProcessInstanceUUID>(); final Set<String> instanceUuidsAsString = new HashSet<String>(); for (final ProcessInstanceUUID uuid : instancesUUIDs) { uuids.add(uuid); instanceUuidsAsString.add(uuid.getValue()); if (uuids.size() == 100) { webAPI.removeAllCasesFromLabels(uuids); uuids.clear(); instanceUuidsAsString.clear(); } } webAPI.removeAllCasesFromLabels(uuids); accessor.getRuntimeAPI().deleteProcessInstances(instancesUUIDs); } return null; }
public Void execute(Environment environment) throws Exception { final APIAccessor accessor = new StandardAPIAccessorImpl(); accessor.getManagementAPI().deleteAllProcesses(); accessor.getWebAPI().deleteAllCases(); return null; }
public Void execute(Environment environment) throws Exception { final APIAccessor accessor = new StandardAPIAccessorImpl(); // get all parent instances that are of process with given UUID Set<LightProcessInstance> instances = accessor.getQueryRuntimeAPI().getLightProcessInstances(processUUID); // delete all cases of these instances (by group of 100 for perfs) final WebAPI webAPI = accessor.getWebAPI(); Set<ProcessInstanceUUID> uuids = new HashSet<ProcessInstanceUUID>(); for (LightProcessInstance instance : instances) { uuids.add(instance.getUUID()); if (uuids.size() == 100) { webAPI.removeAllCasesFromLabels(uuids); uuids.clear(); } } webAPI.removeAllCasesFromLabels(uuids); accessor.getManagementAPI().deleteProcess(processUUID); return null; }
public Void execute(Environment environment) throws Exception { final APIAccessor accessor = new StandardAPIAccessorImpl(); accessor.getManagementAPI().deleteAllProcesses(); accessor.getWebAPI().deleteAllCases(); return null; }
public Void execute(Environment environment) throws Exception { final APIAccessor accessor = new StandardAPIAccessorImpl(); // get all parent instances that are of process with given UUID Set<LightProcessInstance> instances = accessor.getQueryRuntimeAPI().getLightProcessInstances(processUUID); // delete all cases of these instances (by group of 100 for perfs) final WebAPI webAPI = accessor.getWebAPI(); Set<ProcessInstanceUUID> uuids = new HashSet<ProcessInstanceUUID>(); for (LightProcessInstance instance : instances) { uuids.add(instance.getUUID()); if (uuids.size() == 100) { webAPI.removeAllCasesFromLabels(uuids); uuids.clear(); } } webAPI.removeAllCasesFromLabels(uuids); accessor.getManagementAPI().deleteProcess(processUUID); return null; }
final APIAccessor accessor = new StandardAPIAccessorImpl(); final ManagementAPI managementAPI = accessor.getManagementAPI(); final WebAPI webAPI = accessor.getWebAPI();
final APIAccessor accessor = new StandardAPIAccessorImpl(); final ManagementAPI managementAPI = accessor.getManagementAPI(); final WebAPI webAPI = accessor.getWebAPI();
public Void execute(Environment environment) throws Exception { final APIAccessor accessor = new StandardAPIAccessorImpl(); if (processUUIDs != null && !processUUIDs.isEmpty()) { // get all parent instances that are of process with given UUID final QueryRuntimeAPI queryRuntimeAPI = accessor.getQueryRuntimeAPI(); Set<LightProcessInstance> instances = queryRuntimeAPI.getLightWeightProcessInstances(processUUIDs); // delete all cases of these instances (by group of 100 for perfs ?) final WebAPI webAPI = accessor.getWebAPI(); Set<ProcessInstanceUUID> uuids = new HashSet<ProcessInstanceUUID>(); for (LightProcessInstance instance : instances) { uuids.add(instance.getUUID()); deleteAttachments(instance.getProcessDefinitionUUID()); if (uuids.size() == 100) { webAPI.removeAllCasesFromLabels(uuids); uuids.clear(); } } webAPI.removeAllCasesFromLabels(uuids); final RuntimeAPI runtimeAPI = accessor.getRuntimeAPI(); runtimeAPI.deleteAllProcessInstances(processUUIDs); } return null; }
public Void execute(Environment environment) throws Exception { final APIAccessor accessor = new StandardAPIAccessorImpl(); if (processUUIDs != null && !processUUIDs.isEmpty()) { // get all parent instances that are of process with given UUID final QueryRuntimeAPI queryRuntimeAPI = accessor.getQueryRuntimeAPI(); Set<LightProcessInstance> instances = queryRuntimeAPI.getLightWeightProcessInstances(processUUIDs); // delete all cases of these instances (by group of 100 for perfs ?) final WebAPI webAPI = accessor.getWebAPI(); Set<ProcessInstanceUUID> uuids = new HashSet<ProcessInstanceUUID>(); for (LightProcessInstance instance : instances) { uuids.add(instance.getUUID()); deleteAttachments(instance.getProcessDefinitionUUID()); if (uuids.size() == 100) { webAPI.removeAllCasesFromLabels(uuids); uuids.clear(); } } webAPI.removeAllCasesFromLabels(uuids); final RuntimeAPI runtimeAPI = accessor.getRuntimeAPI(); runtimeAPI.deleteAllProcessInstances(processUUIDs); } return null; }