Examples of completeWorkItem()


Examples of com.wordpress.salaboy.example.handlers.MyHumanChangingValuesSimulatorWorkItemHandler.completeWorkItem()

        // Lets check the value of the emergency.getRevision(), it should be 1
        Assert.assertEquals(1, ((Emergency) process.getVariable("emergency")).getRevision());
       
        System.out.println("Completing the first Activity");
        //Complete the first human activity
        humanActivitiesSimHandler.completeWorkItem();
        // Is the Process still Active?
        Assert.assertEquals(ProcessInstance.STATE_ACTIVE, process.getState());
       
        //I need to call the FireAllRules method because I have a RuleTask inside the business process
        int fired = ksession.fireAllRules();
View Full Code Here

Examples of com.wordpress.salaboy.example.handlers.MyHumanChangingValuesSimulatorWorkItemHandler.completeWorkItem()

       
       
       
        System.out.println("Completing the second Activity");
        //Complete the second human activity
        humanActivitiesSimHandler.completeWorkItem();
       
        //Start Tracking and Reporting are automatic -> Check the report in the console
        //We can also check against the tracking system itself
        Assert.assertEquals("Vehicle "+selectedVehicle.getId()+" Located at 5th and A Avenue"
                                    , trackingSystem.queryVehicleStatus(selectedVehicle.getId()));
View Full Code Here

Examples of com.wordpress.salaboy.example.handlers.MyHumanChangingValuesSimulatorWorkItemHandler.completeWorkItem()

        Assert.assertEquals(1, ((Emergency) process.getVariable("emergency")).getRevision());
       
       
        //Complete the first human activity
        System.out.println("Completing the first Activity");
        humanActivitiesSimHandler.completeWorkItem();
       
        // Is the Process still Active?
        Assert.assertEquals(ProcessInstance.STATE_ACTIVE, process.getState());
       
        //I need to call the FireAllRules method because I have a RuleTask inside the business process
View Full Code Here

Examples of com.wordpress.salaboy.example.handlers.MyHumanChangingValuesSimulatorWorkItemHandler.completeWorkItem()

        // Lets check the value of the emergency.getRevision(), it should be 2, because the work item handler changes it
        Assert.assertEquals(2, ((Emergency) process.getVariable("emergency")).getRevision());
       
        System.out.println("Completing the second Activity");
        //Complete the second human activity
        humanActivitiesSimHandler.completeWorkItem();

        // Is the process completed?
        Assert.assertEquals(ProcessInstance.STATE_COMPLETED, process.getState());
       
    }
View Full Code Here

Examples of com.wordpress.salaboy.example.handlers.MyHumanChangingValuesSimulatorWorkItemHandler.completeWorkItem()

        // Lets check the value of the emergency.getRevision(), it should be 1
        Assert.assertEquals(1, ((Emergency) process.getVariable("emergency")).getRevision());
       
        System.out.println("Completing the first Activity");
        //Complete the first human activity
        humanActivitiesSimHandler.completeWorkItem();
        // Is the Process still Active?
        Assert.assertEquals(ProcessInstance.STATE_ACTIVE, process.getState());
       
        //I need to call the FireAllRules method because I have a RuleTask inside the business process
        int fired = ksession.fireAllRules();
View Full Code Here

Examples of com.wordpress.salaboy.example.handlers.MyHumanChangingValuesSimulatorWorkItemHandler.completeWorkItem()

       
       
       
        System.out.println("Completing the second Activity");
        //Complete the second human activity
        humanActivitiesSimHandler.completeWorkItem();
       
        // Is the process completed?
        Assert.assertEquals(ProcessInstance.STATE_COMPLETED, process.getState());

    }
View Full Code Here

Examples of com.wordpress.salaboy.example.handlers.MyHumanChangingValuesSimulatorWorkItemHandler.completeWorkItem()

        // Lets check the value of the emergency.getRevision(), it should be 1
        Assert.assertEquals(1, ((Emergency) process.getVariable("emergency")).getRevision());
       
        System.out.println("Completing the first Activity");
        //Complete the first human activity
        humanActivitiesSimHandler.completeWorkItem();
       
       
        // I need to sleep for a little while, because the other thread can be executing some activated rules
        Thread.sleep(1000);
       
View Full Code Here

Examples of com.wordpress.salaboy.example.handlers.MyHumanChangingValuesSimulatorWorkItemHandler.completeWorkItem()

        // Lets check the value of the emergency.getRevision(), it should be 2
        Assert.assertEquals(2, ((Emergency) process.getVariable("emergency")).getRevision());
       
        System.out.println("Completing the second Activity");
        //Complete the second human activity
        humanActivitiesSimHandler.completeWorkItem();
       
        // Is the process completed?
        Assert.assertEquals(ProcessInstance.STATE_COMPLETED, process.getState());
    }
View Full Code Here

Examples of com.wordpress.salaboy.example.handlers.MyHumanChangingValuesSimulatorWorkItemHandler.completeWorkItem()

        // Lets check the value of the emergency.getRevision(), it should be 1
        Assert.assertEquals(1, ((Emergency) process.getVariable("emergency")).getRevision());
       
        System.out.println("Completing the first Activity");
        //Complete the first human activity
        humanActivitiesSimHandler.completeWorkItem();
        // Is the Process still Active?
        Assert.assertEquals(ProcessInstance.STATE_ACTIVE, process.getState());
       
        //I need to call the FireAllRules method because I have a RuleTask inside the business process
        int fired = ksession.fireAllRules();
View Full Code Here

Examples of com.wordpress.salaboy.example.handlers.MyHumanChangingValuesSimulatorWorkItemHandler.completeWorkItem()

       
       
       
        System.out.println("Completing the second Activity");
        //Complete the second human activity
        humanActivitiesSimHandler.completeWorkItem();
       
        //Start Tracking and Reporting are automatic -> Check the report in the console
        //We can also check against the tracking system itself
        Assert.assertEquals("Vehicle "+selectedVehicle.getId()+" Located at 5th and A Avenue"
                                    , trackingSystem.queryTackingStatus(selectedVehicle.getId()));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.