Finding information about terminated instance in Biztalk - biztalk

I want to find information about a terminated instance in BizTalk 2010 - where can I look for that information? Specifically, I'm looking for information about an instance for one application.

You might start up the BizTalk Administration Console and go to the BizTalk Group node.
Then, on the page thats pops up, select 'Tracked Service Instances'.
Given the fact that you are tracking the specific instance you want to find, you might be able to find this by extending the query with "State" equals "Terminated".
Depending if you tracked it or not AND how long ago it was AND how long your tracking is kept in the DTA database (see the SQL jop parameters for that), you will find what you are looking for.
Hope this helps.

Specifics notwithstanding, all available information about any instance can be viewed in BizTalk Administrator through the context (right click) options.
The only other place you may find relevant information is in the Event Viewer if there was a previous error.
There is no special database-only log or other source of information.

Related

Access BizTalk Orchestration Instances from database

Can I access persisted data of running orchestration Instances from the BizTalk database?
My BizTalk application deals with long-running processes and hundreds of orchestration instances can be running at a time.
I would like to access data persisted by these orchestration instances and display it on my application's UI. The data would give an insight about how many instances are running and at which state each of them is.
EDIT :
Let me try to be a little more specific.
My BizTalk application gets ticket requests (messages) from a source and after checking some business rules they are to be assigned to different departments of the company. The tickets can hop between inbox of different departments as each department completes its processing.
Now, the BizTalk orchestration instances are maintaining all the information that which department owns a particular ticket at a given time. I would want to read this orchestration information and generate inbox for each of the department at runtime. I can definitely do this by pushing this information to a separate database and populate the UI from there BUT as all this useful information is already available in the form of orchestration instances I would like to utilize it and avoid any syncing issues.
Does it make any sense?
The answer to your specific question is NO.
BAM exists for this purpose exactly.
Yes it is doable. Your question is little confusing. You can't get the data which is persisted for your orchestration instance, however You can get number of running or dehydrated instances using various options like WMI, ExplorerOM library. As a starting point you can look at some samples provided as part of BizTalk installation under SDK\Samples\Admin folder. Also you should be looking at MSBTS_ServiceInstance WMI class to get the service instances. You can also look at a sample http://msdn.microsoft.com/en-us/library/aa561219.aspx here. You can also use powershell to perform the same operation

Detecting a change in BizTalk Server configuration

Is there a way (without actually keeping a state in a external application and scanning the configuration database) to detect a configuration change in BizTalk Server?
I know there are timestamps for changes for the different artifact in the configuration database but are there any sort of general flag that indicate a change?
I'd like to for example kick of a process as a change occurs and for example log current configuration - without adding triggers or similar things.
No, there is no 'change notification' built into the product nor is there an 'official' way to track or identify changes.
Of course, there are various techniques you can use to identify changes such as monitoring timestamps, examine the SQL Logs, etc, but that would be a custom implementation.
BizTalk 360 has a robust auditing feature that might cover what you're really asking for.
From experiance, this question of 'tracking changes' is driven by governance scenarios where controls and access are more open then they should be. That's a management problem.

Searching BizTalk MessageBox?

Need to make a tool to search XML data from BizTalk messagebox.
How do I search all XML data related to lets say a common node called Employee ID from all data stored in the BizTalk MessageBox?
The BizTalk Message Box (BizTalkMsgBoxDb database) is a transient store for messages as they pass through BizTalk. Once a message has finished processing, it will be removed from the Message Box.
You probably want to research Business Activity Monitoring (BAM) which will allow you to capture message data as messages flow through BizTalk; message data can be exposed through its generic web-based portal. BAM is a big product in its own right and I would suggest that you invest time in researching all of the available features to find the one that suits your particular scenario. There are many, many resources available, however you might start by taking look at Business Activity Monitoring. There is also a very good book specifically on BAM: Pro BAM in BizTalk Server 2009
Alternatively, take a look at using the built-in BizTalk Administration Console tools for querying the Tracking database (BizTalkDTADb) which will hold messages for later reference based on your pre-defined configuration options. See Using BizTalk Document Tracking.
Finally, you could consider rolling your own message tracking solution, writing message contents to a SQL Database table, as messages are received in a pipeline for example.
Check out the BizTalk Message Decompressor on CodePlex! I've been using this tool for a couple of years with excellent results. Since you're hitting the messagebox directly, you should be very careful and be very familiar with the queries that you choose to execute.
As noted by a previous poster's answer, BAM and the integrated HAT queries in the admin console are the official, safest, and Microsoft prescribed answers.

Automatic Workflow activity not started

I have created a simple workflow start-->createoredit-->automaticactivity-->End. automatic activity doesnt do anything, i have default code in the script area of automati activity FinishActivity "Automatic Activity Finished" alone in the script area.
When i trigger the workflow, automatic activity is not started and performed, it is assigned to "NTAUTHORITY SYSTEM" with the state "Assigned" (In the Global Work List)
Whenever i restart the "Tridion Workflow Agent" service or whenever some other automatic activity assigned via workflow, automatic activity start performed.
I dont see any error message also in the event log.
Could anyone help me on this? I am using SDL Tridion 2011 SP1.
The first activity must always be a manual activity. If you need to have the first activity automated then you need to rely on the event system for this.
EDIT: I see you wrote the question to add the first activity to be manual.
When an automatic activity gets stuck in Assigned state, it usually means there is a script error. There could also be something with the connectors between activities in your Visio design. Check that everything us properly connected. Try deleting the link between automaticactivity to End and recreating it again.
Check that the "Tridion Content Manager Workflow Agent" windows service is running. This fixed it for us.

Adding information to transport package manifest (instructions.xml) when unpublishing any item?

I have a use case where I need to add information about the user that created the current publish transaction (more than just their user name, I also need group memberships and some other details) and pass it on to a deployer extension.
When publishing this is relatively easy to do with the following code
engine.PublishingContext.RenderedItem.AddInstruction(
InstructionScope.Global, instruction);
As you may notice this method "AddInstruction" is only available for a "RenderedItem", but Unpublish instructions do not render items, and therefore I cannot use the same technique.
Short of hacking the package manifest in the file system when generating it (for instance in a custom resolver) how would you tackle this requirement?
Do you have more info on what you need to do with this information in the Deployer. Would it be an option to capture the un-publish action after it happens with an event handler, and then create a second publish action which sends the message to the Deployer with the additional information? (I know that means 2 round trips, but I can't think of another approach at this point). Un-publish actions have been a bit tricky ever since R4, back in R3 we actually had code which was executed by templates in the unpublish phase (although it was all Perl back then).
I wonder whether this is a missing extensibility point. After all, I can see why you would want to transmit extra data with an unpublish. So firstly, I'd suggest an enhancement request to have some functionality added to support this use case.
Getting to the point of your question... how to implement something without hacking the package. Perhaps you could make the information available through another mechanism. For example, you could write a web service that runs on the content manager and which serves the data when queried for a given publish transaction ID.

Resources