Refresh Session Data

Options
Vladimir_P
edited November 21, 2012 in Documentum #1

Hello, I'm getting trouble with getting correct data from sessions.

I'm using Documentum 5.3 SP2 with Webtop 5.3.

Let's say document promoted to coordination state from new state. The initiator and the signer of document is the same person, the coordinator differs. In a couple of minutes document returned from coordination to signing. When initiator(signer) opens the document attibutes some fields is disabled because of user has no permits BUT the permits was given on the previous stage. It was just the one example, there are many similar situations.

The problem seems to be in outdated session data. When user log out and then log in again everything works fine, but when he remains logged in there are problems. Another way to get it works - wait for timeout, which is 5 minutes long. I suppose that session need to be refreshed somehow, to get fresh data about objects and their's permissions.

I've tried to do this using IDfSessionManager methods getSession or newSession, according to developers documentation:

m_session =  sessionManager.newSession("docbase_name");

Then i get objects from this session with following releasing of it:

IDfPersistentObject sysobj = m_session.getObject(id);sessionManager.release(m_session);

Nevertheless, it's not working, when i get the permission for that object it's incorrect. I would be appreciate for any suggestions.

Best Answer

  • bacham2
    edited November 20, 2012 #2 Answer ✓
    Options

    If the object was in wour DFC cache prior to the lifecycle operation, you will need to issue a IDfSysObject.fetch() to force DFC to retrieve it a fresh copy from the docbase.

Answers

  • bacham2
    edited November 20, 2012 #3 Answer ✓
    Options

    If the object was in wour DFC cache prior to the lifecycle operation, you will need to issue a IDfSysObject.fetch() to force DFC to retrieve it a fresh copy from the docbase.

  • TrofimovM
    edited November 20, 2012 #4
    Options

    Check for unfinished transactions. Every session.beginTrans() needs session.commitTrans or session.abortTrans() (same rule if you use sessionManager transactions)

  • Vladimir_P
    edited November 21, 2012 #5
    Options

    Thank you, it works great! Just added sysObj.fetch(typename); on previous activity's code...Thanks for help!