JMX Monitoring of a CLM Tomcat Server only with the CLM Webinterface


rsjazz:

Stefan is doing some amazing work here and I think you might be interested. This is an example for server monitoring in a dashboard.

Originally posted on Steve Blog:

[Update: Source Code now with Garbacollector]
Sometimes it is necessary to tackle down CLM performance issues. To monitor the OS resources like CPU, IO, Memory etc. is not really helpful, because Java is like a black box for an OS like LINUX. With JMX you can look “behind the scene”.

You can monitor the Heap, Threads, Memory and other things from a CLM  Tomcat Server. With the help of some JMX settings you can access this information with jconsole. jconsole is include in every Java JDK (not JRE) since 1.5.

But JMX has some disadvantages:

  • Only Java
  • Problems with firewalls. Especially Productive CLM server are in a protected environment, so it is nearly impossible to get access with your jconsole.
  • “All or nothing” protection

Today we will create a Open Social Widget that will show the amount of running Threads, Heapsize, CCM Requests and Garbage Collector with the help of JMX…

View original 749 more words

Posted in Jazz | Leave a comment

RTC Extension Workshop Overhaul


It took a while, but the Rational Team Concert Extension Workshop overhaul was finally published on Jazz.net.

The new version of the workshop provides

  • Compatibility to newer versions of RTC
  • Compatibility to all RTC and CLM installation types
  • Enhanced, simplified setup
  • Small enhancements of the workshop to address minor changes in the SDK

 What did change?

The Rational Team Concert Extension Workshop is one of the most used workshops on the Jazz.net library. Unfortunately several changes in RTC since its design for RTC 3.0 caused a lot of problems for users. It needed a major change in how the required RTC repository is set up to make it easier to consume.

The main challenge was the set up of the RTC Development repository. The workshop was designed to use TAR database exports created with the repotools to import them and provide the repository as presented below. This repository contains the required development data which is accessible in a repository workspace and a stream.

ExtensionWorkshop Development Repository

As described in this series of posts, the solution was to create the required project, stream and workspace using the Plain Java Client Libraries and upload the required source code to the stream.

The new workshop now uses a small Java Tool WorkshopSetup working with the Plain Java Client Libraries to create the project and to upload the content required to run the workshop.

This allowed to remove the steps to import the repository content from the TAR files, which overwrite the repository you set up and rely on a specific setup of the servers done before to avoid conflicts. Since the repository is no longer overwritten, there are no more potential issues with public URI’s and registered applications. It is also no longer necessary to recreate the index files after the import. All these steps where very manual, error prone and time consuming and the workshop is now much more consumable.

The server setup can now use the express setup and is less manual and much faster.

Since the repository is created during the server setup and not overwritten, the evaluation licenses are not expired. There are no license issues anymore. The step to upload the 10Free licenses could be skipped entirely and performed later, once the evaluation licenses expire, if one so desires.

The workshop workbook uses the Web install for RTC to as default, but it also describes how to use the Plain ZIP version of RTC. I typically use the latter approach which has some advantages. One of it is, that Installation Manager is not involved and I can safely just delete the files, instead of doing an uninstall. This also works offline or with small bandwidth, if the files are already downloaded.

The WorkshopSetup tool can actually be run against any existing repository and it does not mater which other applications are installed. It should always be able to create the project and upload the content. If you want to start all over with the workshop, it would also be possible to run the WorkshopSetup tool multiple times (e.g. renaming the old RTC Extensions Workshop project).

The WorkshopSetup tool is started using a batch file or shell script. It will work if you follow the setup instructions. However, you can configure it, if needed. The parameters to configure it are highlighted in the image below.

WorkshopSetupThere are no requirements on the administration user ID anymore, except that it is easier to follow the workshop workbook, if you use the proposed names. If you want to use a different ID, modify the user id and password entries in the workshop setup batch file.

The removal of the repository exports also reduces the download size considerably.

Another benefit of the change is that the source code, licenses, the configuration and debug launch files are now available as exported Eclipse projects that can be used even without having to run the workshop at all. E.g. the launches and configuration files are in the file WorkshopSetup/Data/Configuration/RTCEXTConfiguration.zip.

