It's all about the answers!

Ask a question

How to know who is saving the WI (user or participant)?


Eduardo Bello (4401821) | asked Jan 18 '11, 7:20 a.m.
I wonder if there is any method that lets me know if the save event was triggered by a user or by a participant/advisor.

Because sometimes I need to make some changes to workitem within a participant and this causes the same participant to be called again.

Maybe some info in parameters (AdvisableOperation, IProcessConfigurationElement, IParticipantInfoCollector, IProgressMonitor)?

Accepted answer


permanent link
Eduardo Bello (4401821) | answered Mar 10 '11, 4:50 p.m.
Because I simply hate leaving a topic without a solution, I'll quickly explain the solution that I'm using and is working for me.

I have a common Plug-in, that all my Participants and Advisors can access. So, inside this common plug-in I have methods to manage what Participants/Advisors are currently running, and who called those Participants/Advisors.

I'm using java.util.concurrent.ConcurrentHashMap (thread-safe) to store the informations and the follow function to get the current session id (which helps to unique identify the caller)


/**
* Return the current session id
*
* @return
*/
public String getSessionId() {
TeamServiceContext current = TeamServiceContext.getCurrent();
if ((current!=null) && (current.getHttpServletRequest()!=null) && (current.getHttpServletRequest().getSession()!=null)) {
return current.getHttpServletRequest().getSession().getId();
} else {
return null;
}
}


I hope this info helps someone... But what I really hoped for was a greater involvement of Jazz Team in this forum.
Ralph Schoon selected this answer as the correct answer

5 other answers



permanent link
Eduardo Bello (4401821) | answered Mar 10 '11, 7:17 a.m.
As nobody has the answer, I started to develop a manager by myself. But I need an unique identifier to logged user.

I can't use getAuthenticatedContributor(), because here some accounts are shared. So, I plan to use the session id, but how can I get session id inside an IOperationParticipant?

If I cannot use session id, which unique identifier should I use?

permanent link
Eduardo Bello (4401821) | answered Feb 09 '11, 12:14 p.m.
Thanks quadrix :)

Yes I already have a common plugin, and yes, I could implement some sort of control at this plugin. But as I said, I think there is a native way (better performance, efficiency and architecture) to get that simple information.

Thank for the answer anyway

Hi, Eduardo

Try to create common plugin that will store some additional info about that who work with concrete workitem object. Other your plugins will write and read this info.

permanent link
Marat Fayzullin (16) | answered Jan 28 '11, 3:51 a.m.
Hi, Eduardo

Try to create common plugin that will store some additional info about that who work with concrete workitem object. Other your plugins will write and read this info.

permanent link
Eduardo Bello (4401821) | answered Jan 26 '11, 12:54 p.m.
This is really important... I had many Plug-ins Participants running on server, I need to ignore some of them if they are triggered by another participant (sometimes itself).

My company spent more than 1 million dollars in Rational Products, but the support isn't that great here in Brazil. And here, they know almost NOTHING about extending RTC, so my only source of knowledge is either the forum or the wiki. But again, when you spend that kind of money, you hope for something better.

I know Jazz Team spends a lot of time here, trying to answer our questions, but I think IBM must do a greater effort to improve this forum.

permanent link
Eduardo Bello (4401821) | answered Jan 20 '11, 12:08 p.m.
Nobody to help me on this one?

I could try many ways, but I'm pretty sure that there is a native correct way to this.

Your answer


Register or to post your answer.