Wednesday, January 30, 2008

Traceability through a simple metamodel

When people start defining processes with total traceability between every aspect, the sight is often not very pretty! When traceability adds multiple layers of complexity it rarely pays for itself in terms of improved quality or maintainability.

This is one of the reason why we defined what we termed the "minimum metamodel" in the Better Software Faster book on agile development. The diagram shown here is this model in its simplest form. The questions traceability should answer are:
  • How is this requirement tested?
  • How is this requirement implemented?
  • How is this part of the design tested?
  • Why is this part of the design needed?
It's a useful starting point when defining the artifacts required in a software development process, and the references they should contain to enable these questions to be answered.

Thursday, January 24, 2008

The Role of the Process Engineer

Since xProcess provides configurability of processes, it also introduces a new role to projects - that of the Process Engineer. Of course the role may be played by a project manager or process consultant, or simply by one of the members of the project, but it's an important role and one that can greatly enhance the success of projects using xProcess.

Several Process Engineers have already created the processes that come bundled with xProcess (Basic Scrum, Basic FDD, Simple Process) and there are others such WPM Prince 2, Web Development, Issue Management and Basic UP that are available in the community. So the likelihood is that most Process Engineers will start with one of these processes as the baseline. As experience with a process is gained, the details of the way it is being used by the projects can be understood and the sorts of useful modifications or additions to the patterns, actions and workflows can be specified.

Tuesday, January 22, 2008

Using parameters in task patterns

Processes are defined in xProcess through Patterns - patterns for sets of tasks, for projects, for priority groupings (e.g. Folders) and patterns for artifacts. By constructing sets of patterns, including patterns within patterns (Composite Tasks), a complete definition of the process behind a family of projects can be built up. A key part of pattern definition is the specification the pattern's parameters. This is what this article looks at.
The diagram above shows the editor for a typical pattern from the Simple Process, showing the 4 parameters that this pattern has: Name, Project Home Page, Start Date, Duration. These are the values that the user can supply when creating an instance of the pattern. Parameters always have default values which are used if the user does not change them, but you can add an action to a parameter - a DefaultValueGetter - which will set the default value at run time based on teh context or time at which the pattern is being instantiated. You can see in this case that Start Date has such an action attached which sets the start date to the current date. Parameters also have a type which can be one of: Integer, Floating Point, Boolean, String or Rich Text.

Having set up the parameters of your pattern you can then use these values to set values within the elements that are created by your pattern. Typically these will be projects, tasks and artifacts any or all which can be modified from the state of the prototype elements in the pattern to the real elements made when a user uses the pattern.

Th first way to use a parameter is by string substitution. Any text field in your prototypes, for example the prototype project's name, can include a parameter substitution. Simply enclose the parameter name with 'Simple Project pattern, the name of the prototype project is $Name$, showing that when the pattern is used the name of the project comes from this parameter. It's also used in the case of the Project Home Page parameter, which sets the description field to point to this url.

You can even use string substitution with artifacts, provided that the artifact uses a text-based, rather than binary format (e.g. rtf, xml, csv formats). In this case just put the substitution string, say $Name$ inside the file attached to your pattern. You'll find when you use the pattern that the corresponding artifact has this string substitution applied. Several patterns in the Basic FDD signs in the field, and when the pattern is instantiated the parameter value will appear at this point instead. You can see an example of this type of parameter use in nearly all the pre-defined patterns delivered with xProcess. In our example here, the Simple Project pattern, the name of the prototype project is $Name$, showing that when the pattern is used the name of the project comes from this parameter. It's also used in the case of the Project Home Page parameter, which sets the description field to point to this url.

You can even use string substitution with artifacts, provided that the artifact uses a text-based, rather than binary format (e.g. rtf, xml, csv formats). In this case just put the substitution string, say $Name$, inside the file attached to your pattern. You'll find when you use the pattern that the corresponding artifact has this string substitution applied. Several patterns in the Basic FDD process have artifacts that use this feature.

The second important way that parameters are used is in actions. As well as DefaultValueGetters, patterns have another very useful type of action - InstantiationActions. These actions are called when a pattern is used. When you define InstantiationActions you specify which of the prototype tasks you want to be transformed by the the action, and which particular action you wish to be called.
Here's the InstantiationAction used in the Simple Project pattern.It uses the Set project dates action which sets a number of dates (targets and scheduler dates) associated with the project. It is this code which ensures projects you create start on the date provided by the Start Date parameter. One thing to note about parameters appearing in OGNL code is that spaces in parameter names are replaced by underscores and non-alphanumeric codes are ignored. Also following OGNL conventions the parameter is preceded by a hash (#). Note that the Set project dates action uses both the Start Date and Duration parameters.