The server launch configurations now contain all the bundles for the licenses that are used in the different ways to package RTC and CLM. Just import the ones from your setup and you are ready to go.

As long as there are no drastic changes to the Plain Java Client Library API the WorkshopSetup tool should work with any version of RTC in the future. It is no longer necessary to start with RTC 4.0 and then to upgrade the repository. I ran the tool with all available RTC 4.x versions up to 4.0.6 and it worked with no problems. The WorkshopSetup tool works also with RTC 3.0.x and it is safe to assume it will also work with upcoming versions of RTC.

In addition to these major changes, the launch configurations were tidied up to better map to the newer structures in RTC 4.x.

Some feedback from users was also used to make small changes in the labs to make things clearer, easier to follow and address small changes in the API since 4.0 in the text and screenshots.

Summary

A lot of effort went into making the Rational Team Concert Extension Workshop easier to consume and make it compatible to other RTC versions. I hope the result helps users out there to get started with RTC Extensibility and saves some of the precious time. If you have suggestions or run into problems, please provide feedback and questions on Jazz.net in the Forum.

 

Posted in Jazz, RTC, RTC Automation, RTC Extensibility | 2 Comments

Impacts of having Multiple CCMs in your RTC deployment


rsjazz:

Tim and I would be really interested in any feedback you could provide on Tim’s blog post.

Originally posted on Tim Feeney's Blog on Jazz:

My colleague Ralph Schoon (rsjazz.wordpress.com) and I are working on documenting the motivations, tradeoffs, pros and cons when deploying multiple instances of the same Jazz application. That is, cases where you have more than one CCM server and/or more than one QM server registered to the same JTS.

Our findings and guidance will eventually make its way to the Rational Deployment Wiki and an Innovate 2014 presentation. I wanted to begin to surface some of the findings now to perhaps uncover some things we haven’t yet.

Jazz allows Multiple CLM Applications

It is possible to deploy multiple instances of the same application each registered to the same JTS. Today this is possible for the Change Configuration Management (CCM) and Quality Management (QM) applications. The Requirements Management application does not yet support multiple instances yet, however, follow RM Plan Item 76315 to track progress towards that.

There are several…

View original 379 more words

Posted in Jazz, RTC | Leave a comment

Hiding UI Contributions in the RTC Eclipse Client


Is it possible to hide UI Elements in the RTC Eclipse client? This is a question I have been asked several times already. I always thought it would only be possible to add new UI elements but not hide them. Javier’s initial question and his example on Jazz.net prove that I was completely wrong. Sorry, but I was simply not aware of this capability.

Why is this interesting?

This is interesting, because if you want to extend the RTC Client UI with context menus, you might want to also be able to remove existing UI elements like context menus.

One use case is described in Javier’s question and example. Another example could be to do some checking before someone can complete a change set in the RTC Eclipse UI.There is no extension point that you can use to prevent completing and once it is completed, you can’t reverse the operation. If you could remove the context menu entry and provide a new one that  does some checking before calling the original action, you could greatly enhance this scenario with very few effort.

The Approach

Javier’s example shows how this can be done based on Activities in Eclipse extending the org.eclipse.ui.activities extensionpoint.

The basic idea here is to define Activities. These Activities can then be bond to

  • Existing Activities – e.g. to make sure the UI defined in an Activity will only be enabled and show if the existing Activity is enabled
  • Categories – to group several activities and enable/disable them together
  • UI Contributions

Now you can enable and disable the UI elements defined by this Activity.

If you don’t enable an activity, the UI element is hidden. Dependent on how the Activity is defined, there are different ways to enable and disable the activity, for example using Categories in the preference, or the Activity API. In addition there is an expression based activation mechanism.

See the Eclipse Documentation for Activities for more information.

Example

Lets stay in the area of the example with completing a change set above. We want to disable the context menu entry for the complete Change set action.

First it is necessary to create the plugin and to create the extension for the Activity. Create the plugin with the name com.ibm.js.team.activity.scm.cscomplete for example. Add an extension to the org.eclipse.ui.activities extension point and use com.ibm.js.team.activity.scm.cscomplete.activity as the id of the Activity.

Now it is possible to add a new activityPatternBinding for the menu item to be hidden and bind it to the the Activity com.ibm.js.team.activity.scm.cscomplete.activity defined before.

