Package org.apache.lenya.workflow

Examples of org.apache.lenya.workflow.Transition


    /**
     * @see org.apache.lenya.workflow.WorkflowInstance#isSynchronized(org.apache.lenya.workflow.Event)
     */
    public boolean isSynchronized(Event event) throws WorkflowException {
        Transition nextTransition = getNextTransition(event);
        return nextTransition.isSynchronized();
    }
View Full Code Here


     *      org.apache.lenya.workflow.Workflow, java.lang.String)
     */
    public void invoke(Workflowable workflowable, Workflow workflow, String event)
            throws WorkflowException {

        Transition firingTransition = null;
        List firingTransitions = getFiringTransitions(workflowable, workflow, event);

        if (firingTransitions.size() == 0) {
            throw new WorkflowException("No transition can fire!");
        } else if (firingTransitions.size() > 1) {
            throw new WorkflowException("More than one transitions can fire!");
        } else {
            firingTransition = (Transition) firingTransitions.get(0);
        }

        String destination = firingTransition.getDestination();

        Version newVersion = createNewVersion(workflowable, workflow, event, destination);

        Action[] actions = firingTransition.getActions();
        for (int i = 0; i < actions.length; i++) {
            actions[i].execute(newVersion);
        }

        workflowable.newVersion(workflow, newVersion);
View Full Code Here

     *      org.apache.lenya.workflow.Workflow, Situation, java.lang.String)
     */
    public void invoke(Workflowable workflowable, Workflow workflow, Situation situation,
            String event) throws WorkflowException {

        Transition firingTransition = null;
        List firingTransitions = getFiringTransitions(workflowable, workflow, situation, event);

        if (firingTransitions.size() == 0) {
            throw new WorkflowException("No transition can fire!");
        } else if (firingTransitions.size() > 1) {
            throw new WorkflowException("More than one transitions can fire!");
        } else {
            firingTransition = (Transition) firingTransitions.get(0);
        }

        String destination = firingTransition.getDestination();

        Version newVersion = createNewVersion(workflowable, workflow, event, destination);

        Action[] actions = firingTransition.getActions();
        for (int i = 0; i < actions.length; i++) {
            actions[i].execute(newVersion);
        }

        workflowable.newVersion(workflow, newVersion, situation);
View Full Code Here

    /**
     * @see org.apache.lenya.workflow.WorkflowInstance#isSynchronized(org.apache.lenya.workflow.Situation, org.apache.lenya.workflow.Event)
     */
    public boolean isSynchronized(Event event) throws WorkflowException {
        Transition nextTransition = getNextTransition(event);
        return nextTransition.isSynchronized();
    }
View Full Code Here

    /**
     * @see org.apache.lenya.workflow.WorkflowInstance#isSynchronized(org.apache.lenya.workflow.Event)
     */
    public boolean isSynchronized(Event event) throws WorkflowException {
        Transition nextTransition = getNextTransition(event);
        return nextTransition.isSynchronized();
    }
View Full Code Here

    /**
     * @see org.apache.lenya.workflow.WorkflowInstance#isSynchronized(org.apache.lenya.workflow.Situation, org.apache.lenya.workflow.Event)
     */
    public boolean isSynchronized(Event event) throws WorkflowException {
        Transition nextTransition = getNextTransition(event);
        return nextTransition.isSynchronized();
    }
View Full Code Here

    /**
     * @see org.apache.lenya.workflow.WorkflowInstance#isSynchronized(org.apache.lenya.workflow.Event)
     */
    public boolean isSynchronized(Event event) throws WorkflowException {
        Transition nextTransition = getNextTransition(event);
        return nextTransition.isSynchronized();
    }
View Full Code Here

TOP

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

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.