Package org.apache.lenya.workflow

Examples of org.apache.lenya.workflow.Situation


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

        Event event = null;
        Event[] events = instance.getExecutableEvents(situation);
View Full Code Here


        for (int i = 0; i < roles.length; i++) {
            roleIds[i] = roles[i].getId();
        }

        WorkflowFactory factory = WorkflowFactory.newInstance();
        Situation situation = factory.buildSituation(roleIds, userId, ipAddress);
        return situation;
    }
View Full Code Here

        boolean canFire = true;

        WorkflowFactory factory = WorkflowFactory.newInstance();
        if (factory.hasWorkflow(document)) {
            try {
                Situation situation = getSituation();

                SynchronizedWorkflowInstances instance;
                try {
                    instance = factory.buildSynchronizedInstance(document);
                } catch (WorkflowException e) {
View Full Code Here

     */
    protected Situation getSituation() throws ParameterException {
        WorkflowFactory workflowFactory = WorkflowFactory.newInstance();
        String userId = getParameters().getParameter(PARAMETER_USER_ID);
        String machineIp = getParameters().getParameter(PARAMETER_IP_ADDRESS);
        Situation situation = workflowFactory.buildSituation(getRoleIDs(), userId, machineIp);
        return situation;
    }
View Full Code Here

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

                Event event = getExecutableEvent(instance, situation);

                assert event != null;
View Full Code Here

            if (getLogger().isDebugEnabled()) {
                getLogger().debug("    Invoking workflow event");
            }

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

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

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

                Event event = getExecutableEvent(instance, situation);
               
                if (event == null) {
                    canFire = false;
View Full Code Here

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

                Event event = getExecutableEvent(instance, situation);

                assert event != null;
View Full Code Here

        try {
            resolver = (WorkflowResolver) getManager().lookup(WorkflowResolver.ROLE);


            String[] emptyRoles = {};
            Situation situation = new CMSSituation(emptyRoles, "test", "127.0.0.1");

            WorkflowInstance instance = resolver.getWorkflowInstance(document);
            instance.getHistory().initialize(situation);

            for (int situationIndex = 0; situationIndex < situations.length; situationIndex++) {
View Full Code Here

    /**
     * @see org.apache.lenya.cms.cocoon.flow.FlowHelper#getSituation(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon)
     */
    public Situation getSituation(FOM_Cocoon cocoon) throws AccessControlException {
        Situation situation;
        WorkflowManager wfManager = null;
        try {
            wfManager = (WorkflowManager) this.manager.lookup(WorkflowManager.ROLE);
            situation = wfManager.getSituation();
        } catch (ServiceException e) {
View Full Code Here

TOP

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

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.