It's all about the answers!

Ask a question

Retrieve a workspace from a project area


Michele Pegoraro (1.8k14118103) | asked Aug 28 '09, 10:44 a.m.
Hi, there's a way to find out the workspace (or the streams) of a project area?
I know that on client side I could use IWorkflowManager.findWorkspace method, but on the server side which class and method do I have to use?

I'm trying to develop a follow-up action which creating a baseline and so I need to retrieve the stream workspace.
Any answer will be appreciate.

4 answers



permanent link
Michele Pegoraro (1.8k14118103) | answered Sep 09 '09, 10:51 a.m.
Does anyone know a service similar to IWorkflowManager which can be used on server side?

permanent link
Nick Edgar (6.5k711) | answered Sep 09 '09, 3:31 p.m.
JAZZ DEVELOPER
In general you use IQueryService to find things on the server side, but due to SCM's custom read permissions, they must use their own (internal) IScmQueryService. Its findWorkspaces method is the server-side implementation of the client-side IWorkspaceManager.findWorkspaces.

But note that a given project area may have many streams, and I doubt you would want to create baselines for all of them. It would help to know more about your use case.

It may make more sense to have your follow-up action specify the stream (and components?) to operate on as part of its configuration.

permanent link
Michele Pegoraro (1.8k14118103) | answered Sep 10 '09, 3:57 a.m.
Thank you nedgar, your answers are always precious to me.

My scenario is quite locked beause I have only three stream on projects, and I want to take snapshot only of one of these. I have a work-item which has a long developing workflow which passes between all these three streams. After a deliver on the last stream and a build related to a workspace linked to this stream, the work-item has a "close" action. I want to catch this change-state using a follow-up plugin on save-wi (I prefer this way instead of event handler because it is synchronous) and than create the baseline on this last stream.

On your answer you was referring to specific operation on which link a follow-up related to stream or component. I don't see specific operation for stream in the default behaviour operation. Would I have to create a new one operation id or is there something else that I can't find?
Thanks again.

permanent link
Nick Edgar (6.5k711) | answered Sep 10 '09, 9:32 a.m.
JAZZ DEVELOPER
>I don't see specific operation for stream in the default behaviour operation.

I'm not 100% clear on what you're asking here, but I think you're referring to what I said above:
> It may make more sense to have your follow-up action specify the stream (and components?) to operate on as part of its configuration

For this, you wouldn't need to introduce any new operations, but add configuration data to your follow-up action to specify which stream it should act on. For example, the process configuration/customization XML could specify:

<operation>
<followup>
<followup>
<stream>
</followup>
</followup>
</operation>


Then in your follow-up action implementation, you would look up the stream name, find the stream by name, then create the baselines / snapshot.

Your answer


Register or 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.