Search in sources :

Example 1 with StartProcessCommand

use of org.drools.core.command.runtime.process.StartProcessCommand in project drools by kiegroup.

the class CommandFactoryServiceImpl method newStartProcess.

public Command newStartProcess(String processId, Map<String, Object> parameters) {
    StartProcessCommand startProcess = new StartProcessCommand();
    startProcess.setProcessId(processId);
    startProcess.setParameters(parameters);
    return startProcess;
}
Also used : StartProcessCommand(org.drools.core.command.runtime.process.StartProcessCommand)

Example 2 with StartProcessCommand

use of org.drools.core.command.runtime.process.StartProcessCommand in project drools by kiegroup.

the class CommandFactoryServiceImpl method newStartProcess.

public Command newStartProcess(String processId) {
    StartProcessCommand startProcess = new StartProcessCommand();
    startProcess.setProcessId(processId);
    return startProcess;
}
Also used : StartProcessCommand(org.drools.core.command.runtime.process.StartProcessCommand)

Example 3 with StartProcessCommand

use of org.drools.core.command.runtime.process.StartProcessCommand in project drools by kiegroup.

the class XStreamXMLTest method testMarshallStartProcessCmdWithNoOutIdentifier.

@Test
public void testMarshallStartProcessCmdWithNoOutIdentifier() {
    // the "out-identifier" is optional -> the marshalling should succeed even if it is null
    StartProcessCommand cmd = new StartProcessCommand("some-process-id");
    String xmlString = xstream.toXML(cmd);
    Assert.assertTrue(xmlString.contains("processId=\"some-process-id\""));
}
Also used : StartProcessCommand(org.drools.core.command.runtime.process.StartProcessCommand) Test(org.junit.Test)

Example 4 with StartProcessCommand

use of org.drools.core.command.runtime.process.StartProcessCommand in project drools by kiegroup.

the class XStreamXMLTest method testMarshallStartProcessCmd.

@Test
public void testMarshallStartProcessCmd() {
    StartProcessCommand cmd = new StartProcessCommand("some-process-id", "some-out-identifier");
    String xmlString = xstream.toXML(cmd);
    Assert.assertTrue(xmlString.contains("processId=\"some-process-id\""));
    Assert.assertTrue(xmlString.contains("out-identifier=\"some-out-identifier\""));
}
Also used : StartProcessCommand(org.drools.core.command.runtime.process.StartProcessCommand) Test(org.junit.Test)

Example 5 with StartProcessCommand

use of org.drools.core.command.runtime.process.StartProcessCommand in project drools by kiegroup.

the class XStreamXMLTest method testUnMarshallStartProcessCmdWithNoOutIdentifier.

@Test
public void testUnMarshallStartProcessCmdWithNoOutIdentifier() {
    // the "out-identifier" is optional -> the unmarshalling should create valid object
    Object obj = xstream.fromXML("<start-process processId=\"some-process-id\"/>");
    Assert.assertEquals(StartProcessCommand.class, obj.getClass());
    StartProcessCommand cmd = (StartProcessCommand) obj;
    Assert.assertEquals("some-process-id", cmd.getProcessId());
}
Also used : StartProcessCommand(org.drools.core.command.runtime.process.StartProcessCommand) Test(org.junit.Test)

Aggregations

StartProcessCommand (org.drools.core.command.runtime.process.StartProcessCommand)6 Test (org.junit.Test)3