BizTalk Server General - Suspended entries relation to submitted docs

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > February 2004 > Suspended entries relation to submitted docs





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Suspended entries relation to submitted docs
Rudolf Henning

2004-02-08, 8:37 am

I have a situation where some documents have ended up in
the suspended queue (due to some system/hardware problems)
and the documents cannot be resubmitted. These are a few
out of thousand of documents processed per day. The
problem is trying to figure out which documents 'failed'
so we can have to source have them resubmit.

The question is: what relation is there between entries of
the InterchangeSQ.dbo.cs_SuspendedQ table and
dta_indoc_details or dta_interchange_details?
Is there any programmatic way (write a sql query) to get
the related document from the tracking database?

I realize this is not (suppose to be) a public interface
but this info is critical and it happens often that we
need to link documents.

thanks

Rudolf
Trace Young

2004-02-08, 8:37 am

Hello Rudolf,

I have pasted a vbscript sample below that will parse through the items in
the suspended queue, check the state of each item, and write the item out
to a folder if the state value indicates the the document cannot be
resubmitted. Just paste this sample into notepad and save with a .vbs
extension.

'write out documents in suspended Q that can't be resubmitted
option explicit
dim wmiMessage, wmiMessageQGUID, srcname, destname, docname, reas,
ItemData, destfile, filepath, strError
dim objShell, fso, Interchange, wmiObj, wmiMessages
Set objShell = CreateObject("Wscript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
Set Interchange = CreateObject("BizTalk.Interchange")
Set wmiObj = getobject("winmgmts:\\.\root\MicrosoftBizTalkServer")
Set wmiMessages = wmiObj.ExecQuery("Select * from
MicrosoftBizTalkServer_SuspendedQueue")
filepath = "C:\filedest\"

on error resume next

for each wmiMessage in wmiMessages
if wmiMessage.state < 4 then 'determines if the document is in a
non-resubmittable state
wmiMessageQGUID = wmiMessage.QGUID
Interchange.GetSuspendedQueueItemDetails wmiMessageQGUID, srcname,
destname, docname, reas, ItemData
if not isnull(ItemData) then
filepath = filepath + wmiMessageQGUID + ".xml"
set destfile = fso.CreateTextFile(filepath)
destfile.Write(ItemData)
end if
end if
If Err<>0 then
strError = hex(err.number)
objShell.Logevent 1, "An Error occurred. Error: " & strError
Err.Clear
end if
next

Set objShell = nothing
Set fso = nothing
Set Interchange = nothing
Set wmiObj = nothing
Set wmiMessages = nothing

Regards,

Trace
--------------------
| I have a situation where some documents have ended up in
| the suspended queue (due to some system/hardware problems)
| and the documents cannot be resubmitted. These are a few
| out of thousand of documents processed per day. The
| problem is trying to figure out which documents 'failed'
| so we can have to source have them resubmit.
|
| The question is: what relation is there between entries of
| the InterchangeSQ.dbo.cs_SuspendedQ table and
| dta_indoc_details or dta_interchange_details?
| Is there any programmatic way (write a sql query) to get
| the related document from the tracking database?
|
| I realize this is not (suppose to be) a public interface
| but this info is critical and it happens often that we
| need to link documents.
|
| thanks
|
| Rudolf
|

This posting is provided "AS IS" with no warranties,and confers no rights.
Subscribe at
http://support.microsoft.com/defaul...msdn/nospam.asp
&SD=msdn

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com