Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

can't reassign task !

Not applicable
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
2 Replies
Jasmin_Charbonn
Level 10
Level 10
I'm not sure if psf.setUserId works with tblue.



Can you try to use psf.setCommonName instead.



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



and I' have the same exception