0

我有一个 biztalk (2006 R2) 地图,它使用一个类来提供一些我们无法通过现有 functoids 巧妙地实现的自定义逻辑。

当从此类的方法之一抛出异常时,异常详细信息不幸丢失(至少据我所知),变换形状只是抛出一个异常,指示'Function 'ScriptNS-:DoFoo()' has failed'

从那以后,我得出结论,在地图中使用脚本 functoid 会导致灾难,但这是另一个讨论。我的问题是是否有一种机制可以让异常细节传递给父编排?

4

1 回答 1

1

Try to use the 'System.Diagnostics.Trace' class and output stuff inside the method related to its progress. Start with outputting the input parameters as they might differ from what your method expect.

Simplified example:

System.Diagnostics.Trace.WriteLine("HelperClass XX - Method YY - This was passed from the map : " + inputParamOne);

Using a clear naming standard makes it easier to filter inside free tool DebugView, especially when on a machine running more than your stuff. I often leave this tracing in as it often proves invaluable later on. The overhead, if no listener is connected, could normally be ignored.

If you have the map deployed and running on a BizTalk development machine you could debug by performing the following steps:

  • Put a breakpoint in the method
  • Select 'Debug - Attach To Process'
  • Attach to the HostInstance process (BTSNTSvc.exe if 32-bit) handling your corresponding port or orchestration running the map.
于 2009-08-28T22:54:34.270 回答