Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

Re: How to pass an object for an Info Engine task in the Info Engine Task Editor?

$
0
0

Ajay,

Try the following code.

------------------------------

try{

  Task task = new Task();
 
  task.setTaskURI("com/ptc/windchill/ws/create.xml");
  task.addParam("INSTANCE", "com.cts.wccoe.Windchill");
  task.addParam("supporting-adapter", "com.cts.wccoe.Windchill");
 
  Element element = new Element();
  element.setFti("wt.part.WTPart");
  Att att1 = new Att("name");
  att1.setValue("Part_created_from_InfoEngine");
 
  Att att2 = new Att("number");
  att2.setValue("IS100012333");
  element.addAtt(att1);
  element.addAtt(att2);
 
  Group grp = new Group("objects");
     grp.addElement(element);
 
  task.addGroup(grp);
 
  task.invoke();
  }catch (IEException e) {
   e.printStackTrace();
  } catch (IOException e) {
   e.printStackTrace();
  }


Viewing all articles
Browse latest Browse all 8876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>