Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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)?

0 votes


Accepted answer

Permanent link
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

0 votes


5 other answers

Permanent link
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.

0 votes


Permanent link
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.

0 votes


Permanent link
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.

0 votes


Permanent link
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.

0 votes


Permanent link
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?

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,927

Question asked: Jan 18 '11, 7:20 a.m.

Question was seen: 6,050 times

Last updated: Jan 18 '11, 7:20 a.m.

Confirmation Cancel Confirm