Package org.openengsb.core.workflow.api

Examples of org.openengsb.core.workflow.api.WorkflowException


            factHandle = session.insert(event);
            workflowLock.lock();
            try {
                session.fireAllRules();
            } catch (ConsequenceException e) {
                throw new WorkflowException("ConsequenceException occured while processing event", e.getCause());
            } finally {
                workflowLock.unlock();
            }

            Set<Long> processIds = retrieveRelevantProcessInstanceIds(event, session);
View Full Code Here


        parameterMap.put("processBag", parameters);
        long id = startFlowWithParameters(processId, parameterMap);
        try {
            waitForFlowToFinishIndefinitely(id);
        } catch (InterruptedException e) {
            throw new WorkflowException(e);
        }
        return parameters;
    }
View Full Code Here

    @Override
    public long startFlowWithParameters(String processId, Map<String, Object> parameterMap) throws WorkflowException {
        try {
            return startFlowInBackground(processId, parameterMap).get();
        } catch (InterruptedException e) {
            throw new WorkflowException(e);
        } catch (ExecutionException e) {
            throw new WorkflowException("unable to start workflow " + processId, e.getCause());
        }
    }
View Full Code Here

        StringBuffer ruleCode = generateFlowTriggerRule(event, flowIds);
        LOGGER.info("adding new rule with id: {}", ruleName);
        try {
            rulemanager.add(new RuleBaseElementId(RuleBaseElementType.Rule, ruleName), ruleCode.toString());
        } catch (RuleBaseException e) {
            throw new WorkflowException(e);
        }
    }
View Full Code Here

    private Object getPropertyValue(Event event, Method getter) throws WorkflowException {
        try {
            return getter.invoke(event);
        } catch (Exception e) {
            throw new WorkflowException("Cannot invoke getter '" + getter + "' of event class '" + event.getClass()
                    + "'.", e);
        }
    }
View Full Code Here

            BeanInfo eventInfo = Introspector.getBeanInfo(Event.class);
            result.removeAll(Arrays.asList(eventInfo.getPropertyDescriptors()));

            return result;
        } catch (IntrospectionException ie) {
            throw new WorkflowException("Cannot introspect event class " + clazz, ie);
        }
    }
View Full Code Here

        }
        StatefulKnowledgeSession session;
        try {
            session = createSession();
        } catch (RuleBaseException e) {
            throw new WorkflowException(e);
        }
        sessions.put(currentContextId, session);
        return session;
    }
View Full Code Here

        for (Map.Entry<String, String> global : globals.entrySet()) {
            Class<?> globalClass;
            try {
                globalClass = bundleContext.getBundle().loadClass(global.getValue());
            } catch (ClassNotFoundException e) {
                throw new WorkflowException(String.format("Could not load class for global (%s)", global), e);
            }
            Filter filter =
                OsgiUtils.getFilterForLocation(globalClass, global.getKey(),
                    ContextHolder.get().getCurrentContextId());
            Object osgiServiceProxy = utilsService.getOsgiServiceProxy(filter, globalClass);
View Full Code Here

        if (old.size() > 0) {
            try {
                updateInRunningWorkflow(old.get(0), task);
                persistence.delete(t);
            } catch (PersistenceException e) {
                throw new WorkflowException(e);
            }

            workflowService.processEvent(finishedEvent);
            LOGGER.info("finished task {}", task.getTaskId());
        } else {
View Full Code Here

            persistence.update(oldTask, task);
            updateInRunningWorkflow(oldTask, task);
            LOGGER.info("updated task {}", task.getTaskId());
        } catch (PersistenceException e) {
            LOGGER.error("tried to update task {}, but it didnt work!", task.getTaskId());
            throw new WorkflowException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.openengsb.core.workflow.api.WorkflowException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.