Cory asked how we do revision control and Brian has asked me to respond since I’ve been looking at this a lot harder than he has.
If you are hoping to do any kind of revision control with Teamworks such as branch, tag, merge, dif, or commit, then you are going to be disappointed. Teamworks revision control consists of:
- develop in your environment
- export the components (and their dependencies) that you want to change
- import into your test environment
- test your changes
- import into production
- hope nothing unexpected changed
Important points:
- You can’t "branch" unless you have multiple develepment server/databases setup.
- Instead of "merging" you "replace"
- I don’t think that "tagging" can be done in any meaningful way.
- All commits (saves) are directly to the main trunk.
- When you deploy to production, all the existing (in-flight) processes will immediately begin using the new version.
- You can’t just export "changes", you have to export the entire component.
- When you export / import, you can’t see what changes are being made (since there is no good DIF tool).
- When you do an export, all the dependant components hitch allong for the ride. If you want to make sure that changes in the dependant components don’t make it into production, you have to carefully hand pick your changes during the import step.
So what have we done? We are still relatively new and inexperienced with Teamworks and have only done one (major) deployment. Conceptually we have a Production branch and a Development branch which bounce around between 4 different servers. Anytime we want to do a deployment, we mirror Production onto the Test server and practice our deployment there. It works ok so far but when we start a new development effort, we’re going to start stepping on our own toes.
Although not being able to branch and merge is a pain in rear, the true gremlin in all of this is our inability to reliably see what we are changing. To address this, I’ve built an application I call ‘Referee’ that allows us to:
- DIF components
- view a change history
Referee takes each of the first class entities (bpd, calendar, connector, epv, historicalScenario, integrationComponent, layout, metric, participant, priority, process, report, resourceBundleGroup, scoreboard, sla, timingInterval, trackingGroup, twClass, underCoverAgent, userAttributeDefinition, webScript, webService) in Teamworks and outputs an XML file for it which can be committed to your source control repository such as SVN.
With each entity split into its own XML file, it is now possible to use Subversion’s DIF tool to see exactly what has changed. (I also highly recommend a tool called BeyondCompare.) So just before we are about to do a deployment to production, we generate all of the entity-XML files from production and all the entity-XML files from what we are going to import and compare them. Doing this, it is easy to see what we are changing, This SIGNIFICANTLY reduces the risk of unwanted changes creaping in.
How does Referee build these first-class entity-XML files? Referee has 2 options.
The easy-to-implement option is to parse the ProcessDefinitions.xml file that is part of the Teamworks export archive file. I basically wrote this parser in an evening while watching Heros and Medium. And you could too.
The hard-to-implement option is to connect directly to the Teamworks Server database and build all the XML files from scratch. This is much-much-much-much harder and I would discourage you from doing it unless you have no hobbies, family, girlfriend, or social activities planned for the next 4 months. That must have applied to me because I’ve managed to reverse-engineer the XML for bpd, process, and twClass entities so that I now have an identical match to the XML generated from the export file.
Having the direct-to-db option has allows us to have a separate ‘watcher’ application that monitors the DateModified column of each of the entities tables and automatically generate the XML file and commit it to SVN anytime someone makes a change. This has proven very effective for seeing what is being changed.
Unfortunately this process is one-way. I am not yet able to use the XML files to reconstruct the ProcessDefinitions.xml file so changes made to the XML files can’t be ‘merged’ back into the database. Doing so is going to be very difficult because the XML file contains many db thingys (db ids, guids, etc) and I don’t fully understand the nature of the problem. For now, Referee is just tool for improving visibility.
Teamworks 7 promises some kind of revision control. I’ve spent a lot of time looking at the database and I think this is a pretty tall order. The database schema doesn’t encourage anything like the branch-edit-merge that we’d like to see. Whatever they come up with will probably be something else.