How to know who is saving the WI (user or participant)?
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)?
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
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 usingjava.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)
I hope this info helps someone... But what I really hoped for was a greater involvement of Jazz Team in this forum.
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
/**
* 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.
5 other answers
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.
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.
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
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.
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?
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?