How to execute webject using java api in Windchill

public static Group queryObject(String type)  throws Exception {
       Task task = new Task();
       task.setParam("supporting-adapter", WTProperties.getLocalProperties().getProperty("wt.federation.ie.VMName"));           
       task.setUsername(SessionHelper.manager.getPrincipal().getName());
       task.setTaskURI("/com/ptc/core/dca-Query.xml");        
       task.setParam("object_type", type);
       task.invoke();
       return task.getGroup("output");
}

你可能感兴趣的:(How to execute webject using java api in Windchill)