The plugin.xml looks like below.

Plug-in XML code

The new activityPatternBinding requires a pattern to map to the UI element. The pattern format is

plug-in-identifier + "/" + local-identifier

This is now the challenge. Where to get the ID’s reqired? As described in the last post, it is possible to use inspection tools such as YARI – Yet Another RCP Inspector, to get this data.

By using the Yari SWT Inspector this information can easily be gathered. Prepare an outgoing change set in the pending changes view. Open the SWT Inspector and set it to mouse down capture mode. Then select the Complete action on the context menu entry. Disable capture mouse down and inspect the data captured.  This screenshot shows the data that was gathered.

YARI SWT Data CaptureThe interesting information is the ID of the action and the ID of the plugin. This data can be copied and pasted over to create the pattern.

The plugin Id is com.ibm.team.filesystem.ide.ui and the Id of the action to hide is com.ibm.team.filesystem.ui.changes.actions.CloseAction.

The pattern follow the rules of java.util.regex. The pattern rues are described here. Please note, that the period is a special character and needs to be escaped. The pattern we are looking for is therefore:

com\.ibm\.team\.filesystem\.ide\.ui/com\.ibm\.team\.filesystem\.ui\.changes\.actions\.CloseAction

The final plugin.xml looks as follows.

Resulting Plugin.xmlIf this plugin is deployed, the complete change set action does not appear any longer in the context menus, as long as the Activity does not get enabled, e.g. using the API.

Does this mechanism also work for the RTC Web UI? I am reasonably sure that this is not the case, unfortunately.

Summary

This allows to further modify the UI of the RTC Eclipse Client (or any other Eclipse based UI’s) and to easily hide UI elements. Since it is also possible to add your own UI elements this allows a fine grained modification especially in the context of extending RTC.

As always, I hope this content helps others out there to get their work done.

Posted in Jazz, RTC, RTC Extensibility | Tagged , , , | 1 Comment

Adding Context Menus for Jazz Objects to the RTC Eclipse Client


Is it possible to add customized actions to the context menus in Eclipse? This is an interesting question that recently came up  in the context of my work.

This post shows how this can be done, in case you are asked to do this kind of work. It explains

  • What extensions are possible in general
  • What you need to know to try to create such extensions
  • How to get at some of the data you need
  • A simple example that shows the main steps you need to take and the most interesting code snippets

As always, the code in this post is derived from examples from Jazz.net as well as the RTC SDK. The usage of code from that example source code is governed by this license. Therefore this code is governed by this license, which basically means you can use it for internal usage, but not sell. Remember that this code comes with the usual lack of promise or guarantee. Enjoy!

The Example

The example adds a context menu action on snapshots. It provides an example for an action directly in the context menu as well as an example for a sub menu that can be used to organize several actions. The outcome looks like below.

Pop up menu action for a Snapshot

Pop up menu action for a Snapshot

If the action is performed, the example will get the object and do something with it.

What Can be Extended?

I knew that this would be possible in general. I have created such context menu extensions for our Eclipse based modelling tools in the past. Eclipse is built to be extended. In general you can create all kinds of tools that extend Eclipse. For example

  • Eclipse Views – Tree, Table, Table Tree Views
  • Eclipse Editors
  • Eclipse Menus – menu bars, custom actions, pop up menus
  • Extend existing Eclipse extensions e.g. provide context menu extensions or add functionality
  • Decorators for tree views

All these capabilities are described in numerous books about extending Eclipse and in even more tutorials available on the web. This article describes how to create menu contributions. I won’t go too deep into what is covered in these information sources. Instead I will try to focus on the interesting topics related to RTC.

What is the Problem?

So, if this is all possible, why blog about it here? The problem is, that all these extensions require information about the objects and editors you want to extend. As an example a pop up menu contribution providing an action to the context menu of a view requires the class of the object that is provided in the tree node to work. Without this information you can’t do anything.

I found it very hard to get the information in the past. You can obviously start with a very general object and try to debug. However this can be very tedious. How can you find this information more efficient?

The answer to that is using tools available to find the information. I will show some of the tools available and how they can be used. Lets get started with creating our example.

