test_java obj = new test_java();
Method upper = obj.getClass().getMethod("upper", new Class [] {String.class});
Method lower = test_java.class.getMethod("lower", new Class [] {String.class});
//create tasks:
SimpleMethodTask task1 = new SimpleMethodTask(obj, upper, methodDef);
//Map inputs2 = new HashMap();
//inputs2.put("text", new OutputParameterReference(task1, "output"));
SimpleMethodTask task2 = new SimpleMethodTask(null, lower, methodDef);
//NOTE: This is NULL because lower is a static method
// and does not require an instance
//execute task1:
Map inputs1 = new HashMap();
inputs1.put("text", "something to do");
Map outputs1 = task1.execute(inputs1);
System.out.println(outputs1.get("output"));
//execute task 2:
Map inputs2 = new HashMap();
inputs2.put("text", outputs1.get("output"));
Map outputs2 = task2.execute(inputs2);
System.out.println(outputs2.get("output"));
}