iBatis.NET DataMapper 1.6.1 does not support default parameters in stored procedures

iBatis.Net DataMapper is our de facto standard for implementing persistence in .NET applications. The framework works well with an object-oriented domain model and relational data store.

Today, we stumbled upon a bug in the latest production release of iBatis.Net DataMapper. A new parameter was added to the existing stored procedure and although this parameter came with a default value, the application threw the following exception: 
"Specified argument was out of the range of valid values. Parameter name: index" from IBatisNet.DataMapper.Configuration.ParameterMapping.ParameterPropertyCollection.get_Item.

One way to work around this issue is to replace the original procedure configuration:

<statements>
  <procedure id="OurStoredProcedure" parameterMap="OurStoredProcedure_Parameters" >
    up_YourStoredProcedure
  </procedure>
</statements>

</parameterMaps> 
   <parameterMap id="OurStoredProcedure_Parameters" class="OurParametersClass">
     <parameter property="Value1"/>
     <parameter property="Value2"/>
   </parameterMap>
<parameterMaps>

with a dynamic statement:

<statements>
  <statement id="OurStoredProcedure" parameterClass="OurParametersClass" >
    EXEC up_OurStoredProcedure #Value1#, #Value2#
  </statement>
</statements>

Happy coding!

How to automatically fail TeamCity 4.0 build when MSTest 2008 webtests fail

Out of the box, there are two options to configure MSTest 2008 webtests with TeamCity 4.0 build server. The first option is to add webtest names to the MSTest assemblies list. The second option is to specify MSTest configuration and .vsmdi metadata files. In both cases, TeamCity 4.0 does not fail a project build when webtests fail. Nor does TeamCity display webtests results as it does for unit tests.

To solve this issue, we created a custom command-line file to execute MSTest webtests:

set ConfigPath=<Path to your webtest configuration and .vsmdi files>
set ResultPath=<Path to .trx and .txt result files>
set MSTestPath=<Path to your MSTest.exe>

"%MSTestPath%\MSTest.exe" /runconfig:%ConfigPath%/Your.testrunconfig
/testmetadata:%ConfigPath%/Your.vsmdi
/resultsfile:%ResultPath%\Your%1.trx >> %ResultPath%\Your%1.txt

if not %errorlevel% == 0 exit 1

This file takes a build number as the first positional parameter, executes webtests listed in Your.vsmdi, and saves .trx result file as well as the execution summary report so that TeamCity could store them as build artifacts. We then configured a dependent build configuration to run this command-line file as part of our build process.

Happy coding!

March book review: Managing to Learn

John Shook
Managing to Learn. Using the A3 management process to solve problems, gain agreement, mentor, and lead

The term A3 refers to a size of paper defined by ISO 216. For lean organizations, A3 is also a problem-solving and improvement tool as well as a management style and process.

The A3 report is a standardized form for describing a problem on a single sheet of paper. The report communicates both facts and meaning in a commonly understood format. It describes a story behind a particular issue and is guided by PDCA (Plan, Do, Check, Act), an iterative problem-solving process. The process guides dialogue and analysis of the issue by discovering answers to the following questions:

  • What is the problem we are trying to solve?
  • Who owns the problem?
  • What are the current conditions?
  • What are the root causes of the problems?
  • What are the countermeasures?
  • What is the implementation plan?
  • How will we know if the countermeasures work?
  • How will we capture and share the learning?

In John Shook's book "Managing to Learn", you will find an excellent introduction to the fundamentals of A3 analysis as well as easy-to-understand examples on how to apply A3 thinking to improve problem solving, decision making, and communication in business organizations. John also explains the underlying learning process for developing talent and touches on how A3 enables the right decision at the right time. This capability of A3 helps lean organizations operate pull-based authority (aka, kanban democracy), where authority is pulled where it is needed and when it is needed: on-demand, just-in-time.

The book is organized around two story lines running in parallel. The first story line reveals the thoughts and actions of Desi Porter, a young manager who gradually discovers the meaning of the A3 process. The second story line describes the thoughts and actions of Ken Sanderson, Desi's supervisor who mentors Desi Porter in a structured problem-solving approach. While Desi is primarily concerned about his project of improving the document translation process in the company, Ken needs Desi and his other direct reports to master A3 thinking.

The book is both thoughtful and entertaining. I highly recommend it. If you are interested in learning more about the A3 management process, this book is for you.

To order this book from Lean.org, click here. Happy reading! 

