1. Add a start message, Receive shape and Receive Port.
2. Add a VG_QUIBIF_StepInstanceVirtualId global string variable and start tracking inside an Expression before doing literally anything else.
It is not necessary to initialize the VG_QUIBIF_StepInstanceVirtualId with an empty string. In fact, it is usually not necessary to initialize any variable with its default value. BizTalk does that automatically.
3. Add a scope and an exception handler and at the very least track the error. Further error handling depends on the orchestration.
4. Now you can build the rest of the orchestration. Name things sensibly. Set everything (ports, correlation sets, etc.) to “Private”.
To connect two orchestrations, use the qbq.QUIBIF.Core.BizTalk.Schemas.ProcessName and qbq.QUIBIF.Core.BizTalk.Schemas.StepName properties and a direct port binding with a correlations set on the Send shape and a filter on the Receive shape.
5. Make sure that every important message is tracked. Any message that is sent or received is important. Find out which metadata needs to be tracked and track it.
6. Add your new process and step to the QUIBIFConfigExport.json file.
Set "Delivery Notification"
Make sure that all “Specify later” send ports have “Delivery Notification” set to “Transmitted” to ensure that errors are returned to the orchestration.
Take care with correlation sets
While you can copy Scopes and it will even copy correlation sets defined in them, it will not copy the correlation set settings on Send and Receive shapes; so remember to set them up again. The same holds when copying single Receive shapes.
A correlation set can only be initialized once. If you need to initialize a correlation set in a loop, use a Scope inside the loop and define it there.
No “if” in Message Assignment shapes
Don't use the “if” keyword in a Message Assignment shape. This confuses BizTalk and causes it to throw a lot of very unhelpful error messages, even referring to other orchestrations. Conversely, if BizTalk throws confusing error messages that affect orchestrations you haven't even touched, see if you added an “if” to a Message Assignment. Use a Decide shape or an Expression shape as appropriate.
Don't Track in a Message Assignment
While inside the Message Assignment, the message is only half done. We don't want to track a half-done message. Put the TrackMessage into a separate Expression shape outside the Construct Message shape.
You can't set context properties on an existing message
If you need to set context properties on an existing message – for example, to send it somewhere else – you need to make a copy and set the context properties on the new message. It may be necessary to copy the old message's context to the new one with NewMessage(*) = OldMessage(*). On the other hand, it may not. Don't clutter up the context unnecessarily.
Orchestrations in the same namespace share private types
Orchestrations in the same namespace share port, multi-part message correlation and role link types. This is both a blessing and a curse. While this allows you to reuse types, it also makes changing them complicated, as changes affect all orchestrations using the type. Furthermore, it's not trivial to find the place where the type is actually defined – “Go to definition” doesn't always work. If you didn't make the types private, but left them internal, they may even be used by orchestrations in different namespaces in the same project. This tends to increase the complications mentioned before.
Don't even think about making types public.
Independent of your choice, the actual generated C♯ type is always public.
Dies ist ein quiTeq-Tipp von QUIBIQ Berlin