Example Project

We want a pop up menu extension that allows to perform some action on a snapshot in some views.

The easiest way to start is to use the Plug-in Project wizard Use File>New>Project and create a Plug-in Project. Pick a good project name. As a best practice I always use a naming pattern that is aligned with the naming patterns used in Jazz, adding a unique infix that will later allow me to search for the code in case it is deployed. As an example I use com.ibm.js.team.filesystem.snapshot.menucontribution. Then use Next to go to the next specification step. As a best practice use the name as ID and specify the other values. The image below shows my choices.

Specify the project properties

Specify the project properties

Use Next to get to the extension templates. Select Plug-in with a Popup menu and click Finish. The wizard does its miracles and you now have a new project.

Inspecting the project reveals a plugin.xml and a new action class have been created. The project is fully functional. It would be possible to start an Eclipse Client Debug run-time and find a new pop up menu if clicking on a file in the Eclipse Navigator, Project Explorer or other views. If you click on a snapshot in the search view, you see – nothing.

However, that is not our target. What makes this work and what needs to be done to make this work for the given example?

For what objects this works is basically hidden in the plugn.xml. It looks as follows:

Generated Plugin XML

Generated Plugin XML

The extension is an object contribution. It works for objects displayed in views that are of the class org.eclipse.core.resources.IFile. The menu defines a sub menu that is inserted before a place called additions and defines a new menu group group1. The Action in this sub menu enables for selections of one element and calls the specified action class.

A snapshot is not of the class org.eclipse.core.resources.IFile. So much is clear, but what class do we need here?

YARI – Yet Another RCP Inspector

One way of finding out this crucial detail, that works for me, is using one of the many Eclipse inspection tools. I found YARI – Yet Another RCP Inspector searching the Web due to a hint and use this tool since then. It needs to be installed into Eclipse as described in the install instructions. Once installed it provides various new views that you can use to inspect Eclipse RCP applications, including Eclipse itself. The data it provides can be overwhelming at times, but is very useful. Use the documentation and FAQ’s provided to understand better what you can find in the data.

To find out what is exposed in the search view for a snapshot, open the view SWT Inspector that YARI provides.

Now search for a snapshot. Select the ‘capture mouse down‘ action in the SWT Inspector and click on the snapshot in the search view. Click at the ‘capture mouse down’ action in the SWT Inspector again, to switch it off. Now you can look at the captured data and use the mouse without capturing again.

The inspected data

The captured data

Look at the captured data. The data node in the TableItem element is what we need in this context. The class that is exposed here is class com.ibm.team.filesystem.ui.wrapper.SnapshotWrapper. This is basically the class that we need in the object contribution.

Plug-in Spy

Another Tool, that you can use to look under the covers of Eclipse extensions, is Plug-in Spy. This tool is now bundled with Eclipse in the Plugin Develupment Environment (PDE). You can invoke Plug-in Spy using SHIFT-ALT-F1 on a window. It tells you information such as which class provides the editor and what plugin contributes it. This is useful e.g. to find out how the Editors work and what API they use. We don’t need this information for the example, but other cases have proven this to be useful.

Plug-in Spy

Plug-in Spy

Plug-in Referencs

You can also, from the extension in a plugin.xml search for Plug-in Referencs. This shows other plug-ins that extend the same extension point. Since RTC does this, you can find and open related plugin.xml files and look for contribution classes, editor id’s and other useful information.

Plug-ins referencing the same extension point

Plug-ins referencing the same extension point

In this case com.ibm.filesystem.ide.ui is the best candidate to look at first. We don’t need the information for this example, but other examples would require to look here.

Modifying the Example

We can now modify the example to provide us with the desired solution. The steps are

  • Renaming the action class
  • Renaming ID’s and display text in the plugin XML
  • Adding a new contribution to the plugin
  • Adding required dependencies to RTC plug-ins
  • Adding code to the action

After renaming the acion class – and making sure that the new class name is actually correctly used in the plugin.xml – modify the plugin.xml to show menu captions as desired and add another contribution that directly contributes to the context menu, without creating a sub menu.

After the modifications the plugin.xml looks as below.

