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;
}
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;
}
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\""));
}
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\""));
}
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());
}
Aggregations