Forum Replies Created
-
AuthorPosts
-
Here are some answers:
1. Yes, it will work. Notice that however, if you’re trying to manually promote an arbitrary property of the message in the sending orchestration, you might need to initialize a correlation set during the send operation; otherwise the value will only get written to the message context and not promoted.
Notice also that in your case you could also use Partner ports, to make it easier to hook up both orchestrations, instead of using promoted properties.
2, 3, 4, 5. Actually, in the scenario you describe you’d always use an activating receive shape with a filter, since you want to have the message cause a new instance of the orchestration to be spawned to process it.
The only case in which you’d use a correlation is if you want the message to be processed by an orchestration that is already running (started by a completely different message). It does not sound like this is your case.
Here are some good articles to get you started with direct binding:
http://geekswithblogs.net/cyoung/articles/19546.aspx
http://blogs.msdn.com/kevin_lam/archive/2006/04/18/578572.aspx
http://blogs.msdn.com/kevin_lam/archive/2006/04/25/583490.aspx
http://blogs.msdn.com/kevin_lam/archive/2006/06/14/631313.aspx
http://blogs.msdn.com/kevin_lam/archive/2006/07/07/659214.aspx
http://blogs.msdn.com/kevin_lam/archive/2006/07/25/678547.aspx[quote:8cc6858bba=\”Stephen W. Thomas\”]
If not, you might want to try [ThreadStatic] as this will create a new object per thread (I think – never actually tried it).
[/quote:8cc6858bba]I tried the [ThreadStatic] approach and now it seems to be working fine! I will test this a little more to be sure, but thanks for the response!
I did as codecola said..
Set your root node (not <Schema> node) Group Max Occurs property to \”unbounded\” (u will find this in the Advanced section).
stick to the 1.0.3 RUNTIME! U get it from SAP’s marketplace. Remember no other version higher than version 1 is supported!
Cheers
Iggi
August 7, 2006 at 12:26 PM in reply to: execute application windows and call biztalk rules engine #15220i have develop a simple windows application that call biztalk rules engine. But i can only execute on the biztalk server.
If it’s run on my post, i have the message : \”impossible to connect\”
What i must doing to execute on a client post, and call biztalk rules engine from the server biztalk??
thanks a lotThe schema for the query is an \”online\” schema (it’s in the webreference).
Thanks for the answer, I’m now trying a different approach to the problem, but it still might com in handy! 🙂Thks.
Hi
I need to get email with attachments and just transfer them “as is” from folder A to folder B (also I need to get the name of the file)
How can I do that? Should I execute pipeline inside my orchestration?
Should I know in advance how many attachments I have (some sort of “count” method)10x!
[… continued from previous… ]
This works perfectly when I test my orchestration and validate 1 or a few xml files at a time. However, when I try to validate 100 files at once (50 valid and 50 invalid), I get unpredictable behaviors (the number of files that pass validation is not always 50, and the error messages sometimes get \”mixed up\” between the different messages).
I am not an expert in C#, but I think there may be something wrong with the class I’m using.
I also tried putting the call to the validation function inside an Atomic Scope, disabling batching and playing with the other settings, but the different instances that are being run by BizTalk still seem to interfere with each other. As I said, if I validate just one file at a time, everything works perfectly.
I would REALLY appreciate any comments on why this behavior may be occuring. Thanks
Hello, I’m working in a project where one of the requirements is to validate an incoming or outgoing document against the schema, catching the error messages that may appear while failing validation. I looked on the web for answers, and the best I could find is in the following site:
http://thearchhacker.blogspot.com/2004/09/cool-xsd-validation-function-for.html
Because I wanted the function to return multiple errors (and not just the first failure) I have modified the code to the following:
[code:1:42eadef361]
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.Xml.Schema;
using System.Reflection;namespace BiztalkUtils
{
public class Utils
{
static int ErrorsCount = 0;
static string ErrorMessage = \"\";public static void ValidateDocument(XmlDocument businessDocument, string schemaStrongName)
{
// Constants
const int PARTS_IN_SCHEMA_STRONG_NAME = 2;
const int PART_CLASS_NAME = 0;
const int PART_QUALIFIED_ASSEMBLY_NAME = 1;ErrorsCount = 0;
ErrorMessage = \"\";// Parse schema strong name
string[] assemblyNameParts = schemaStrongName.Split(new char[] { ‘,’ }, PARTS_IN_SCHEMA_STRONG_NAME);
string className = assemblyNameParts[PART_CLASS_NAME].Trim();
string fullyQualifiedAssemblyName = assemblyNameParts[PART_QUALIFIED_ASSEMBLY_NAME].Trim();// Load assembly
Assembly schemaAssembly = Assembly.Load(fullyQualifiedAssemblyName);// Create instance of the BTS schema in order to get to the actual schemas
Type schemaType = schemaAssembly.GetType(className);
Microsoft.XLANGs.BaseTypes.SchemaBase btsSchemaCollection = (Microsoft.XLANGs.BaseTypes.SchemaBase)Activator.CreateInstance(schemaType);// Set up XmlVali######Reader and validate document
XmlParserContext parserContext = new XmlParserContext(null,null, \"\", XmlSpace.None);
XmlVali######Reader reader = new XmlVali######Reader(businessDocument.OuterXml, XmlNodeType.Document,parserContext);reader.ValidationType = ValidationType.Schema;
reader.Schemas.Add(btsSchemaCollection.SchemaCollection);// Set up ValidationEventHandler
reader.ValidationEventHandler += new ValidationEventHandler(reader_ValidationEventHandler);while (reader.Read()) { }
reader.Close();
// Throw XmlSchemaException to be caught by BizTalk containing all validation errors
if (ErrorsCount > 0)
{
throw new System.Xml.Schema.XmlSchemaException(ErrorMessage);
}
}private static void reader_ValidationEventHandler(object sender, ValidationEventArgs e)
{
ErrorsCount++;//Construct error message
ErrorMessage = ErrorMessage
+ \"Error #\" + ErrorsCount
+ \" (Line \" + e.Exception.LineNumber
+ \", Pos \" + e.Exception.LinePosition + \"): \"
+ e.Exception.Message
+ System.Environment.NewLine;
}}
}
[/code:1:42eadef361]Note: Substitute \”######\” in the code with [i:42eadef361]d`a`t`i`n`g[/i:42eadef361] (without the \”‘\”) as the spam blocker would not let me attach the code otherwise.
This works perfectly when I test my orchestration and validate 1 or a few xml files at a time. However, when I try to validate 100 files at once (50 valid and 50 invalid), I get unpredictable behaviors (the number of files that pass validation is not always 50, and the error messages sometimes get \”mixed up\” between the different messages).
I am not an expert in C#, but I think there may be something wrong with the class I’m using.
I also tried putting the call to the validation function inside an Atomic Scope, disabling batching and playing with the other settings, but the different instances that are being run by BizTalk still seem to interfere with each other. As I said, if I validate just one file at a time, everything works perfectly.
I would REALLY appreciate any comments and help on why this behavior may be occuring. Thanks
Do you have the schema for http://schemas.microsoft.com/crm/2006/Query ?
If you do, then the rest should be fairly trivial, however, exactly how it is will depend on how the other schema is defined. At least you’ll need somethgin like this:
<xs:import namespace=\”http://schemas.microsoft.com/crm/2006/Query\”/>
<xs:element name=\”RetrieveMultipleRequest\” xmlns:d1=’http://schemas.microsoft.com/crm/2006/Query’>
<xs:complexType>
<xs:sequence>
<xs:element name=’Query’ type=’d1:Query (or whatever)’/>
</xs:sequence>
</xs:complexType>
</xs:element>August 5, 2006 at 1:10 AM in reply to: How to catch exception when remote webservice server down? #14090You should be able to catch a SoapException. Do note that the send port settings will affect *when* the exception is actually thown.
I wrote a bit about this here:
http://www.winterdom.com/weblog/2005/03/30/HandlingErrorsInOrchestrationsFromInvokedWebServices.aspxIn your case, you have a requirement that Message A is received first. You need to ensure this happens. You will need to make sure you have order delivery enabled (see my lab on Message Debatching). Maybe you are just missing this setting on your Receive Port inside the Orchestration..
If you can not guarantee A will arrive first you will need to build some other process to catch Message B and wait until Message A arrives. A few ways to do that – none that are very elegant.
Yes, you should be able to get that kind of behavior if you want with a little work. I’m not a Notification Services Expert by any means, but there is some good information out there that might be useful:
http://www.codeproject.com/dotnet/SQLNS.asp
http://www.microsoft.com/technet/prodtechnol/sql/2000/evaluate/sqlnsto.mspxI haven’t used Notification Services before. Can I schedule it to send emails at certain times? For instance, if the system hasn’t received results from respondents in 10, 20 … day intervals, it will send emails to remind them.
Thanks a lot.
It should work well, I think, and Biztalks facilities for XML<->FF mapping should be very useful. I was only concerned you might be, for example, taking 100s or 1000s of addresses and start generating huge number of messages in a tight loop. Sounds like that might not be the case, though.
That said, if you do need to send a huge number of emails, sounds like you could certainly extend that little part with Notification Services and still take advantage of BizTalk for all the rest.
-
AuthorPosts