Final plugin.xmlBoth contributions are very similar. The difference is that the first contribution in the XML creates a new sub-meu and maps the action on to the menubarPath for this sub menu. The second contribution maps an action directly into the menubarPathadditions‘.

The order these contributions will show up in the menu is actually the reverse order of their definition in the plugin.xml.

Please Note: Don’t ask me how this works in detail. I just know enough and have example pattern that work for me. If you need more information search the Web for articles or find a good book about it.

What is left is to actually do something in the action.

SnapshotAction
The code below shows the class SnapshotAction that executes if the pop up menu is selected. Most of the code that actually works with the API is left out, because it is not that interesting. The code below can easily be used as a starting point for any menu action for any RTC object.

package com.ibm.js.team.filesystem.snapshot.menucontribution.popup.actions;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IActionDelegate;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;

import com.ibm.team.filesystem.ui.wrapper.SnapshotWrapper;
import com.ibm.team.process.common.IProjectArea;
import com.ibm.team.process.common.IProjectAreaHandle;
import com.ibm.team.repository.client.IItemManager;
import com.ibm.team.repository.client.ITeamRepository;
import com.ibm.team.repository.common.IAuditableHandle;
import com.ibm.team.repository.common.TeamRepositoryException;
import com.ibm.team.scm.common.IBaselineSet;
import com.ibm.team.scm.common.IWorkspace;
import com.ibm.team.workitem.client.IQueryClient;
import com.ibm.team.workitem.client.IWorkItemClient;
import com.ibm.team.workitem.common.IAuditableCommon;
import com.ibm.team.workitem.common.expression.AttributeExpression;
import com.ibm.team.workitem.common.expression.Expression;
import com.ibm.team.workitem.common.expression.IQueryableAttribute;
import com.ibm.team.workitem.common.expression.QueryableAttributes;
import com.ibm.team.workitem.common.expression.Term;
import com.ibm.team.workitem.common.model.AttributeOperation;
import com.ibm.team.workitem.common.model.IWorkItem;
import com.ibm.team.workitem.common.query.IQueryResult;
import com.ibm.team.workitem.common.query.IResult;
import com.ibm.team.workitem.rcp.ui.WorkItemUI;

public class SnapshotAction implements IObjectActionDelegate {

	private Shell shell;
	private IWorkbenchPart fTargetPart;
	private SnapshotWrapper fSelection;
	private IWorkItemClient fWorkItemClient;
	private IAuditableCommon fAuditableCommon;
	private ITeamRepository fTeamRepository;

	/**
	 * Constructor for Action1.
	 */
	public SnapshotAction() {
		super();
	}

	/**
	 * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart)
	 */
	public void setActivePart(IAction action, IWorkbenchPart targetPart) {
		shell = targetPart.getSite().getShell();
		fTargetPart = targetPart;
	}

	/**
	 * @see IActionDelegate#run(IAction)
	 */
	public void run(IAction action) {
		IProgressMonitor monitor = new NullProgressMonitor();
		IBaselineSet snapshot = fSelection.getSnapshot();
		String snapshotUUID = snapshot.getItemId().getUuidValue();
		try {
			fTeamRepository = (ITeamRepository) snapshot.getOrigin();
			fWorkItemClient = (IWorkItemClient) fTeamRepository
					.getClientLibrary(IWorkItemClient.class);
			fAuditableCommon = (IAuditableCommon) fTeamRepository
					.getClientLibrary(IAuditableCommon.class);

			performAction(snapshotUUID, monitor);
			MessageDialog.openInformation(
					shell,
					"SnapshotMenuContribution",
					"My Action was executed on Snapshot: '"
							+ snapshot.getName() + "' UUID [" + snapshotUUID
							+ "]");

		} catch (Exception e) {
			MessageDialog.openError(shell, "SnapshotMenuContribution",
					e.getMessage() + "\nMy Action was executed on Snapshot: '"
							+ snapshot.getName() + "' UUID [" + snapshotUUID
							+ "]");
		}
	}

	private void performAction(String snapshotUUID, IProgressMonitor monitor)
			throws Exception, TeamRepositoryException {
			// Do something here
	}

