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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Webject Session/Transaction Question

MichaelWright
1-Visitor

Webject Session/Transaction Question

Hi All,

I am in the process of composing a webject to transfer attributes that have been defined in a workflow and place them in the attributes of the WTDocument. I have the concept working with the Checkout, Update, and Checkin, but am having issues surrounding the Start-Session and Start-Transaction. I received a template from a colleague and unfortunately that is all it is is a template and he doesn't know why I am receiving the error I am either. The Coding I am using is:


<!--
Start Session Webject
---------------------
- Generates a new unique Session ID
-->
<ie:webject name="Start-Session" type="ACT">
<ie:param name="INSTANCE" data="<%= instance %>"/>
</ie:webject>

<!--
Start Transaction Webject
-------------------------
- Creates a new transaction
-->
<ie:webject name="Start-Transaction" type="ACT">
<ie:param name="INSTANCE" data="<%= instance %>"/>
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
</ie:webject>


<!--
Check Out Objects Webject
-------------------------
- Objects must be checked out first, in order to update their IBAs
-->
<ie:webject name="CheckOut-Objects" type="ACT">
<ie:param name="INSTANCE" data="<%= instance %>"/>
<ie:param name="TYPE" data="WCTYPE|wt.doc.WTDocument"/>
<ie:param name="WHERE" data="number=<%= docNumber %>"/>
<ie:param name="GROUP_OUT" data="checked_out"/>
</ie:webject>

<!--
Update Objects Webject
----------------------
- Update the objects in the checked_out info engine group only
-->
<ie:webject name="Update-Objects" type="ACT">
<ie:param name="INSTANCE" data="<%= instance %>"/>
<ie:param name="TYPE" data="WCTYPE|wt.doc.WTDocument"/>
<ie:param name="OBJECT_REF" data="${checked_out[]obid[]}"/>

<!-- update happens here -->
<ie:param name="FIELD" data="IBA|<%= attributeName1 %>=<%= attributeValue1 %>"/>


<ie:param name="MODIFICATION" data="REPLACE"/>
<ie:param name="GROUP_OUT" data="retDoc"/>
</ie:webject>

<!--
Check In Objects Webject
------------------------
- Check In the updated objects
-->
<ie:webject name="CheckIn-Objects" type="ACT">
<ie:param name="INSTANCE" data="<%= instance %>"/>
<ie:param name="type" data="WCTYPE|wt.doc.WTDocument"/>
<ie:param name="GROUP_IN" data="retDoc"/>
<ie:param name="GROUP_OUT" data="modified_documents"/>
</ie:webject>

<!--
Commit Transaction Webject
--------------------------
- Closes the transaction
-->
<ie:webject name="Commit-Transaction" type="ACT">
<ie:param name="INSTANCE" data="<%= instance %>"/>
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
</ie:webject>

<%

// DOCUMENT CHECKIN AND CLOSURE COMPLETE - END THE SESSION

try{
%>
<!--
End Session Webject
-------------------
- Ends the session
-->
<ie:webject name="End-Session" type="ACT">
<ie:param name="INSTANCE" data="<%= instance %>"/>
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
</ie:webject>
<%
}catch(Exception e){
String myExceptionMessage = e.getMessage();
}
%>

The Error that I am getting when I try to run the process is:

Errors: wt.util.WTException: com.infoengine.util.IEException: Anonymous access to the session with id "gonb4rka;3448;150930" is not allowed. Nested exception is:
(wt.adapter.adapterResource/17) wt.util.WTException: Anonymous access to the session with id "gonb4rka;3448;150930" is not allowed.
Nested exception is: com.infoengine.util.IEException: Anonymous access to the session with id "gonb4rka;3448;150930" is not allowed. Nested exception is:
(wt.adapter.adapterResource/17) wt.util.WTException: Anonymous access to the session with id "gonb4rka;3448;150930" is not allowed.
Nested exception is: wt.util.WTException: com.infoengine.util.IEException: Anonymous access to the session with id "gonb4rka;3448;150930" is not allowed.

and of course that repeats on and on. Does anybody have any clue what is causing this error to arise? Any help is greatly appreciated, thanks.

1 REPLY 1

Try to groupout the session.

<ie:param name="GROUP_OUT" data="session"/>

How many method server is configured ?

Announcements


Top Tags