获取用户TaskToPerform列表(SOA)
User user = (User) session.getAttribute("activeUser");Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");
DataManagementService dmService = DataManagementService.getService(connection);
ModelObject[] models = new ModelObject[] { user };
try {
String[] str = new String[] { "taskinbox" };
dmService.getProperties(models, str);
TaskInbox inbox = (TaskInbox) user.get_taskinbox();
models = new ModelObject[] { inbox };
str = new String[] { "tasks_to_perform" };
dmService.getProperties(models, str);
models = inbox.get_tasks_to_perform();
str = new String[] { "object_type", "object_name" };
dmService.getProperties(models, str);
System.out.println("---------------:" + models.length);
for (int i = 0; i < models.length; i++) {
System.out.println("------------------------------");
System.out.println(models.getUid());
System.out.println(models.getPropertyDisplayableValue("object_type"));
System.out.println(models.getPropertyDisplayableValue("object_name"));
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
页:
[1]