return "jbpm-component-functional-test.xml";
}
public void testVariables() throws Exception
{
MuleClient client = muleContext.getClient();
BPMS bpms = muleContext.getRegistry().lookupObject(BPMS.class);
assertNotNull(bpms);
Map<String, Object> props = new HashMap<String, Object>();
props.put("foo", "bar");
MuleMessage response = client.send("vm://variables", "data", props);
String processId = (String)bpms.getId(response.getPayload());
assertNotNull(processId);
response = client.request("vm://queueA", TIMEOUT);
assertNotNull(response);
assertEquals("bar", response.getInboundProperty("foo"));
assertEquals(0.75, response.getInboundProperty("fraction"));
// Advance the process
props = new HashMap<String, Object>();
props.put(Process.PROPERTY_PROCESS_ID, processId);
props.put("straw", "berry");
props.put("time", new Date());
response = client.send("vm://variables", "data", props);
response = client.request("vm://queueB", TIMEOUT);
assertNotNull(response);
assertEquals("bar", response.getInboundProperty("foo"));
assertEquals(0.75, response.getInboundProperty("fraction"));
assertEquals("berry", response.getInboundProperty("straw"));
final Object o = response.getInboundProperty("time");