Skip to main content
13-Aquamarine
December 15, 2015
Question

How to create Container or Context via xml

  • December 15, 2015
  • 3 replies
  • 2195 views

How can i create a Container or Context using Windchill task (via xml)?

3 replies

1-Visitor
December 15, 2015

I wrote following IE Task, but it does not work.

<ie:webject name="Create-Objects" type="ACT">

    <ie:param name="INSTANCE" data="$(@FORM[]supporting-adapter[*])" delim="!" valueSeparator="!" default="<%=com.infoengine.au.NamingService.getVMName()%>"/>

    <ie:param name="FIELD" data="name=container1"/>

    <ie:param name="TYPE" data="wt.inf.container.WTContainer"/>

    <ie:param name="FIELD" data="template='General Product'"/>

</ie:webject>

I am getting following error which indicates either I am doing something wrong or it is not possible with Create-Objects webject.

]EXCEPTION DURING CREATE: CONSTRUCTING PERSISTABLE

Nested exception is: com.ptc.core.command.common.CommandException: java.lang.NoSuchMethodException: wt.inf.container.WTContainer.<init>()

Nested exception is: java.lang.NoSuchMethodException: wt.inf.container.WTContainer.<init>()

  at java.lang.Class.getConstructor0(Class.java:2730)

If loadfiles is an option, you can use following snippet to create container Product

<csvContainer handler="wt.inf.container.LoadContainer.createContainer" >

    <csvcontainerClass>wt.pdmlink.PDMLinkProduct</csvcontainerClass>

    <csvcontainerName>Product Name</csvcontainerName>

    <csvsharedTeamName></csvsharedTeamName>

    <csvcontainerExtendable></csvcontainerExtendable>

    <csvparentContainerPath></csvparentContainerPath>

    <csvcontainerTemplateRef>Template Name</csvcontainerTemplateRef>

    <csvbusinessNamespace></csvbusinessNamespace>

    <csvsharingEnabled></csvsharingEnabled>

    <csvcreator></csvcreator>

    <csvowner></csvowner>

    <csvsubscriber></csvsubscriber>

    <csvconferencingURL></csvconferencingURL>

    <csvdescription>Product Name</csvdescription>

    <csvorganization>Organization Name</csvorganization>

    <csvcreatorSelector></csvcreatorSelector>

</csvContainer>

2-Explorer
March 25, 2016

We have load files to create Org, Project, Product, & Library containers.  Use them all the time.  Is that what you are looking for?

1-Visitor
April 5, 2016

Hi,

You can use loadFromFile functionality to load containers into Windchill. Use the below link to know more about loadFromFile functionality in Windchill:

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS138169&art_lang=en&posno=1&q=loadfromfile&source=search

We are using a lot of this functionality for our deployment and data load process.

Let me know if this helps.