cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

EPMDocument checkout error

Selva
1-Newbie

EPMDocument checkout error

Hi,

The requirement is just to iterate an EPM Document.I am using the below piece of code for iterating an EPMDocument.

// Checkout
wt.vc.wip.WorkInProgressHelper.service.checkout(epmdoc, wt.vc.wip.WorkInProgressHelper.service.getCheckoutFolder(),"Iterated by Administrator");

// Check-in
if(wt.vc.wip.WorkInProgressHelper.isCheckedOut(epmdoc)) {
epmdoc = (wt.epm.EPMDocument) wt.vc.wip.WorkInProgressHelper.service.checkin(epmdoc,");
}

This works fine for all CAD Documents except for the Family Tables (EPMDocument instances).

In case of Family Tables EPM Document,I get the following error:

C:\ptc\Windchill_9.1\Windchill>windchill ext.Test
Introspection Runtime Mode = true
*************This is the test Class************



at wt.vc.wip.WorkInProgressServiceFwd.checkout(WorkInProgressServiceFwd.java:417)

What am missing out/ doing wrong here?



Thanks


Selvam

9 REPLIES 9

Hi,


Did you finally found a solution for this ? Indeed I am facing the same issue.


Sincerely,



Thibault Magné

Hi,

I currently am facing an error when trying to checkout an EPMDocument
either by I*E or java API.

Here is the error thrown:
com.infoengine.util.IEException: wt.epm.query.QueryException: Parameter
value is null: paramName="baselineId"

The webject I use is as simple as following:

> <ie:webject name="CheckOut-Objects" type="ACT">
> <ie:param name="instance" data="${@FORM[]instance[]}"/">
> <ie:param name="OBJECT_REF" data="${@FORM[]obid[]}"/">
> <ie:param name="GROUP_OUT" data="checkedOut"/>
> </ie:webject>
>

Using the java API, I try to checkout with the following service :
WorkInProgressHelper.service.checkout()


Does anyone has an idea ? The target of my current customization is to bulk
modify IBA on EPMDocuments.

Thanks in advance,

Sincerely,

Thibault Magné
ssenthil
1-Newbie
(To:Selva)

Hello

The check out of EPMDocuments (especially the generic and instances) will
fail if they are not shared to a workspace.

Ideal way of doing is programmatically sharing the epmdocuments in a
workspace and use EPMWorkspaceHelper.manager.checkout().

Please make sure the associations to wtparts are intact after c/o and c/i.



Thank you and have a great time.

Best Regards

Swamy Senthil

Principal Solutions Architect, Swasen Inc

swamy.senthil@swasen.com(Email); 909 800 8423(M); 973 324 2729(W); 866
908 6561(F);







From: Thibault Magné [

Hello Swamy Senthil,

I am facing issue while updating content of EPMDocument grammatically.

i am able to create EPMDoc through API, at first time i was able to assign a primary conet file to this EPMDoc.

later when i checked out this epm throgh API and try to modify the content but in this case i got below error.

java.lang.reflect.InvocationTargetException

  at wt.method.RemoteMethodServer.invoke(RemoteMethodServer.java:800)

  at wt.clients.util.RMIMultiPartPost.performOperation(RMIMultiPartPost.java:257)

  at wt.clients.util.http.HTTPUploadDownload.performUploadOperation(HTTPUploadDownload.java:1357)

  at wt.clients.util.http.HTTPUploadDownload.access$100(HTTPUploadDownload.java:54)

  at wt.clients.util.http.HTTPUploadDownload$HTTPUploadDownloadThread.run(HTTPUploadDownload.java:2728)

Finished uploadFile of [wt.epm.EPMDocument:194491]Caused by: (wt.content.contentResource/66) wt.content.ContentException: Can not add more than one primary content to the object.

*********************************

please help me out, how i can modify the content file of EPMDoc and check in to Windchill from A.1 to A.2.

Regards,

Vivek

Le 4 janvier 2012 15:41, Thibault Magné <-> a écrit :

> Hi,
>
> Thanks for this answer, in fact I would like to find a way not to create a
> workspace for each EPMDocument (they can be in different contexts).
> I do not use wtpart association though.
>
> Here is my actual code, but the workspace consideration is quite an issue
> to me:
> WTPrincipal p =
> wt.session.SessionHelper.manager.getPrincipal();
>
> WTCollection to_checkout = new WTArrayList(1);
> to_checkout.add(versioned);
>
> WTSet workspaces = EPMWorkspaceHelper.manager.getWorkspaces(p,
> null); //Here i cannot retrieve a "default workspace"
> Workable copy =
> (Workable)
> wt.epm.workspaces.EPMWorkspaceHelper.manager.checkout (null,
> to_checkout).get(versioned);
>
> Please take in account that I am not a professional developper (I
> currently am listening java + pdmlink), so feel free to make remarks on the
> code.
>
> Sincerely,
>
> Thibault Magné
>
> Le 4 janvier 2012 15:35, Swamy Senthil <senthils@swasen.com> a écrit :
>
> Hello****
>>
>> The check out of EPMDocuments (especially the generic and instances) will
>> fail if they are not shared to a workspace.****
>>
>> Ideal way of doing is programmatically sharing the epmdocuments in a
>> workspace and use EPMWorkspaceHelper.manager.checkout().****
>>
>> Please make sure the associations to wtparts are intact after c/o and c/i.
>> ****
>>
>> ** **
>>
>> Thank you and have a great time.**
>>
>> Best Regards**
>>
>> * Swamy Senthil***
>>
>> * Principal Solutions Architect, **Swasen Inc*****
>>
>> swamy.senthil@swasen.com(Email); 909 800 8423(M); 973 324 2729(W);
>> 866 908 6561(F); ****
>>
>> ** **
>>
>> ** **
>>
>> ** **
>>
>> *From:* Thibault Magné [
>>
>> The webject I use is as simple as following:****
>>
>> <ie:webject name="CheckOut-Objects" type="ACT">
>> <ieSmiley Tonguearam name="instance" data="${@FORM[]instance[]}"/">
>> <ieSmiley Tonguearam name="OBJECT_REF" data="${@FORM[]obid[]}"/">
>> <ieSmiley Tonguearam name="GROUP_OUT" data="checkedOut"/>
>> </ie:webject> ****
>>
>>
>> Using th...












ssenthil
1-Newbie
(To:Selva)

Hello Thibault

Coin a helper class with few handy methods as in the attached document. Unit
test them and call in appropriate sequence for meeting your requirements.

As you notice in the attached, a named workspace can be retrieved for the
given principal. The attached methods are just for examples.

Please make sure your build code accommodates the same/similar APIs.



for updating the IBA's (not modeled attributes) we have a licensed utility
for R9.1 that performs the updates without check-out/check-in. This is FYI.





Thank you and have a great time.

Best Regards

Swamy Senthil

Principal Solutions Architect, Swasen Inc

swamy.senthil@swasen.com(Email); 909 800 8423(M); 973 324 2729(W); 866
908 6561(F);





From: Thibault Magné [

Hi,

Thanks you, this helps me a lot.
Is there a way to get a "Default" workspace instead of needing to create
one (parameter "name"), depending on the target EPMDoc context's ?

Regards,

Thibault Magné

Le 4 janvier 2012 17:04, Swamy Senthil <senthils@swasen.com> a écrit :

> Hello Thibault****
>
> Coin a helper class with few handy methods as in the attached document.
> Unit test them and call in appropriate sequence for meeting your
> requirements.****
>
> As you notice in the attached, a named workspace can be retrieved for the
> given principal. The attached methods are just for examples. ****
>
> Please make sure your build code accommodates the same/similar APIs.****
>
> ** **
>
> for updating the IBA's (not modeled attributes) we have a licensed utility
> for R9.1 that performs the updates without check-out/check-in. This is FYI.
> ****
>
> ** **
>
> ** **
>
> Thank you and have a great time.**
>
> Best Regards**
>
> * Swamy Senthil***
>
> * Principal Solutions Architect, **Swasen Inc*****
>
> swamy.senthil@swasen.com(Email); 909 800 8423(M); 973 324 2729(W); 866
> 908 6561(F); ****
>
> ** **
>
> ** **
>
> *From:* Thibault Magné [
> Workable copy =
> (Workable)
> wt.epm.workspaces.EPMWorkspaceHelper.manager.checkout (null,
> to_checkout).get(versioned);
>
> Please take in account that I am not a professional developper (I
> currently am listening java + pdmlink), so feel free to make remarks on the
> code.
>
> Sincerely,
>
> Thibault Ma...




































>
> The webject I use is as simple as following:****
>
> <ie:webject name="CheckOut-Objects" type="ACT">
> <ieSmiley Tonguearam name="instance" data="${@FORM[]instance[]}"/">
> <ieSmiley Tonguearam name="OBJECT_REF" data="${@FORM[]obid[]}"/">
> <ieSmiley Tonguearam name="GROUP_OUT" data="checkedOut"/>
> </ie:webject> ****
>
>
> Using the java API,...











ssenthil
1-Newbie
(To:Selva)

I am unsure why you need a workspace for a specific context.

You can create a workspace "Test" for the product context "Product 1" and
check-out a cad from "Product 2" to the workspace "Test" in Product 1.



From: Thibault Magné [
Top Tags