Package org.apache.lenya.workflow

Examples of org.apache.lenya.workflow.Event


                try {
                    instance = factory.buildSynchronizedInstance(document);
                } catch (WorkflowException e) {
                    throw new ExecutionException(e);
                }
                Event event = getExecutableEvent(instance, situation);
               
                if (event == null) {
                    canFire = false;
                }
               
View Full Code Here


                } catch (WorkflowException e) {
                    throw new ExecutionException(e);
                }
                Situation situation = factory.buildSituation(getRoleIDs(), userId, machineIp);

                Event event = getExecutableEvent(instance, situation);

                assert event != null;

                if (log.isDebugEnabled()) {
                    log.debug("Invoking event [" + event.getName() + "]");
                }
                instance.invoke(situation, event);
                if (log.isDebugEnabled()) {
                    log.debug("Invoking transition completed.");
                }
View Full Code Here

    protected Event getExecutableEvent(SynchronizedWorkflowInstances instance, Situation situation)
        throws WorkflowException, ParameterException {

        String workflowEvent = getEventName();

        Event event = null;
        Event[] events = instance.getExecutableEvents(situation);

        if (log.isDebugEnabled()) {
            log.debug("Workflow event name: [" + workflowEvent + "]");
            log.debug("Resolved executable events.");
View Full Code Here

        Event[] events = mainInstance.getExecutableEvents(situation);
        Set executableEvents = new HashSet(Arrays.asList(events));

        for (int i = 0; i < events.length; i++) {
            Event event = events[i];
            if (mainInstance.isSynchronized(event)) {

                boolean canFire = true;
                if (log.isDebugEnabled()) {
                    log.debug("    Transition for event [" + event + "] is synchronized.");
View Full Code Here

     */
    public void invoke(Situation situation, String eventName)
        throws WorkflowException {
        assert eventName != null;

        Event event = ((WorkflowImpl) getWorkflow()).getEvent(eventName);
        invoke(situation, event);
    }
View Full Code Here

                e1.printStackTrace(System.err);
            }

            Event[] events = instance.getExecutableEvents(situation);

            Event event = null;
            System.out.print("Events:");

            for (int eventIndex = 0; eventIndex < events.length; eventIndex++) {
                System.out.print(" " + events[eventIndex]);
View Full Code Here

            }

            SynchronizedWorkflowInstances instance = factory.buildSynchronizedInstance(document);
            Situation situation = WorkflowHelper.buildSituation(objectModel);
            Event[] events = instance.getExecutableEvents(situation);
            Event event = null;

            for (int i = 0; i < events.length; i++) {
                if (events[i].getName().equals(eventName)) {
                    event = events[i];
                }
View Full Code Here

        SynchronizedWorkflowInstances instance =
          factory.buildSynchronizedInstance(document);
        Situation situation =
          factory.buildSituation(getRoleIDs(), getUserId(), getMachineIp());

        Event event = null;
        Event[] events = instance.getExecutableEvents(situation);

        log.debug("Resolved executable events.");
       
        for (int i = 0; i < events.length; i++) {
View Full Code Here

            throws WorkflowException {
        if (!element.getLocalName().equals(VERSION_ELEMENT)) {
            throw new WorkflowException("Invalid history XML!");
        }

        Event event = null;
        String eventId = element.getAttribute(EVENT_ATTRIBUTE);
        if (eventId != null && !"".equals(eventId)) {
            event = getInstance().getWorkflowImpl().getEvent(eventId);
        }
View Full Code Here

                try {
                    instance = factory.buildSynchronizedInstance(document);
                } catch (WorkflowException e) {
                    throw new ExecutionException(e);
                }
                Event event = getExecutableEvent(instance, situation);
               
                if (event == null) {
                    canFire = false;
                }
               
View Full Code Here

TOP

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

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.