on 01-05-2011 2:45 PM
Hi everybody,
my purpose is to access the UWL-API from WDJ in order to get a list of workitems. I don't know why but i get always the following exception:
UWLExecption: Logged in users context or session doesn't exist
The user-id is correct and also the locale etc. but if this parameter are correct what could be the problem?
Used documents:
/people/kenichi.unnai/blog/2009/10/19/how-to-use-uwl-api-for-netweaver-bpm-tasks
/people/hiroyuki.otaki/blog/2010/10/08/netweaver-bpm-720-enhanced-task-notification
My System is 7.2 CE SP 3
public void findTask() throws WDUMException, UWLException, WDURLException {
String userRID = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("UserRID");
try{
// create UWL context
UWLContext uwlContext = new UWLContext();
IUser user = getUserID(userRID); //own method
uwlContext.setUser(user);
uwlContext.setLocale(user.getLocale() != null ? user.getLocale() : Locale.getDefault());
// get UWL service
IUWLService uwlService = findService(); //(IUWLService) WDPortalUtils.getServiceReference(IUWLService.ALIAS_KEY);
// begin session
IUWLSession uwlSession = uwlService.beginSession(uwlContext, SESSION_IDLE_TIMEOUT);
// build expression
Expression expStatusNew = new Expression(Item.STATUS, StatusEnum.NEW.toString(), ComparatorEnum.EQUAL_TO);
Expression expStatusProg = new Expression(Item.STATUS, StatusEnum.INPROGRESS.toString(), ComparatorEnum.EQUAL_TO);
ArrayList expList = new ArrayList();
expList.add(expStatusNew);
expList.add(expStatusProg);
CompoundExpression exp = new CompoundExpression(expList, null, null, true);
// iterate over all UWL items
IUWLItemManager itemManager = uwlService.getItemManager(uwlContext);
UWLView uwlView = uwlService.getViewManager(uwlContext).getViewForItemType(ItemType.UWL_ITEM, uwlContext);
//---hier i get the error message: UWLExecption: Logged in users context or session doesn't exist
QueryResult result = itemManager.refreshCacheAndGetItems( uwlContext, uwlView, null, exp );
}catch (Exception ex){
ex.printStackTrace();
}
regards,
Sid
The user had also come from the context, so i had to set the authentication checkbox for the WD-Application.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.