	/**
	 * @see IActionDelegate#selectionChanged(IAction, ISelection)
	 */
	public void selectionChanged(IAction action, ISelection selection) {
		fSelection = null;

		if (selection instanceof IStructuredSelection) {
			Object first = ((IStructuredSelection) selection).getFirstElement();
			if (first instanceof SnapshotWrapper) {
				fSelection = (SnapshotWrapper) first;
			}
		}
	}
}

Lets look at the interesting parts first. The class implements IObjectActionDelegate. This is an interface of the Eclipse framework that is always used for this type of actions.

The method selectionChanged() is used to get the selected element(s). It is called when selecting elements for the contribution. The code is fairly typical and can also be refined to get a list of selections.

/**
 * @see IActionDelegate#selectionChanged(IAction, ISelection)
 */
public void selectionChanged(IAction action, ISelection selection) {
	fSelection = null;

	if (selection instanceof IStructuredSelection) {
		Object first = ((IStructuredSelection) selection).getFirstElement();
		if (first instanceof SnapshotWrapper) {
			fSelection = (SnapshotWrapper) first;
		}
	}
}

The code inspects the selection, uses IStructuredSelection to get at the elements, and checks that the correct class is passed, casts the input and stores it in a field.

The method setActivePart() is used to store some information about the UI that can be used later. Some UI elements such as message dialogs need the current shell. Others need the target part. These values are stored in fields.

/**
 * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart)
 */
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
	shell = targetPart.getSite().getShell();
	fTargetPart = targetPart;
}

The method run() finally is called when clicking the action. The interesting parts of this method are getting the snapshot from the wrapper and then getting the UUID.

Another interesting piece of code is to get the ITeamRepository. The code uses the method getOrigin() available from all RTC data objects and gets the team repository of the selected element. Keep in mind, the client could be connected to several different repositories and we want the one that contains the selected element. Once we have the ITeamRepository, it is possible to get client libraries needed for the areas of the API.

The code would do something to the selected element, or search for related elements and then perform some action with it. This code is left out in the example. The example shows a dialog window coming up on the end of the action or in case an exception occurred.

/**
 * @see IActionDelegate#run(IAction)
 */
public void run(IAction action) {
	IProgressMonitor monitor = new NullProgressMonitor();
	IBaselineSet snapshot = fSelection.getSnapshot();
	String snapshotUUID = snapshot.getItemId().getUuidValue();
	try {
		fTeamRepository = (ITeamRepository) snapshot.getOrigin();
		fWorkItemClient = (IWorkItemClient) fTeamRepository
				.getClientLibrary(IWorkItemClient.class);
		fAuditableCommon = (IAuditableCommon) fTeamRepository
				.getClientLibrary(IAuditableCommon.class);
			performAction(snapshotUUID, monitor);
		MessageDialog.openInformation(
				shell,
				"SnapshotMenuContribution",
				"My Action was executed on Snapshot: '"
						+ snapshot.getName() + "' UUID [" + snapshotUUID
						+ "]");
		} catch (Exception e) {
		MessageDialog.openError(shell, "SnapshotMenuContribution",
				e.getMessage() + "\nMy Action was executed on Snapshot: '"
						+ snapshot.getName() + "' UUID [" + snapshotUUID
						+ "]");
	}
}

Some interesting code we found during our work on Jazz.net is how to open a work item editor for a work item in the UI.

The code looks like this:

while (results.hasNext(null)) {
	IResult result = (IResult) results.next(null);
	IWorkItem workItem = fAuditableCommon.resolveAuditable(
			(IAuditableHandle) result.getItem(),
			IWorkItem.SMALL_PROFILE, monitor);
	workItemsFound += workItem.getId() + " ";
	WorkItemUI.openEditor(fTargetPart.getSite().getPage(), workItem);
}

The code runs on a query result as described in the posts Using Expressions For Automation or Using Work Item Queries For Automation and opens the work items found in the Eclipse UI.

Summary

The example above shows how you can add menu contributions for RTC objects in Eclipse and also, how to get the information needed. Interestingly the menu contribution also works in the Snapshot editor context menu.

Menu addition in the snapshot editor

Menu addition in the snapshot editor

As always, the code is very simple and has very few error handling implemented. You want to improve on that. However, I hope the example is useful for others out there trying to extend RTC.

