BizTalk Utilities CV ,   Jobs ,   Code library
 
Go to the front page to continue learning about XML or select below:

Contents

ReBlogger Contents

Previous posts in WS, web services

 
 
Page 1401 of 18321

Detecting BizTalk Event with BizUnit

Blogger : michael stephenson
All posts : All posts by michael stephenson
Category : WS, web services
Blogged date : 2008 Jul 24

I came across an annoying one the other day, I havent had time to look into it in more detail, but here are some notes about it.

In some of the tests we do with BizUnit we sometimes check the event log to see that certain messages have occured.  I came across an example I havent noticed before the other day.

In my test I do a bunch of stuff then I wait until a custom event with a specific Event Id is logged to the event log.  I use the BizUnit event log check step and it finds my event fine.

Later in the test I will do the following:

  • Stop the application pool for a web service I will call
  • Allow BizTalk to call the service and then suspend the service instance because the web service is unavailable
  • My test will detect the event logged by BizTalk Event ID - 5754 to indicate a call has failed.  I will also use the ValidationRegEx node to confirm the event message relates to my port
  • I will then start the application pool back up
  • I will then use a custom BizUnit step to resume the suspended instance
  • Finally I will check the process worked correctly

This was working as far as the point of detecting the BizTalk event.  I could see in the event log the event I was expecting was there, but for some reason my step didnt spot it.

Because I was using the regex feature this was my first thought, but the expression was simple and even if I took it away the event wasnt spotted still.

It turns out when I wrote a little C# to check what comes back in the event log was that although the event in Event Viewer displays with the event number 5754, the event log instance from System.Diagnostics comes back with the following property values:

- Event Id: 12588666

- Instance Id: 3233814138

When I changed the event number as appropriate it worked fine.  Frustrating but there you go. 

 


Read comments or post a reply to : Detecting BizTalk Event with BizUnit
Page 1401 of 18321

Newest posts
 

    Email TopXML