dbUpgradeStep = (DbUpgradeStep) ReflectUtil.instantiate(upgradestepClassName); } catch (ActivitiException e) { throw new ActivitiException("database update java class '" + upgradestepClassName + "' can't be instantiated: " + e.getMessage(), e);
LOGGER.warn("Exception while executing " + execution.getCurrentFlowElement().getId() + " : " + e.getMessage());
handleException(execution, e.getMessage(), e, doIgnoreException, exceptionVariable); } catch (EmailException e) { handleException(execution, "Could not send e-mail in execution " + execution.getId(), e, doIgnoreException, exceptionVariable);
} catch (ActivitiException e) { name = activeTaskName; LOGGER.warn("property not found in task name expression " + e.getMessage()); } catch (ActivitiException e) { description = activeTaskDescription; LOGGER.warn("property not found in task description expression " + e.getMessage());
dbUpgradeStep = (DbUpgradeStep) ReflectUtil.instantiate(upgradestepClassName); } catch (ActivitiException e) { throw new ActivitiException("database update java class '"+upgradestepClassName+"' can't be instantiated: "+e.getMessage(), e);
dbUpgradeStep = (DbUpgradeStep) ReflectUtil.instantiate(upgradestepClassName); } catch (ActivitiException e) { throw new ActivitiException("database update java class '"+upgradestepClassName+"' can't be instantiated: "+e.getMessage(), e);
public void buttonClick(ClickEvent event) { try { managementService.executeJob(job.getId()); jobPage.refreshSelectNext(); } catch (ActivitiException ae) { String errorMessage = ae.getMessage() + (ae.getCause() != null ? " (" + ae.getCause().getClass().getName() + ")" : ""); notificationManager.showErrorNotification(Messages.JOB_ERROR, errorMessage); // Refresh the current job jobPage.refreshCurrentJobDetails(); } } });
String errorMsg = e.getMessage().replace(System.getProperty("line.separator"), "<br/>"); notificationManager.showErrorNotification(Messages.DEPLOYMENT_UPLOAD_FAILED, errorMsg); throw e;
protected void handleActivitiException(org.activiti.engine.ActivitiException e) { if (e instanceof org.activiti.engine.delegate.BpmnError) { org.activiti.engine.delegate.BpmnError activiti5BpmnError = (org.activiti.engine.delegate.BpmnError) e; throw new BpmnError(activiti5BpmnError.getErrorCode(), activiti5BpmnError.getMessage()); } else if (e instanceof org.activiti.engine.ActivitiClassLoadingException) { throw new FlowableClassLoadingException(e.getMessage(), e.getCause()); } else if (e instanceof org.activiti.engine.ActivitiObjectNotFoundException) { org.activiti.engine.ActivitiObjectNotFoundException activiti5ObjectNotFoundException = (org.activiti.engine.ActivitiObjectNotFoundException) e; throw new FlowableObjectNotFoundException(activiti5ObjectNotFoundException.getMessage(), activiti5ObjectNotFoundException.getObjectClass(), activiti5ObjectNotFoundException.getCause()); } else if (e instanceof org.activiti.engine.ActivitiOptimisticLockingException) { throw new FlowableOptimisticLockingException(e.getMessage()); } else if (e instanceof org.activiti.engine.ActivitiIllegalArgumentException) { throw new FlowableIllegalArgumentException(e.getMessage(), e.getCause()); } else { if (e.getCause() instanceof org.activiti.engine.ActivitiClassLoadingException) { throw new FlowableException(e.getMessage(), new FlowableClassLoadingException(e.getCause().getMessage(), e.getCause().getCause())); } else if (e.getCause() instanceof org.activiti.engine.ActivitiException) { throw new FlowableException(e.getMessage(), new FlowableException(e.getCause().getMessage(), e.getCause().getCause())); } else { throw new FlowableException(e.getMessage(), e.getCause()); } } }
public void execute(ActivityExecution execution) throws Exception { ScriptingEngines scriptingEngines = Context .getProcessEngineConfiguration() .getScriptingEngines(); boolean noErrors = true; try { Object result = scriptingEngines.evaluate(script, language, execution, storeScriptVariables); if (resultVariable != null) { execution.setVariable(resultVariable, result); } } catch (ActivitiException e) { LOGGER.warn("Exception while executing " + execution.getActivity().getId() + " : " + e.getMessage()); noErrors = false; if (e.getCause() instanceof ScriptException && e.getCause().getCause() instanceof ScriptException && e.getCause().getCause().getCause() instanceof BpmnError) { ErrorPropagation.propagateError((BpmnError) e.getCause().getCause().getCause(), execution); } else { throw e; } } if (noErrors) { leave(execution); } }
@Override public void printInstanceData(PrintWriter out, boolean verbose, boolean quite, HistoricProcessInstance hpi) { this.setVerbose(verbose); this.setQuiet(quite); List<HistoricDetail> varList = null; try { varList = this.processEngine.getHistoryService().createHistoricDetailQuery() .variableUpdates().processInstanceId(hpi.getId()).orderByTime().desc().list(); } catch (ActivitiException ex) { // silent about the error. and log it. LOG.log(Level.INFO, "Error in getting process variables. " + ex.getMessage(), ex); } if (varList != null && varList.size() > 0) { out.println("-------- Instance Variables "); printVariables(out, varList); } else { LOG.info("------ No Instance Variables! for " + hpi.getId()); } }
@Override public void printInstanceData(PrintWriter out, boolean verbose, boolean quite, HistoricProcessInstance hpi) { this.setVerbose(verbose); this.setQuiet(quite); List<HistoricDetail> varList = null; try { varList = this.processEngine.getHistoryService().createHistoricDetailQuery() .variableUpdates().processInstanceId(hpi.getId()).orderByTime().desc().list(); } catch (ActivitiException ex) { // silent about the error. and log it. LOG.log(Level.INFO, "Error in getting process variables. " + ex.getMessage(), ex); } if (varList != null && varList.size() > 0) { out.println("-------- Instance Variables "); printVariables(out, varList); } else { LOG.info("------ No Instance Variables! for " + hpi.getId()); } }
@Override public void printActivityData(PrintWriter out, boolean verbose, boolean quite, HistoricActivityInstance actInst) { this.setVerbose(verbose); this.setQuiet(quite); if (quite) { // don't print activity variable update per activity return; } List<HistoricDetail> varList = null; try { varList = this.processEngine.getHistoryService().createHistoricDetailQuery() .variableUpdates().activityInstanceId(actInst.getId()).orderByTime().desc().list(); } catch (ActivitiException ex) { //silent about the error. and log it. LOG.log(Level.INFO, "Error in getting process variables. " + ex.getMessage(), ex); } if (varList != null && varList.size() > 0) { out.println("-------- Task Variables"); printVariables(out, varList); } else { LOG.info("------ No Task Variables! for " + actInst.getActivityId()); } }
@Override public void printActivityData(PrintWriter out, boolean verbose, boolean quite, HistoricActivityInstance actInst) { this.setVerbose(verbose); this.setQuiet(quite); if (quite) { // don't print activity variable update per activity return; } List<HistoricDetail> varList = null; try { varList = this.processEngine.getHistoryService().createHistoricDetailQuery() .variableUpdates().activityInstanceId(actInst.getId()).orderByTime().desc().list(); } catch (ActivitiException ex) { //silent about the error. and log it. LOG.log(Level.INFO, "Error in getting process variables. " + ex.getMessage(), ex); } if (varList != null && varList.size() > 0) { out.println("-------- Task Variables"); printVariables(out, varList); } else { LOG.info("------ No Task Variables! for " + actInst.getActivityId()); } }
public void buttonClick(ClickEvent event) { try { taskService.claim(taskId, ExplorerApp.get().getLoggedInUser().getId()); notificationManager.showInformationNotification(Messages.TASK_CLAIM_SUCCESS); viewManager.showInboxPage(taskId); } catch(ActivitiException ae) { notificationManager.showErrorNotification(Messages.TASK_CLAIM_FAILED, ae.getMessage()); } }
LOGGER.warn("Exception while executing " + execution.getCurrentFlowElement().getId() + " : " + e.getMessage());
LOGGER.warn("Exception while executing {} : {}", activityExecution.getActivity().getId(), e.getMessage());
private boolean isAmongCandidates(MidPointPrincipal principal, String taskId) { String currentUserOid = principal.getOid(); List<IdentityLink> identityLinks; try { TaskService taskService = activitiEngine.getTaskService(); // working around activiti bug, see MID-3799.6 (the NPE when task does not exist) org.activiti.engine.task.Task task = taskService.createTaskQuery() .taskId(taskId) .singleResult(); if (task == null) { return false; } identityLinks = taskService.getIdentityLinksForTask(taskId); } catch (ActivitiException e) { throw new SystemException("Couldn't determine user authorization, because the task candidate users and groups couldn't be retrieved: " + e.getMessage(), e); } for (IdentityLink identityLink : identityLinks) { if (identityLink.getUserId() != null && identityLink.getUserId().equals(currentUserOid)) { return true; } if (identityLink.getGroupId() != null) { if (isMemberOfActivitiGroup(principal.getUser(), identityLink.getGroupId())) { return true; } } } return false; }
handleException(execution, e.getMessage(), e, doIgnoreException, exceptionVariable); } catch (EmailException e) { handleException(execution, "Could not send e-mail in execution " + execution.getId(), e, doIgnoreException, exceptionVariable);
handleException(execution, e.getMessage(), e, doIgnoreException, exceptionVariable); } catch (EmailException e) { handleException(execution, "Could not send e-mail in execution " + execution.getId(), e, doIgnoreException, exceptionVariable);