Posted in Jazz, RTC, RTC Extensibility | Tagged , , , | Leave a comment

Using Reference Presentations to Create Links and Show Linked Work Items in RTC


I recently complained to our development that creating and displaying links between work items is too complex. I wanted a special presentation for that purpose. To my excitement I was instructed, that we have such a feature. Joy! This post explains how you use it.

I have done so much customization in RTC, that I was convinced I knew all of it already. Hubris! My bad. So there are things I haven’t done in RTC. I assume others also have not spotted this and I think it is worth blogging about.

Add a Presentation of Type References

To be able to show specific references (aka links) from the current work item to other items you basically have to add a new presentation to your editor presentation. On the Editor presentation editor select the section where you want to show the presentation and click Add Presentation….

The Presentation you want is a Non-Attribute-based Presentation. Choose this option and select References from the available set of choices.

In the Link Type selection drop down, select the reference (aka link type) you want to see and maintain here.

The image below shows the steps.

Add Reference Presentation

Use a Presentation of Type References

Once you have done that, you have a new presentation that will show only the references/links that qualify. It will also allow you to create new references/links from that dialog. The image below shows what you can do:

Use Reference PresentationSummary

This kind of presentation allows you to view and modify relationships in a more organized way on the work item editor and can help you understanding the relationships better, especially if the relationship represents important information in your object model.

As always I hope this information is useful to someone out there and helps using RTC more effective.

Posted in Jazz, RTC, RTC Process Customization | Tagged , , | 8 Comments

Using RTC Work Item Attributes to Display RTC Components and other Item Data


The RTC Work Item shall guide the user to the component, where the fix needs to be done. Is it possible to implement this requirement in RTC?

This was basically a requirement that I was asked for how to implement this with RTC. I also remember it being asked in the Jazz.net forum some time ago. I remember this, because my immediate thought was, this is only going to work using customization or extending RTC. I was quite surprised when a colleague monitoring the forum came up with a simple solution. I tried it out and it is really simple. However, it is quite hard to spot how this can be done. Therefore this post summarizes how you can easily do this yourself.

If you are just starting with customizing RTC Work Items, have a look at Process Enactment Workshop for the Rational solution for Collaborative Lifecycle Management 2012 especially Lab 3-5.

This was done with RTC 4.0.5 but it should work with earlier versions of RTC 4.x.

Create a New Attribute of Type Item

First you need to create a new attribute that will contain the information you want. There are a lot of attribute types you can choose from. There are special types that allow to select RTC Data such as users, team areas and the like. All these are for data related to the work item model. There is a special type for RTC data that is not work Item data from the RTC process model. It is easy to overlook. The type can be used as single selection or as a list. When creating the Attribute use

  • Item
  • ItemList

dependent upon your needs to select one or multiple elements.

Attribute Type Item

Attribute Type Item

If you select a ItemList, the work item UI supports selecting multiple items.

Configure the Editor Presentation

Once you have added the attribute, you need to configure the editor presentations to show the attribute as usual. You select

  • The Attribute
  • The Kind of the presentation

The available presentation kinds depend on the attribute type you selected. For the type ItemList, select Item List as kind.

Configure Editor PresentationFinally you can select which kinds of items the user can select. There are several choices that match types where RTC also provides a specialized attribute type, such as WorkItem or TeamArea.

The type Item or ItemList is more flexible and allows you to select any of these kinds and additional types that are not available in special attribute types such as SCM Component.

In the ItemList, you could have various objects that are interesting in this context. For example if you want to express what is affected by a work item.

You can select

  • Let the user choose
  • A specific item type

for the item type type be selectable in the presentation.

Save your changes, to make them available in the process.

Create a Work Item

Now you can create a new work item of the type you modified and select the new attribute. The presentation allows you to choose or add an element. The Select Component Dialog provides you with search and filter mechanisms to find what you need.

Select a ComponentSummary

You can use RTC work items to express relationships of a work item to other objects using special attribute types.

You can then use these new attributes and their values to drive new automation, e.g. check if a change set is actually for the component the related work item claims it to be. I shall see, if I can publish an article about such an advisor soon.

Posted in Jazz, RTC, RTC Process Customization | Tagged , , | 4 Comments