Package org.kie.test

Examples of org.kie.test.MyType


    private static Random random = new Random();
   
    private void runObjectProcess(KieSession ksession, int i) {
        Map<String, Object> params = new HashMap<String, Object>();
        String initValue = "start-" + i;
        params.put("inputStr", new MyType(initValue, random.nextInt()));
        params.put("otherStr", new MyType(initValue, random.nextInt()));
        ProcessInstance processInstance = ksession.startProcess(PROCESS_OBJ_VAR_ID, params);
        assertTrue( processInstance != null && processInstance.getState() == ProcessInstance.STATE_ACTIVE);
        long procInstId = processInstance.getId();
       
        List<Long> taskIds = taskService.getTasksByProcessInstanceId(procInstId);
        assertFalse( "No tasks found!", taskIds.isEmpty() );
        long taskId = taskIds.get(0);
        taskService.start(taskId, USER_ID);
       
        Map<String, Object> taskResults = new HashMap<String, Object>();
        taskResults.put("taskOutputStr", new MyType("task-" + procInstId, random.nextInt()));
        taskService.complete(taskId, USER_ID, taskResults);
   
        assertNull("Process instance has not been finished.", ksession.getProcessInstance(procInstId) );
       
        AuditLogService logService = new JPAAuditLogService(getEmf());
View Full Code Here

TOP

Related Classes of org.kie.test.MyType

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.