Package org.apache.lenya.workflow

Examples of org.apache.lenya.workflow.WorkflowEngine


     *      java.lang.String, boolean)
     */
    public void invoke(Workflowable workflowable, String event, boolean force)
            throws WorkflowException {
        if (hasWorkflow(workflowable)) {
            WorkflowEngine engine = new WorkflowEngineImpl();
            Workflow workflow = getWorkflowSchema(workflowable);

            if (force && !engine.canInvoke(workflowable, workflow, event)) {
                throw new WorkflowException("The event [" + event
                        + "] cannot be invoked on the document [" + workflowable + "]");
            }
            engine.invoke(workflowable, workflow, event);
        }
    }
View Full Code Here


    public boolean canInvoke(Workflowable workflowable, String event) {
        boolean canInvoke = true;
        try {
            if (hasWorkflow(workflowable)) {
                Workflow workflow = getWorkflowSchema(workflowable);
                WorkflowEngine engine = new WorkflowEngineImpl();
                canInvoke = engine.canInvoke(workflowable, workflow, event);
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return canInvoke;
View Full Code Here

     *      java.lang.String, boolean)
     */
    public void invoke(Workflowable workflowable, String event, boolean force)
            throws WorkflowException {
        if (hasWorkflow(workflowable)) {
            WorkflowEngine engine = new WorkflowEngineImpl();
            Workflow workflow = getWorkflowSchema(workflowable);

            if (force && !engine.canInvoke(workflowable, workflow, event)) {
                throw new WorkflowException("The event [" + event
                        + "] cannot be invoked on the document [" + workflowable + "]");
            }
            engine.invoke(workflowable, workflow, event);
        }
    }
View Full Code Here

    public boolean canInvoke(Workflowable workflowable, String event) {
        boolean canInvoke = true;
        try {
            if (hasWorkflow(workflowable)) {
                Workflow workflow = getWorkflowSchema(workflowable);
                WorkflowEngine engine = new WorkflowEngineImpl();
                canInvoke = engine.canInvoke(workflowable, workflow, event);
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return canInvoke;
View Full Code Here

     *      java.lang.String, boolean)
     */
    public void invoke(Workflowable workflowable, String event, boolean force)
            throws WorkflowException {
        if (hasWorkflow(workflowable)) {
            WorkflowEngine engine = new WorkflowEngineImpl();
            Situation situation = getSituation();
            Workflow workflow = getWorkflowSchema(workflowable);

            if (force && !engine.canInvoke(workflowable, workflow, situation, event)) {
                throw new WorkflowException("The event [" + event
                        + "] cannot be invoked on the document [" + workflowable
                        + "] in the situation [" + situation + "]");
            }
            engine.invoke(workflowable, workflow, situation, event);
        }
    }
View Full Code Here

    public boolean canInvoke(Workflowable workflowable, String event) {
        boolean canInvoke = true;
        try {
            if (hasWorkflow(workflowable)) {
                Workflow workflow = getWorkflowSchema(workflowable);
                WorkflowEngine engine = new WorkflowEngineImpl();
                Situation situation = getSituation();
                canInvoke = engine.canInvoke(workflowable, workflow, situation, event);
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return canInvoke;
View Full Code Here

TOP

Related Classes of org.apache.lenya.workflow.WorkflowEngine

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.