Hi All
I need to provide a superuser session to a "Delegate" component.. When a normal user delegating a task to other user , need to provide a superuser session so i have customized a delegate comonent like this ...
public class DelegateWorkflowSuperuser extends DelegateWorkflowTask {
public void onInit(ArgumentList arg)
{
System.out.println("OnInit before");
super.onInit(arg);
System.out.println("OnInit after");
}
public IDfSession getDfSession(int arg0)
{
System.out.println("Inside DFSession");
IDfClientX clientx = new DfClientX();
IDfSession session1 = null;
try {
client = clientx.getLocalClient();
//create a Session Manager object
IDfSessionManager sMgr = client.newSessionManager();
//create an IDfLoginInfo object for user creddentials
IDfLoginInfo loginInfoObj = clientx.getLoginInfo();
loginInfoObj.setUser("username");
loginInfoObj.setPassword("password");
sMgr.setIdentity("dctpwidmsdev1", loginInfoObj);
//get the IDFsession instance by using getSession or newSession
session1= sMgr.getSession("docbase");
System.out.println("Superuser Login Name:"+session1.getLoginUserName()+" Session String"+session1.toString());
} catch (DfException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return session1;
}
}
Superuser session is creating in this component hopefully it will return the superuser session too... But still i am getting the error message that i dont have a permission to delegate a task... please help us to resolve the same...
Thanks
Mani