When you're starting to use parameters in your patterns the best approach is to look at patterns delivered with the pre-configured processes in xProcess and to re-use actions that these patterns use. The Simple Process for example provides the following actions that you can re-use in your own patterns:
  • Next timebox date (Project): finds the latest finishing folder/timebox and adds a day to its end date
  • Set required role type (Task): finds a RoleType matching the supplied string and sets this as the required role type for the task
  • Set target dates (Task): sets targets
  • Get today with offset: returns a date relative to the current date
  • Set max participants (Task): sets the number of people for a task
  • Set project dates (Project): sets target and schedule dates
  • Assign to account name (Task): searches for a matching user and assigns to the task
  • Get earliest start or end date (Task): returns either today or the task's project's scheduleStart if this is later
  • Set target dates and weight (Folder): sets the folder's targets and priority weighting based on that of preceding folders/timeboxes
  • Next timebox name (Project): finds the name of the latest finishing folder/timebox with the appropriate name and returns a name with its number incremented
  • Set estimates (Task): sets three-point estimates based on Size
  • Set importance (Task): categorizes task into High, Medium or Low categories.
Note: there are also some UI Actions in the set of actions supplied by the Simple Process. See for example this article: Set size to match effort.

Artifact templates

When you're defining the process for your project don't forget that a major part of this is defining the standards for the files, documents and records (artifacts) that are created, modified and qualified as a result of the process. xProcess provides excellent support for defining the types of artifacts that will be used in a process. Furthermore it stores both the document templates and the resulting documents within its version control system so you can not only reliably access the most up to date version, but also compare it with previous versions if necessary. Here's a task pattern showing artifact templates that have been added to each of the subtasks in the pattern.
You can do this simply by right-clicking on the task and adding a "reference" to a new artifact - an attached file, form or hyperlink. (To learn more about the different types of artifacts supported in xProcess see Creating Artifacts in the Help system). Once you've done this, every time you make an instance of this pattern a clone of your artifact template will be created for use with that instance. Another nice feature is that you can substitute text in the file when you instantiate it, using the values that the user enters into the parameters of the pattern.

Actually parameters of patterns are discussed in the next article in this series, so see Using parameters in task patterns for more details.

Adding gateways to task patterns

An important part of defining the process for your project is defining how to know when a task is complete. Is a development task complete before unit testing for example? Almost certainly not. But if acceptance testing for an enhancement is a separate task in your process, at what stage does the developer hand it over for acceptance testing?

One way to define this in xProcess is to define a gateway for the task so that the user is prompted by a checklist to ensure he has completed the required work.
In the task pattern shown above you can see that a gateway called "Feature complete" has been added to the "Develop" task. To do this in one of your patterns simply switch from the Project Manager perspective to the Process Engineer perspective, you can thenopen the pattern diagram for your pattern (right-click on the pattern). You can then select "Gateway Type" from the palette and drop it on the task in the pattern that you want to have a gateway.

The content of the gateway is defined by creating or editing a Gateway Type in your process. Right-clicking on your process and selecting New -> Type of Gateway opens an editor like the one shown here on the right. This is where you can enter in the questions / checklist items that are presented to the user when he closes one of these tasks. In this case the questions are:
  • Tests complete and pass?
  • Documentation complete?
  • User approved?
In each case we must also specify the set of possible answers and whether the answer represents a "pass" or "fail" condition.

Let's now see how this shows up when a participant on the project closes one of these tasks using the web client. Here's the gateway screen that a user would complete before closing one of these tasks (click on the image to enlarge).
You can see that for questions where a "fail" response is selected a comment is required in order that a reviewer can understand why this was done. You can learn more about gateways in xProcess from the help files. See for example Answering Gateways.

The next article in this series concerns Artifact Templates.

Tuesday, January 08, 2008

EV for Agile

Earned Value analysis is really designed for showing how closely you are tracking a pre-defined plan. Schedule efficiency and cost efficiency give separate measures of the degree to which you are "on-time" and on-budget". The problem with agile plans is that the scope of the project is expected to change as it progresses, usually with the aim of keeping schedule and cost more or less constant. Is EV analysis simply not applicable in this case? Actually in the context of a forecasting environment like xProcess, EV can still provide some most valuable metrics to agile plans. I've been invited to present a paper on EV for agile projects in a few months time and so I'd be most interested to hear of others applying EV with plans that must vary over time. Drop me a line if that's you!

If you're interested in receiving a copy of the paper btw click here.