Skip to main content
1-Visitor
January 28, 2013
Solved

associate two document subtypes

  • January 28, 2013
  • 2 replies
  • 1387 views

i have two subtypes of document '"docA" and "docY".In a expression robot in a workflow I have to associate the two document subtypes.How do i do it????

Best answer by GregoryPERASSO

Hello

it depends of the type of link you want to use, if you want to checkout/in objects ... etc

but for example:

WTDocumentUsageLink link = WTDocumentUsageLink.newWTDocumentUsageLink(docA,DocY);

PersistenceHelper.manager.store(link);

regards

2 replies

GregoryPERASSO
16-Pearl
January 28, 2013

Hello

it depends of the type of link you want to use, if you want to checkout/in objects ... etc

but for example:

WTDocumentUsageLink link = WTDocumentUsageLink.newWTDocumentUsageLink(docA,DocY);

PersistenceHelper.manager.store(link);

regards

1-Visitor
January 29, 2013

Do i need to put internal name of doca nd docy???

GregoryPERASSO
16-Pearl
January 30, 2013

I depends of the API used.

but in this case , it is directly the 2 WTDocument objects that you want to link.

there's an other API to get the WTDocument from the internat object identifier

12-Amethyst
February 1, 2013

I am assuming that the object of the type Doc a and Doc y is already created.

After that you have to check out the the parent document and after that you can use the WTDocumentUsageLink.

If you didnt check out the parent document then it may throw an error