Package org.jbpm.services.task.commands

Examples of org.jbpm.services.task.commands.ActivateTaskCommand


        logger.debug("Executing " + operation + " on task " + taskId + " by user " + userId );
      
        TaskCommand<?> cmd = null;
       
        if ("activate".equalsIgnoreCase(operation)) {
            cmd = new ActivateTaskCommand(taskId, userId);
        } else if ("claim".equalsIgnoreCase(operation)) {
            cmd = new ClaimTaskCommand(taskId, userId);
        } else if ("claimnextavailable".equalsIgnoreCase(operation)) {
            cmd = new ClaimNextAvailableTaskCommand(userId);
        } else if ("complete".equalsIgnoreCase(operation)) {
View Full Code Here


            ClasspathHelper.forPackage("org.jbpm.process.audit.command"), ClasspathHelper.forPackage("org.kie.remote.jaxb.gen"),
            new TypeAnnotationsScanner(), new FieldAnnotationsScanner(), new SubTypesScanner());

    @Test
    public void compareSerializedStringsTest() throws Exception {
        ActivateTaskCommand origCmd = new ActivateTaskCommand();
        origCmd.setTaskId(23l);
        origCmd.setUserId("Olaf");
        origCmd.setTargetEntityId("target");
        List<String> groups = new ArrayList<String>();
        groups.add("one");
        origCmd.setGroupsIds(groups);

        String origOut = serialize(origCmd, ActivateTaskCommand.class);
        Class activateTaskCmdClass = getClass("org.kie.remote.jaxb.gen.ActivateTaskCommand");
        Object flatCmdobj = deserialize(origOut, activateTaskCmdClass);
        Class taskCmdClass = getClass("org.kie.remote.jaxb.gen.TaskCommand");
        assertEquals(origCmd.getUserId(), getField("userId", taskCmdClass, flatCmdobj));
        assertEquals(origCmd.getTargetEntityId(), getField("targetEntityId", taskCmdClass, flatCmdobj));
        assertEquals(origCmd.getTaskId(), getField("taskId", taskCmdClass, flatCmdobj));
        assertArrayEquals(origCmd.getGroupsIds().toArray(), ((List) getField("groupIds", taskCmdClass, flatCmdobj)).toArray());
    }
View Full Code Here

TOP

Related Classes of org.jbpm.services.task.commands.ActivateTaskCommand

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.