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

I need help with the Create-Link Webject.

Highlighted
Newbie

I need help with the Create-Link Webject.

Hi all,

I'm having some trouble creating a EPMReferenceLink using an InfoEngien task. The task is as follows:

<?xml version="1.0" standalone="yes"?>

<%@page language="java" access="http|internal"%>

<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>

<ie:webject name="Start-Session" type="ACT">

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

    <ieSmiley Tonguearam name="GROUP_OUT" data="session"/>

</ie:webject>

<ie:webject name="Start-Transaction" type="ACT">

  <ieSmiley Tonguearam name="INSTANCE" data="$(session[]instance[])"/>

  <ieSmiley Tonguearam name="SESSION_ID" data="$(session[]session_id[])"/>

  </ie:webject>

  <ie:webject name="Query-Objects" type="OBJ">

  <ieSmiley Tonguearam name="INSTANCE" data="$(session[]instance[])"/>

  <ieSmiley Tonguearam name="SESSION_ID" data="$(session[]session_id[])"/>

  <ieSmiley Tonguearam name="GROUP_OUT" data="roleA"/>

  <ieSmiley Tonguearam name="TYPE" data="wt.epm.EPMDocument"/>

  <ieSmiley Tonguearam name="WHERE" data="${@FORM[]Names[]}"/>

  <ieSmiley Tonguearam name="ATTRIBUTE" data="*"/>

</ie:webject>

<ie:webject name="Query-Objects" type="OBJ">

  <ieSmiley Tonguearam name="INSTANCE" data="$(session[]instance[])"/>

  <ieSmiley Tonguearam name="SESSION_ID" data="$(session[]session_id[])"/>

  <ieSmiley Tonguearam name="GROUP_OUT" data="roleB"/>

  <ieSmiley Tonguearam name="TYPE" data="wt.epm.EPMDocument"/>

  <ieSmiley Tonguearam name="WHERE" data="${@FORM[]Names1[]}"/>

  <ieSmiley Tonguearam name="ATTRIBUTE" data="*"/>

</ie:webject>

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

  <ieSmiley Tonguearam name="INSTANCE" data="$(session[]instance[])"/>

  <ieSmiley Tonguearam name="SESSION_ID" data="$(session[]session_id[])"/>

  <ieSmiley Tonguearam name="OBJECT_REF" data="$(roleA[0]obid[])"/>

</ie:webject>

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

  <ieSmiley Tonguearam name="INSTANCE" data="$(session[]instance[])"/>

  <ieSmiley Tonguearam name="SESSION_ID" data="$(session[]session_id[])"/>

  <ieSmiley Tonguearam name="FROM_OBJECT_REF" data="$(roleA[0]obid[])"/>

  <ieSmiley Tonguearam name="TO_OBJECT_REF" data="$(roleB[0]obid[])"/>

  <ieSmiley Tonguearam name="TYPE" data="wt.epm.structure.EPMReferenceLink"/>

</ie:webject>

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

  <ieSmiley Tonguearam name="INSTANCE" data="$(session[]instance[])"/>

  <ieSmiley Tonguearam name="SESSION_ID" data="$(session[]session_id[])"/>

  <ieSmiley Tonguearam name="OBJECT_REF" data="$(roleA[0]obid[])"/>

</ie:webject>

<ie:webject name="Commit-Transaction" type="ACT">

  <ieSmiley Tonguearam name="INSTANCE" data="$(session[]instance[])"/>

  <ieSmiley Tonguearam name="SESSION_ID" data="$(session[]session_id[])"/>

  <ieSmiley Tonguearam name="SESSION_ID" data="$(session[]session_id[])"/>

</ie:webject>

<ie:webject name="End-Session" type="ACT">

    <ieSmiley Tonguearam name="INSTANCE" data="$(session[]instance[])"/>

    <ieSmiley Tonguearam name="SESSION_ID" data="$(session[]session_id[])"/>

</ie:webject>

<ie:webject name="Return-Groups" type="GRP">

    <ieSmiley Tonguearam name="GROUP_IN" data="*"/>

</ie:webject>

When i execute the task i get the following error:

"wt.epm.util.EPMOperationVetoException: The object CAD Part - InvPart.ipt, A.1 is owned by Workgroup Manager, which will not permit changes by the current application"

Dose anyone have any suggestions as to how to prevent the Workgroup Manager from Vetoing me?

Cheers,

Merch.

1 REPLY 1

Re: I need help with the Create-Link Webject.

This error is because you have not set the application. Add this to your task.

<%

Group group1 = getGroup("roleA");

try {

  wt.epm.EPMContextHelper.setApplication(wt.epm.EPMApplicationType.getEPMApplicationTypeDefault());

}

catch (WTPropertyVetoException e) {

  // TODO Auto-generated catch block

  e.printStackTrace();

  }

%>

Also make sure that you are creating link on working copy.

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

  <ie:param name="INSTANCE" data="$(session[]instance[])"/>

  <ie:param name="SESSION_ID" data="$(session[]session_id[])"/>

  <ie:param name="FROM_OBJECT_REF" data="$(workingCopy[0]obid[])"/>

  <ie:param name="TO_OBJECT_REF" data="$(roleB[0]obid[])"/>

  <ie:param name="TYPE" data="wt.epm.structure.EPMReferenceLink"/>

</ie:webject>

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

  <ie:param name="INSTANCE" data="$(session[]instance[])"/>

  <ie:param name="SESSION_ID" data="$(session[]session_id[])"/>

  <ie:param name="OBJECT_REF" data="$(workingCopy[0]obid[])"/>

</ie:webject>

Hope it helps.

Binesh Kumar

Medtronic - MITG