Package org.apache.lenya.workflow

Examples of org.apache.lenya.workflow.WorkflowException


            saveVariables(helper);

            DocumentHelper.writeDocument(xmlDocument, getHistoryFile());
        } catch (Exception e) {
            throw new WorkflowException(e);
        }
    }
View Full Code Here


                    parent.appendChild(element);
                }

                element.setAttribute(VALUE_ATTRIBUTE, Boolean.toString(value));
            } catch (TransformerException e) {
                throw new WorkflowException(e);
            }
        }
    }
View Full Code Here

            FileChannel destinationChannel = new FileOutputStream(newFile).getChannel();
            destinationChannel.transferFrom(sourceChannel, 0, sourceChannel.size());
            sourceChannel.close();
            destinationChannel.close();
        } catch (IOException e) {
            throw new WorkflowException(e);
        }
    }
View Full Code Here

            Class clazz = Class.forName(className);
            condition = (Condition) clazz.newInstance();
            ContainerUtil.enableLogging(condition, getLogger());
            condition.setExpression(expression);
        } catch (ClassNotFoundException e) {
            throw new WorkflowException(e);
        } catch (InstantiationException e) {
            throw new WorkflowException(e);
        } catch (IllegalAccessException e) {
            throw new WorkflowException(e);
        }

        return condition;
    }
View Full Code Here

     */
    public void setExpression(String expression) throws WorkflowException {
        super.setExpression(expression);
        String[] sides = expression.split("=");
        if (sides.length != 2) {
            throw new WorkflowException("The expression '" + expression
                    + "' must be of the form 'name = [true|false]'");
        }

        this.variableName = sides[0].trim();
        this.value = Boolean.valueOf(sides[1].trim()).booleanValue();
View Full Code Here

        try {
            wfManager = (WorkflowManager) manager.lookup(WorkflowManager.ROLE);
            Workflowable workflowable = new DocumentWorkflowable(document, logger);
            wfManager.invoke(workflowable, event);
        } catch (ServiceException e) {
            throw new WorkflowException(e);
        } finally {
            if (wfManager != null) {
                manager.release(wfManager);
            }
        }
View Full Code Here

        try {
            Document document = DocumentHelper.readDocument(file);
            workflow = buildWorkflow(name, document);
        } catch (Exception e) {
            throw new WorkflowException(e);
        }

        return workflow;
    }
View Full Code Here

        try {
            wfManager = (WorkflowManager) manager.lookup(WorkflowManager.ROLE);
            Workflowable workflowable = new DocumentWorkflowable(document, logger);
            wfManager.invoke(workflowable, event, force);
        } catch (ServiceException e) {
            throw new WorkflowException(e);
        } finally {
            if (wfManager != null) {
                manager.release(wfManager);
            }
        }
View Full Code Here

                Workflowable workflowable = new DocumentWorkflowable(documents[i], logger);
                wfManager.invoke(workflowable, event, force);
            }

        } catch (ServiceException e) {
            throw new WorkflowException(e);
        } finally {
            if (wfManager != null) {
                manager.release(wfManager);
            }
        }
View Full Code Here

        try {
            wfManager = (WorkflowManager) manager.lookup(WorkflowManager.ROLE);
            Workflowable workflowable = new DocumentWorkflowable(document, logger);
            return wfManager.canInvoke(workflowable, event);
        } catch (ServiceException e) {
            throw new WorkflowException(e);
        } finally {
            if (wfManager != null) {
                manager.release(wfManager);
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.lenya.workflow.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.