Package org.jbpm.formbuilder.shared.task

Examples of org.jbpm.formbuilder.shared.task.TaskRef


        resource.get().send(new SimpleTextCallback(i18n.CouldntReadSingleIO()) {
            @Override
            public void onSuccess(Method method, String response) {
                List<TaskRef> tasks = helper.readTasks(response);
                if (tasks.size() == 1) {
                    TaskRef singleTask = tasks.iterator().next();
                    bus.fireEvent(new TaskSelectedEvent(singleTask));
                }
            }
        });
    }
View Full Code Here


        jaxbSimulation(dto, ListTasksDTO.class, ListTasksDTO.RELATED_CLASSES);
    }
   
    public void testListTasksDTOElementsWithNoContent() throws Exception {
        List<TaskRef> tasks = new ArrayList<TaskRef>();
        TaskRef task1 = new TaskRef();
        tasks.add(task1);
        TaskRef task2 = new TaskRef();
        tasks.add(task2);
        ListTasksDTO dto = new ListTasksDTO(tasks);
        jaxbSimulation(dto, ListTasksDTO.class, ListTasksDTO.RELATED_CLASSES);
    }
View Full Code Here

        jaxbSimulation(dto, ListTasksDTO.class, ListTasksDTO.RELATED_CLASSES);
    }
   
    public void testListTasksDTOElementsWithContent() throws Exception {
        List<TaskRef> tasks = new ArrayList<TaskRef>();
        TaskRef task1 = new TaskRef();
        task1.setPackageName("myPackage");
        task1.setProcessId("myProcessId");
        task1.setProcessName("myProcessName");
        task1.setTaskId("myTaskId");
        task1.addInput("myInput1", "myValue1");
        task1.addInput("myInput2", "myValue2");
        task1.addOutput("myOutput1", "myValue3");
        task1.addOutput("myOutput2", "myValue4");
        Map<String, String> metaData1 = new HashMap<String, String>();
        metaData1.put("myMetaDataKey1", "myMetaDataValue1");
        metaData1.put("myMetaDataKey2", "myMetaDataValue2");
        task1.setMetaData(metaData1);
        tasks.add(task1);
        TaskRef task2 = new TaskRef();
        task2.setPackageName("yourPackage");
        task2.setProcessId("yourProcessId");
        task2.setProcessName("yourProcessName");
        task2.setTaskId("yourTaskId");
        task2.addInput("yourInput1", "yourValue1");
        task2.addInput("yourInput2", "yourValue2");
        task2.addOutput("yourOutput1", "yourValue3");
        task2.addOutput("yourOutput2", "yourValue4");
        Map<String, String> metaData2 = new HashMap<String, String>();
        metaData2.put("yourMetaDataKey1", "yourMetaDataValue1");
        metaData2.put("yourMetaDataKey2", "yourMetaDataValue2");
        task2.setMetaData(metaData2);
        tasks.add(task2);
        ListTasksDTO dto = new ListTasksDTO(tasks);
        jaxbSimulation(dto, ListTasksDTO.class, ListTasksDTO.RELATED_CLASSES);
    }
View Full Code Here

        EasyMock.verify(view, service, i18n, filterView, advancedView);
    }
   
    @Test
    public void testTaskSelected() throws Exception {
        TaskRef task = new TaskRef();
        view.setSelectedTask(EasyMock.eq(task));
        EasyMock.expectLastCall().once();
       
        EasyMock.replay(view, service, i18n, filterView, advancedView);
        new IoAssociationPresenter(view);
View Full Code Here

        bus.fireEvent(new TaskSelectedEvent(task));
        EasyMock.verify(view, service, i18n, filterView, advancedView);
    }
   
    public void testEmbededIOReferenceNotNullTask() throws Exception {
        final TaskRef ioRef = new TaskRef();
        view.disableSearch();
        EasyMock.expectLastCall().once();
        view.setSelectedTask(EasyMock.eq(ioRef));
        EasyMock.expectLastCall().once();
        TaskSelectedHandler handler = EasyMock.createMock(TaskSelectedHandler.class);
View Full Code Here

        bus.fireEvent(new EmbededIOReferenceEvent(null, "jbpm"));
        EasyMock.verify(view, service, i18n, filterView, advancedView);
    }
   
    public void testNewTaskRow() throws Exception {
        TaskRef task = new TaskRef();
        TaskRow row = EasyMock.createMock(TaskRow.class);
        EasyMock.expect(row.addRightClickHandler(EasyMock.isA(RightClickHandler.class))).
            andReturn(new MockHandlerRegistration()).once();
        EasyMock.expect(view.createTaskRow(EasyMock.same(task), EasyMock.eq(false))).
            andReturn(row);
View Full Code Here

   
    public void testEmbededIOReferenceItemsEmpty() throws Exception {
        EasyMock.expect(view.getItems()).andReturn(new ArrayList<MenuItem>());
        EasyMock.replay(view);
        new OptionsPresenter(view);
        bus.fireEvent(new EmbededIOReferenceEvent(new TaskRef(), "jbpm"));
        EasyMock.verify(view);
    }
View Full Code Here

        EasyMock.expectLastCall().once();
       
        EasyMock.expect(view.getItems()).andReturn(items);
        EasyMock.replay(view, mockItem1, mockCommand1);
        new OptionsPresenter(view);
        bus.fireEvent(new EmbededIOReferenceEvent(new TaskRef(), "jbpm"));
        EasyMock.verify(view, mockItem1, mockCommand1);
    }
View Full Code Here

        items.add(mockItem2);
       
        EasyMock.expect(view.getItems()).andReturn(items);
        EasyMock.replay(view, mockItem1, mockCommand1);
        new OptionsPresenter(view);
        bus.fireEvent(new EmbededIOReferenceEvent(new TaskRef(), "jbpm"));
        EasyMock.verify(view, mockItem1, mockCommand1);
    }
View Full Code Here

   
    @Test
    @SuppressWarnings("unchecked")
    public void testTaskSelected() throws Exception {
        final String taskId = "taskId", processId = "processId";
        TaskRef ioRef = new TaskRef();
        ioRef.setTaskId(taskId);
        ioRef.setProcessId(processId);
        ioRef.setInputs(new ArrayList<TaskPropertyRef>());
        ioRef.setOutputs(new ArrayList<TaskPropertyRef>());
        FBForm mockForm = EasyMock.createMock(FBForm.class);
        EasyMock.expect(mockForm.getTaskId()).andReturn(taskId).once();
        EasyMock.expect(mockForm.getProcessId()).andReturn(processId).once();
        EasyMock.expect(mockForm.getInputs()).andReturn(new HashMap<String, InputData>()).once();
        EasyMock.expect(mockForm.getOutputs()).andReturn(new HashMap<String, OutputData>()).once();
View Full Code Here

TOP

Related Classes of org.jbpm.formbuilder.shared.task.TaskRef

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.