can't reassign task !

Avatar

06-08-2008

Hi everybody!



is here my code :



try{

//Set connection properties

Properties ConnectionProps = new Properties();

ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "jnp://172.31.196.43:1099");

ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_EJB_PROTOCOL);

ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, ServiceClientFactoryProperties.DSC_JBOSS_SERVER_TYPE);

ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "apink");

ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");



//Create a ServiceClientFactory object

ServiceClientFactory myFactory = ServiceClientFactory.createInstance(ConnectionProps);



//Create a TaskManager object

TaskManager myTaskManager = TaskManagerClientFactory.getTaskManager(myFactory);



//Get the user identifer by calling

//a user-defined method

String userID = getUserId(myFactory);



//Forward task to another user

myTaskManager.forwardTask(17,userID);

}

catch(Exception e)

{

e.printStackTrace();

}

}



As you can see, I use the user apink ( because it's the owner of the task N°17 )



my method getUserId() :



static private String getUserId(ServiceClientFactory myFactory){

String oid = "";

try{



//Create a DirectoryManagerServiceClient object

DirectoryManagerServiceClient dirClient = new DirectoryManagerServiceClient(myFactory);



//Find a local user

PrincipalSearchFilter psf = new PrincipalSearchFilter();

psf.setUserId("tblue");

List principalList = dirClient.findPrincipals(psf);

Iterator pit = principalList.iterator();



User testUser = null;

if (pit.hasNext())

{

//Obtain the principals object identifier

testUser = (User)(pit.next());

}

oid = testUser.getOid();

}

catch(Exception e)

{

e.printStackTrace();

}



return oid;

}



I have this exception :



com.adobe.pof.POFException: No Active User in an Active Domain found for Principal ID:



If I use "administrator" instead of "apink" I have this exception



com.adobe.idp.taskmanager.dsc.client.task.TaskNotFoundException: Task: 17 was not found, or it is not in the correct state for the operation you are attempting - task not reassigned.



Anyone have an Idea ?



Thanks



Thomas

Replies

Avatar

Avatar
Coach
Level 10
Jasmin_Charbonn
Level 10

Likes

149 likes

Total Posts

2,154 posts

Correct reply

97 solutions
Top badges earned
Coach
Give Back 1000
Give back 900
Give Back 800
Give back 600
View profile

Avatar
Coach
Level 10
Jasmin_Charbonn
Level 10

Likes

149 likes

Total Posts

2,154 posts

Correct reply

97 solutions
Top badges earned
Coach
Give Back 1000
Give back 900
Give Back 800
Give back 600
View profile
Jasmin_Charbonn
Level 10

06-08-2008

I'm not sure if psf.setUserId works with tblue.



Can you try to use psf.setCommonName instead.



Jasmin

Avatar

06-08-2008

Thanks, but i'm trying with setemail("apink@sampleorganization.com")



and I' have the same exception