private Set<ProcessDefinition> getProcessCopy(Set<ProcessDefinition> src) { Set<ProcessDefinition> result = new HashSet<ProcessDefinition>(); if (src != null) { for (ProcessDefinition p : src) { result.add(new ProcessDefinitionImpl(p)); } } return result; }
private Set<ProcessDefinition> getProcessCopy(final Set<ProcessDefinition> src) { final Set<ProcessDefinition> result = new HashSet<ProcessDefinition>(); if (src != null) { for (final ProcessDefinition p : src) { result.add(new ProcessDefinitionImpl(p)); } } return result; }
@Override public ProcessDefinition getProcess(final ProcessDefinitionUUID processUUID) throws ProcessNotFoundException { final InternalProcessDefinition process = getInternalProcess(processUUID); return new ProcessDefinitionImpl(process); }
@Override public List<ProcessDefinition> getProcesses(final int fromIndex, final int pageSize) { final List<ProcessDefinition> result = new ArrayList<ProcessDefinition>(); if (pageSize <= 0) { return result; } final List<InternalProcessDefinition> processes = getIndexedProcesses(fromIndex, pageSize, ProcessDefinitionCriterion.DEFAULT); for (final ProcessDefinition record : processes) { result.add(new ProcessDefinitionImpl(record)); } return result; }
private ProcessBuilder(final String processame, final String processVersion) { problems = new ArrayList<Problem>(); stack = new Stack<Object>(); Misc.checkArgsNotNull(processame); ProcessDefinition process = null; if ("".equals(processame.trim())) { problems.add(new Problem("Process name is an empty string.", Problem.SEVERITY_ERROR)); } if (processVersion == null || "".equals(processVersion.trim())) { process = new ProcessDefinitionImpl(processame, "1.0"); } else { process = new ProcessDefinitionImpl(processame, processVersion); } push(process); }
private ProcessBuilder(final String processame, final String processVersion) { problems = new ArrayList<Problem>(); stack = new Stack<Object>(); Misc.checkArgsNotNull(processame); ProcessDefinition process = null; if ("".equals(processame.trim())) { problems.add(new Problem("Process name is an empty string.", Problem.SEVERITY_ERROR)); } if (processVersion == null || "".equals(processVersion.trim())) { process = new ProcessDefinitionImpl(processame, "1.0"); } else { process = new ProcessDefinitionImpl(processame, processVersion); } push(process); }
public ProcessDefinition getLastProcess(String packageId, String processId) throws ProcessNotFoundException { FacadeUtil.checkArgsNotNull(processId); ProcessFullDefinition last = EnvTool.getAllQueriers().getLastDeployedProcess(packageId, processId, ProcessDefinition.ProcessState.DEPLOYED); if (last == null) { throw new ProcessNotFoundException(processId); } return new ProcessDefinitionImpl(last); }
public ProcessDefinition getProcess(ProcessDefinitionUUID processUUID) throws ProcessNotFoundException { FacadeUtil.checkArgsNotNull(processUUID); ProcessFullDefinition process = EnvTool.getAllQueriers().getProcess(processUUID); if (process == null) { throw new ProcessNotFoundException(processUUID); } return new ProcessDefinitionImpl(process); }
public ProcessDefinition getProcess(String packageId, String processId, String processVersion) throws ProcessNotFoundException { FacadeUtil.checkArgsNotNull(packageId, processId, processVersion); ProcessFullDefinition process = EnvTool.getAllQueriers().getProcess(packageId, processId, processVersion); if (process == null) { throw new ProcessNotFoundException(processId, processVersion); } return new ProcessDefinitionImpl(process); }
if (BonitaConstants.PROCESS_DEFINITION.equals(name)) { if (clientProcessDefinition == null && processUUID != null) { clientProcessDefinition = new ProcessDefinitionImpl(EnvTool.getAllQueriers().getProcess(processUUID));
public static Object getInjectedVariable(final String variable, final ProcessDefinitionUUID processUUID, final ProcessInstanceUUID instanceUUID, final ActivityInstanceUUID activityInstanceUUID) { if (BonitaConstants.PROCESS_DEFINITION.equals(variable) && processUUID != null) { return new ProcessDefinitionImpl(EnvTool.getAllQueriers().getProcess(processUUID)); } if (BonitaConstants.PROCESS_INSTANCE.equals(variable) && instanceUUID != null) { return new ProcessInstanceImpl(EnvTool.getAllQueriers().getProcessInstance(instanceUUID)); } if (BonitaConstants.ACTIVITY_INSTANCE.equals(variable) && activityInstanceUUID != null) { return new ActivityInstanceImpl(EnvTool.getAllQueriers().getActivityInstance(activityInstanceUUID)); } if (BonitaConstants.LOGGED_USER.equals(variable)) { try { return EnvTool.getUserId(); } catch (final Throwable e) { return null; } } if (BonitaConstants.API_ACCESSOR.equals(variable)) { return new StandardAPIAccessorImpl(); } if (BonitaConstants.PROCESS_INSTANCE_INITIATOR.equals(variable)) { if (instanceUUID != null) { final InternalProcessInstance processInstance = EnvTool.getAllQueriers().getProcessInstance(instanceUUID); return processInstance.getStartedBy(); } } return null; }
public ProcessDefinition getPackageProcess(PackageDefinitionUUID packageDefinitionUUID, String processId) throws PackageNotFoundException, ProcessNotFoundException { FacadeUtil.checkArgsNotNull(packageDefinitionUUID, processId); ProcessDefinition process = EnvTool.getAllQueriers().getPackageProcess(packageDefinitionUUID, processId); if (process == null) { if (EnvTool.getAllQueriers().getPackage(packageDefinitionUUID) == null) { throw new PackageNotFoundException(packageDefinitionUUID); } throw new ProcessNotFoundException(processId, packageDefinitionUUID); } return new ProcessDefinitionImpl(process); }
throw new ProcessNotFoundException("bai_QDAPII_2", processId); return new ProcessDefinitionImpl(last);
@Override public ProcessDefinition getProcess(final String processId, final String processVersion) throws ProcessNotFoundException { FacadeUtil.checkArgsNotNull(processId, processVersion); final ProcessDefinition process = EnvTool.getAllQueriers(getQueryList()).getProcess(processId, processVersion); if (process == null) { throw new ProcessNotFoundException(processId, processVersion); } final boolean access = EnvTool.isRestrictedApplicationAcces(); if (access) { final String applicationName = EnvTool.getApplicationAccessName(); if (applicationName == null) { throw new ProcessNotFoundException(processId, processVersion); } final Set<ProcessDefinitionUUID> visibleProcessUUIDs = FacadeUtil.getAllowedProcessUUIDsFor(applicationName, RuleType.PROCESS_READ); if (visibleProcessUUIDs == null || !visibleProcessUUIDs.contains(process.getUUID())) { throw new ProcessNotFoundException(processId, processVersion); } } return new ProcessDefinitionImpl(process); }
Map<String, ProcessDefinition> result = new HashMap<String, ProcessDefinition>(); for (ProcessDefinition process : processes) { result.put(process.getProcessId(), new ProcessDefinitionImpl(process));
Thread.currentThread().setContextClassLoader(current); return new ProcessDefinitionImpl(internalProcess); } catch (final RuntimeException re) { EnvTool.getClassDataLoader().removeProcessClassLoader(processUUID);