Package org.drools.process.instance.impl

Examples of org.drools.process.instance.impl.DefaultWorkItemManager


        RSSWorkItemHandler handler = new RSSWorkItemHandler();
        WorkItemImpl workItem = new WorkItemImpl();
        workItem.setParameter( "URL", "http://salaboy.wordpress.com/feed/;http://salaboy.wordpress.com/feed/" );

       
        WorkItemManager manager = new DefaultWorkItemManager(null);
        handler.executeWorkItem( workItem, manager );

        assertEquals(2, handler.getFeeds().size());

        //En el caso real deberia registrar el workitem handler en el workitemmanager
View Full Code Here


        //workItem.setParameter( "Port", "5222" );
        workItem.setParameter( "Service", "gmail.com" );
        workItem.setParameter( "User", "drools.demo" );
        workItem.setParameter( "Password", "pa$$word" );
       
        WorkItemManager manager = new DefaultWorkItemManager(null);
        handler.executeWorkItem( workItem, manager );

        //In a real case i must register the WorkItemHandler:
        // workingMemory.getWorkItemManager()
        //.registerWorkItemHandler("Notification", new NotificationWorkItemHandler());
View Full Code Here

        workItem.setParameter( "From", "person2@domain.com" );
        workItem.setParameter( "Reply-To", "person3@domain.com" );
        workItem.setParameter( "Subject", "Subject 1" );
        workItem.setParameter( "Body", "Body 1" );
       
        WorkItemManager manager = new DefaultWorkItemManager(null);
        handler.executeWorkItem( workItem, manager );
       
        assertEquals( 1, wiser.getMessages().size() );
       
        MimeMessage msg = (( WiserMessage  ) wiser.getMessages().get( 0 )).getMimeMessage();
View Full Code Here

        workItem.setParameter( "From", "person4@domain.com" );
        workItem.setParameter( "Reply-To", "person5@domain.com" );
        workItem.setParameter( "Subject", "Subject 1" );
        workItem.setParameter( "Body", "Body 1" );
       
        WorkItemManager manager = new DefaultWorkItemManager(null);
        handler.executeWorkItem( workItem, manager );
       
        assertEquals( 3, wiser.getMessages().size() );
       
        List<String> list = new ArrayList<String>(3);
View Full Code Here

        workItem.setParameter( "From", "person4@domain.com" );
        workItem.setParameter( "Reply-To", "person5@domain.com" );
        workItem.setParameter( "Subject", "Subject 1" );
        workItem.setParameter( "Body", "Body 1" );
       
        WorkItemManager manager = new DefaultWorkItemManager(null);
        handler.executeWorkItem( workItem, manager );
       
        assertEquals( 6, wiser.getMessages().size() );
       
        List<String> list = new ArrayList<String>(6);
View Full Code Here

        queryParams.put("street", "701+First+Ave");
        queryParams.put("city", "Sunnyvale");
        queryParams.put("state", "CA");
        WorkItemImpl workItem = new WorkItemImpl();
        workItem.setParameters(queryParams);
        WorkItemManager manager = new DefaultWorkItemManager(null);
        handler.executeWorkItem( workItem, manager );
        assertEquals(HttpURLConnection.HTTP_OK, handler.getHttpResponseCode());
        assertEquals( 1, handler.getResults().size() );
        assertEquals("US", ((ResultGeoCodeApi)handler.getResults().get(0)).getCountry());
    }
View Full Code Here

        vars.put( "users", users );
        vars.put( "groups", groups );
        vars.put( "now", new Date() );
       
        DefaultEscalatedDeadlineHandler notificationHandler = new DefaultEscalatedDeadlineHandler( getConf() );
        WorkItemManager manager = new DefaultWorkItemManager( null );
        notificationHandler.setManager( manager );
       
        MockUserInfo userInfo = new MockUserInfo();
        userInfo.getEmails().put( users.get("tony"), "tony@domain.com" );
        userInfo.getEmails().put( users.get("darth"), "darth@domain.com" );
View Full Code Here

        vars.put( "users", users );
        vars.put( "groups", groups );
        vars.put( "now", new Date() );
       
        DefaultEscalatedDeadlineHandler notificationHandler = new DefaultEscalatedDeadlineHandler(getConf());
        WorkItemManager manager = new DefaultWorkItemManager( null );
        notificationHandler.setManager( manager );
       
        MockUserInfo userInfo = new MockUserInfo();
        userInfo.getEmails().put( users.get("tony"), "tony@domain.com" );
        userInfo.getEmails().put( users.get("luke"), "luke@domain.com" );
View Full Code Here

        vars.put( "users", users );
        vars.put( "groups", groups );
        vars.put( "now", new Date() );
       
        DefaultEscalatedDeadlineHandler notificationHandler = new DefaultEscalatedDeadlineHandler( conf );
        WorkItemManager manager = new DefaultWorkItemManager( null );
        notificationHandler.setManager( manager );
       
        MockUserInfo userInfo = new MockUserInfo();
        userInfo.getEmails().put( users.get("tony"), "tony@domain.com" );
        userInfo.getEmails().put( users.get("darth"), "darth@domain.com" );
View Full Code Here

        vars.put( "users", users );
        vars.put( "groups", groups );
        vars.put( "now", new Date() );
       
        DefaultEscalatedDeadlineHandler notificationHandler = new DefaultEscalatedDeadlineHandler(conf);
        WorkItemManager manager = new DefaultWorkItemManager( null );
        notificationHandler.setManager( manager );
       
        MockUserInfo userInfo = new MockUserInfo();
        userInfo.getEmails().put( users.get("tony"), "tony@domain.com" );
        userInfo.getEmails().put( users.get("luke"), "luke@domain.com" );
View Full Code Here

TOP

Related Classes of org.drools.process.instance.impl.DefaultWorkItemManager

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.