Modelus LLC mentioned in Twin Cities Business magazine

Aleh Matus was quoted in the March 2009 Twin Cities Business article, "Putting the Serve in Server. Service-oriented architecture can make your company's IT system function seamlessly for users" by Dave Zielinski.

Modelus Specification released!

Our new open source product went live this week: Modelus Specification. It is an implementation of a very powerful design pattern originally described in the Domain Driven Design book by Eric Evans as well as in this article by Eric Evans and Martin Fowler.

The library is written in C# using generic interfaces. The source code, binaries, and documentation are distributed under the Apache open source license, version 2.0. 

Give Modelus Specification library a try and check out our other open-source products. Let me know what you think or if you have any questions. Enjoy!

Practical Agility conference on Fri, March 27, 2009

Practical Agility, a local conference for agile practitioners, is scheduled for Fri, March 27, 2009.

What: Practical Agility conference
When: Friday March 27, 8:00am-5:00pm.
Where: University of St. Thomas, St. Paul Campus, McNeely Hall 100 Great Room
Cost: $50

Registration is required: http://devjam.com/store/product_info.php?products_id=29. The space is limited to the first 200 people. I plan on attending. See you there!

Introductory Windows Azure webcasts for developers

If you are new to Windows Azure and would like to get started, take a look at these introductory webcasts on MSDN: http://msdn.microsoft.com/en-us/azure/dd439432.aspx. Enjoy!

MSTest 2008 results file does not get refreshed when tests are executed in TeamCity 4.0

We run into a locking issue last week while setting up MSTest 2008 with TeamCity 4.0. We recommend using NUnit instead of MSTest, but MSTest 2008 is supported by TeamCity 4.0 and we did not anticipate any problems using it. The first build worked correctly as expected, but the second and all subsequent builds did not seem to execute any tests and did not overwrite MSTest results file created by the first build. All builds were displayed as successful and all included MSTest results from the first run!

I looked closer into the build logs and noticed the following entries:

  • "The results file 'C:\TeamCity\...\tests.trx' already exists. Please specify a different results file or verify the existing file is no longer needed and delete it."
  • "The command 'C:\...\mstest.exe' /testcontainer..." exited with code 1.

When I tried deleting the results file manually, I received the "Error Deleting File or Folder" exception. The file was locked by TeamCityAgentService-windows-x86-32.exe -> java.exe process.
 
To resolve this problem, we ended up naming our MSTest results file name as tests%env.BUILD_NUMBER%.trx. This way, each new build generates a brand-new results file. Note that this solution requires you to delete historical .trx files on a regular basis, which could be easily accomplished with a command line script.

Happy coding!

February book review: Facilitating with Ease!

Ingrid Bens
Facilitating with Ease! Core Skills for Facilitators, Team Leaders and Members, Managers, Consultants, and Trainers

Most software projects today involve a number of team members with special skills: customers, stakeholders, developers, web designers, graphic designers, testers, and others. In such environment, how do we keep focus on business value, meet target dates, and ensure quality of the final product? How do we work efficiently together as a team to deliver a successful business solution?

Today, comprehensive knowledge sharing, quality decision making, and effective collaboration among all team members is critical to the success of the organization. However, it is not uncommon to see teams with limited knowledge-sharing and decision-making skills. As a result, meetings are poorly run, valuable time is wasted, and no clear benefit is achieved. How do we remedy this situation? 

I recommend recognizing the importance of quality facilitation and paying proper attention to process elements. Ingrid Bens demonstrates many tools and techniques on how to do that. Our next step is to introduce a practical and repeatable approach to organizational learning. But wait... I am jumping ahead of myself into one of my next book reviews.

Among many excellent resources on the subject of facilitation, Ingrid's book "Facilitating with Ease!" stands out. Ingrid touches on both theoretical and practical aspects of facilitation and presents relevant information in a very concise manner. This makes her book well organized and easy to read.  I highly recommend it.

Happy reading! 

Dinosaur Thinking video by Henrik Mårtensson

This short video provides an excellent overview of why Scientific Management worked well in the early 20th century and why it makes it very difficult for organizations to adapt to the new world today. Enjoy!

http://www.youtube.com/watch?v=VXW2j2BxBUQ

Welcome to ModelBlog

Thank you for visiting ModelBlog. We hope the time you spend with us will be both entertaining and worth your while. Have fun!

Authors

Search

Archive

Tags