I am implementing java extension to implements IPSWorkflowAction. This extension is invoked by CMS Server at the transition on a reminder date set for the content item.
At the performAction(), I am able to get the content id, state id etc…
Now, In order to read certain content item fields, I am doing a loaditem like this…
initServices();
IPSGuid cid = gmgr.makeGuid(new PSLocator(contentId));
List<IPSGuid> glist = Collections.<IPSGuid>singletonList(cid);
List<PSCoreItem> items = cmgr.loadItems(glist, true, false, false,false);
where initServices() is
gmgr = PSGuidManagerLocator.getGuidMgr();
cmgr = PSContentWsLocator.getContentWebservice();
I get exception for the loadItems
An internal error (end-condition) was encountered. An unexpected exception occurred:
An unexpected exception occurred. The reason was: An exception occurred while pr
ocessing the internal request handler call: java.lang.IllegalStateException: No
user name set in current request information. Please consult the log for further
information…
The call-stack was:
com.percussion.data.PSInternalRequestCallException: An exception occurred while
processing the internal request handler call: java.lang.IllegalStateException: N
o user name set in current request information
at com.percussion.cms.handlers.PSWorkflowCommandHandler.makeInternalRequest(Unknown Source)
at com.percussion.cms.handlers.PSContentEditorHandler.makeInternalRequest(Unknown Source)
at com.percussion.server.PSInternalRequest.Ò00000(Unknown Source)
at com.percussion.server.PSInternalRequest.performUpdate(Unknown Source)
at com.percussion.server.agent.PSAging.makeInternalRequest(Unknown Source)
at com.percussion.server.agent.PSAging.transitionItem(Unknown Source)
at com.percussion.server.agent.PSAging.run(Unknown Source)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
According to API Recommendations, we should do
List<PSCoreItem> items = cws.loadItems(glist, true, false, false, false, session, user);
However, when I try to use this, it says this is deprecated. Also, what is the user/session in workflow action case?
Thanks,
Rajesh