Package org.jbpm.task

Examples of org.jbpm.task.Task


        BlockingTaskOperationResponseHandler startTaskOperationHandler = new BlockingTaskOperationResponseHandler();
        client.start(taskIdAsLong, user, startTaskOperationHandler);

        BlockingGetTaskResponseHandler getTaskHandler = new BlockingGetTaskResponseHandler();
        client.getTask(taskIdAsLong, getTaskHandler);
        Task task = getTaskHandler.getTask();

        BlockingGetContentResponseHandler getContentHandler = new BlockingGetContentResponseHandler();
        client.getContent(task.getTaskData().getDocumentContentId(), getContentHandler);
        Content content = getContentHandler.getContent();

        Assert.assertNotNull(content);

        ByteArrayInputStream bais = new ByteArrayInputStream(content.getContent());
        ObjectInputStream ois = new ObjectInputStream(bais);
        Map<String, Object> value = (Map<String, Object>) ois.readObject();

        Assert.assertNotNull(value);

        Map<String, Object> info = new HashMap<String, Object>();
        info.put("emergency.priority", 1);
        ContentData result = new ContentData();
        result.setAccessType(AccessType.Inline);
        result.setType("java.util.Map");
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        ObjectOutputStream out = new ObjectOutputStream(bos);
        out.writeObject(info);
        out.close();
        result.setContent(bos.toByteArray());

        BlockingTaskOperationResponseHandler completeTaskOperationHandler = new BlockingTaskOperationResponseHandler();
        client.complete(task.getId(), user, result, completeTaskOperationHandler);
       
        Thread.sleep(2000);
    }
View Full Code Here


        BlockingTaskOperationResponseHandler startTaskOperationHandler = new BlockingTaskOperationResponseHandler();
        client.start(sums.get(0).getId(), "operator", startTaskOperationHandler);

        BlockingGetTaskResponseHandler getTaskHandler = new BlockingGetTaskResponseHandler();
        client.getTask(sums.get(0).getId(), getTaskHandler);
        Task operatorTask = getTaskHandler.getTask();

        BlockingGetContentResponseHandler getContentHandler = new BlockingGetContentResponseHandler();
        client.getContent(operatorTask.getTaskData().getDocumentContentId(), getContentHandler);
        Content content = getContentHandler.getContent();

        assertNotNull(content);

        ByteArrayInputStream bais = new ByteArrayInputStream(content.getContent());
View Full Code Here

  }

  public Object getTaskContentInput(TaskSummary taskSum) {
    BlockingGetTaskResponseHandler handlerT = new BlockingGetTaskResponseHandler();
    client.getTask(taskSum.getId(), handlerT);
    Task task2 = handlerT.getTask();
    TaskData taskData = task2.getTaskData();
    BlockingGetContentResponseHandler handlerC = new BlockingGetContentResponseHandler();
    client.getContent(taskData.getDocumentContentId(), handlerC);
    Content content = handlerC.getContent();
    ByteArrayInputStream bais = new ByteArrayInputStream(
        content.getContent());
View Full Code Here

        }
        super.buttonPressed(buttonId);
    }

    private void createTask() {
        task = new Task();
        String taskName = nameText.getText();
        List<I18NText> names = new ArrayList<I18NText>();
        names.add(new I18NText("en-UK", taskName));
        task.setNames(names);
        String subject = subjectText.getText();
View Full Code Here

        //Force Init
        TaskClientHelper.getInstance();
       
        Thread.sleep(3000);
       
        Task task = createTask();

//        new Thread(new Runnable() {
//
//            public void run() {
//                ksession.fireUntilHalt();
View Full Code Here

        str += "descriptions = [ new I18NText( 'en-UK', 'This is my description')], ";
  str += "subjects = [ new I18NText( 'en-UK', 'This is my subject')], ";
        str += "names = [ new I18NText( 'en-UK', 'This is my task name')] })";
       

        Task task = (Task) TaskServerDaemon.eval(new StringReader(str), vars);
        return task;
    }
View Full Code Here

        vars.put("users", users);

        vars.put("now", new Date());

        Task task = (Task) TaskServerDaemon.eval(new StringReader(taskDefinitionjTextArea.getText()), vars);
        ksession.insert(task);
    }//GEN-LAST:event_jButton3ActionPerformed
View Full Code Here

TOP

Related Classes of org.jbpm.task.Task

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.