Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Get user information in shared queue

Avatar

Level 4

Hi all,

The case is:

- My queue shared to some user (say A, B abd C)

- After some task assign to me I would like to send the email to all user shared my queue too (i.e. A, B and C)

Would like to know if there are any way to find the user information (login id, UID etc....), so I can find there email address?

Thanks in advance.

Regards

Bill

1 Accepted Solution

Avatar

Correct answer by
Level 10

What about using the getUsersWithAccessToTask() from the TaskManager API? See http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/javadoc/com/adobe/idp/taskmanager/dsc/c....

Also for you event question, You could leverage the TaskComplete event to get a notification when the task is completed. That way you'll get the email only when the task is completed.

Jasmin

View solution in original post

10 Replies

Avatar

Level 4

I have the same question.  How do we send email to the users who have been granted shared queue access?  Is it similar to groups where the shared queue members are sent an email AFTER they claim an task?

I've looked around the database so I can write the process to send the email myself but I'm not sure where the queue sharing settings are stored.

Avatar

Level 4

Hi,

I am trying to send the email when the task assign to the user who own the shared queue, but after I research the event object, it seem that it is not the same as the event we use in the event driven programming... so I just give up and send the email BEFORE assign the task.

After I look at the system db tables again and again, I come up with the following SQL, which the result look like what I want, feel free to try at your environment:


I am still asking Adobe support for the official method to get the above information, because I think the system tables may change in system update, so... use at your own risk.

Wish it help.

Regards

Bill

Avatar

Correct answer by
Level 10

What about using the getUsersWithAccessToTask() from the TaskManager API? See http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/javadoc/com/adobe/idp/taskmanager/dsc/c....

Also for you event question, You could leverage the TaskComplete event to get a notification when the task is completed. That way you'll get the email only when the task is completed.

Jasmin

Avatar

Level 4

Bill,

Thanks.  We must be working with different versions/databases because I don't have the tb_shared_users_2_queues table.  Here is the query(not optimized) that I'm using for 8.2.1.

SELECT email from EDCPRINCIPALENTITY WHERE ID IN
     (SELECT SHARED_QUEUES_ID FROM TB_57 WHERE OID IN
             (SELECT OID FROM TB_57 WHERE SHARED_USERS_ID IN
                     (SELECT OID FROM TB_57 WHERE OID = SHARED_USERS_ID AND SHARED_QUEUES_ID =
                             (select ID FROM EDCPRINCIPALENTITY WHERE canonicalname = ?)))) AND canonicalname <> ?

Avatar

Level 4

Hi Jasmin,

Thanks for the reply.

Your solution look great, but I still have a few question about it:

1) I have no idea how to make use of the event

   (Searched the web and find no example, tried by myself with no luck)

2) I need to send the email to notify the user when task assigned but not when task completed

   (I will need another event to do so)

3) The function  getUsersWithAccessToTask() belong to a interface, and as far as I know, interface should be a empty function, or maybe the interface in ALC are difference from the java one?

Regards

Bill

Avatar

Level 4

I think our DB version are difference, sorry that my SQL can't help at all.

Avatar

Level 10

1) Create a new process, and from the Event view drag the TaskCreated event and select Start Point. A Start Point will ensure your new process will only be started when it receives an event of type TaskCreated.

2) You can use the built in capabilities to do that. Go in adminui under Process Management/Server Settings/Task Notifications, click on Task Assigment and make sure they are enabled. You also need to make sure email notification is enabled in workspace under preferences.

3) You can use an instance that class that implements this interface by using TaskManagerClientFactory.getTaskManager().

Jasmin

Avatar

Level 4

Hi,

Thanks for all the help, and sorry for the late reply because was very busy recently.

My problem is:

1) When use the Task Manager function I need the Task ID, but the workflow stop to flow when it arrive the Assign Task service (i.e. I cannot execute any more code), and I have no idea how to get the Task ID too.

2) Look like that I can solve problem 1 by using a TaskCreated event, but before I can use a Event Start Point or Event Receiver, I need to throw the event, but it look like that I should throw the event before (which mean the task do not exist yet) or after (which mean the task completed) the Assign Task service, which look like both can not solve my problem

3) The Task ID in the event type will need to assign by the developer, which I have no idea how can I find the task id

Sorry for the long question

Regards

Bill

Avatar

Level 10

2) You don't have to throw the TaskCreated event. The User service will take care of throwing the event for you. All the Task Manager events are thrown automatically. You just have to worry about catching the event.

3) The task id is created automatically. This is internally to keep track of the task. It can't be overwritten. If you need a custom id, you would need to create a separate variable for it.

Jasmin

Avatar

Level 4

Hi Jasmin,

Thanks for all your help.

Finally, I succeeded to get the email of the shared queue user by using event and ALC java API.

And it is really a good start point for me to understand how the events work and how to use browse the ALC java API online doc, I really have a hard time to find any reference to use both the event and ALC java API.

Thanks!

Regards

Bill