BizTalk 2004 Naming Conventions This document covers proposed naming conventions for describing BizTalk artifacts. One of the primary benefits of the BizTalk Orchestration model is the great transparency you can get when a software implementation is pictorial. Regardless of how well a developer comments code, there will always be a need to maintain a separate set of artifacts (UML diagrams, Visio diagrams with random shapes of your choosing, prose documents, whiteboard discussions, etc.) that are used to convey what the code is actually doing especially when working with a business audience. This is true if for no other reason than that a discussion of interesting functionality will often take place at a different level of granularity than raw code can support Round-trip engineering tools - that attempt to keep code in sync with diagrams - often seem to suffer from a lack of fidelity that renders them ineffective. With BizTalk Orchestration, the diagram is the implementation (at least at a particular level) of a piece of functionality. Yes, you can disappear into components and lose sight of what might happen. Yes, there is a code representation (xlang/s) underneath the orchestration but it seems to be completely isomorphic with the diagram. So the opportunity exists to use an orchestration diagram in several interesting ways within a project lifecycle: 1.
As a way to capture an initial high-level design, using all the orchestration shapes as intended but not yet bothering with real maps and schemas. Stubbing out schemas (so you can declare messages and variables to be of proper types) and maps will allow you to flesh out the orchestration diagram(s) quite a bit, using the compiler as just a way to check for consistency. All of the external system interactions, communication patterns, decision points, parallel vs. joined flows, etc. can be represented at this point in a shell orchestration.
2.
As a way to gain consensus with the development team & business sponsor about whether the right functionality is indeed going to be built. The high level design just described is a great tool for this discussion. Put your orchestration(s) up on a wall with a projector and do a walk-through with as many of the project stakeholders as makes sense. Or use a tool like CutePDF to print the orchestration as a PDF to send around via email. (Of course, once Microsoft ships the Visio add-on for BizTalk 2004 orchestrations, this will represent another option for non-VS.NET users. This has the added benefit of allowing you to exclude what you might consider to be lower-level detail by setting the Report to Analyst switch on various orchestration shapes to False.) As a way to estimate work. The various shapes in your initial orchestration can often represent reasonable granularity for time estimates. And finally, as a way to guide project work...Rather than starting with the entire orchestration that you created to support steps 1-3, you might find it easier to create a new orchestration that represents the path(s) you are tackling at a particular point. You can cut/paste portions of that original orchestration or simply use it as a reference for what comes next it serves as your outline.
3. 4.
To help realize some of these benefits, naming conventions within an orchestration are quite important While the naming conventions are good practice for variables, Messages, Multi-Part types, etc. they are even more import for the workflow shapes. The goal is to ensure that the intent of each shape is clear, and that the text associated with the shape conveys as much as possible given the space constraints. In this way, a non-technical audience will be able to use the orchestration as documentation. Below are a set of proposed guidelines in this area.
BizTalk Artifact Namespaces Many artifacts within a BizTalk solution will have a standard .Net namespace associated with them. The standard guidance on .Net namespace naming could be adhered to with BizTalk artifacts, namely: CompanyName.TechnologyName.Feature However, you might also choose: CompanyName.[FunctionalArea].[Project].BizTalk.[AssemblyType] (where assembly type is discussed below) Note that these are Pascal-cased, and nested namespaces will have dependencies on types in the containing namespace. BizTalk Assemblies BizTalk Assemblies should often match the name of the associated namespace, such as CompanyName.TechnologyName.Feature.dll This pertains to the formal assembly name and the DLL name (which can be different in theory, but shouldn’t be in practice.) Note that a division into assemblies such as the following will often be quite suitable for a BizTalk project. MyCompany.MyProject.Orchestrations.dll MyCompany.MyProject.Schemas.dll MyCompany.MyProject.Pipelines.dll MyCompany.MyProject.Transforms.dll MyCompany.MyProject.PipelineComponents.dll Note that the Visual Studio solution name will likely be MyCompany.Project.BizTalk in this case. Long names such as this can be somewhat unwieldy to work with (especially in tools where File dialogs are too narrow.) However, the benefits associated with having the full scoping available when the assemblies and associated artifacts are encountered “in the wild” (i.e. in a shared BizTalk application environment) are judged to outweigh the inconvenience.
BizTalk Messaging Artifacts All names should be named with a Pascal convention unless mentioned otherwise for the specific artifact, although underscores are used to separate logical entities. For schemas, maps, orchestrations, and pipelines, ensure that the .NET type name matches the file name (without file extension.) Artifact
Standard
Notes
Example
PurchaseOrderAcknowledge_FF.xsd or FNMA100330_FF.xsd
Standards include XML, X12, FlatFile (FF) and other custom formats. Schema file
Property Schema files
Maps
Orchestrations
Send/Receive Pipelines
Receive Ports
_<Standard>.xsd or _<Standard>
_<Standard>.xsd
PONumber_XML.xsd PurchaseOrder_FF_To_PurchaseOrderAcknowledge_X ML.btm
If root node does not distinguish the schema – or if the schema is for a wellknown standard, use descriptive name.
EvaluateCredit.odx
Should be named to .NET Type reflect its common usage across multiple name should match, without schemas, if file extension. appropriate.
If xslt file spec’d for <SourceSchema>_To_.bt map, xslt file should m be named identically with xsl extension.
.NET Namespace will likely match assembly name.
Rcv_ PurchaseOrderAcknowledge_FF Rcv_CatalogUnzip
A meaningful name that represents the underlying process, likely with a verb-noun pattern.
Rcv_<SchemaName> or Rcv_ or Rcv_ Snd_<SchemaName> or Snd_ or Snd_
__To_ or _
A pipeline might be used to ensure reception of particular schema(s), or to perform some other function. Project name might be used when multiple schemas are spec’d for asm/dasm ‘BizApp’ prefix (corresponding to name of the app deploying to BizTalk) helps when many applications are deployed to the
ERP_PurchaseOrder_XML_To_POAck_XML (for request/response port) ERP_PurchaseOrder_XML
same BizTalk installation. Use functional description if the input schema (and potentially output (for one-way port) schema, if request/response) do not (One-way ports use functional description form) adequately describe the port. ERP_CheckOrderStatus (No need to add Snd/Rcv/Port, etc. since they are grouped accordingly in admin tools) Receive Locations
_
Send Port Groups
_
Send Ports
_<Schema>_ or ___
In some cases, the schema being sent is descriptive enough. In others, a functional description of the action to be taken by a destination app is better suited.
Parties
A meaningful name for a Trading Partner.
If dealing with multiple entities within a Trading Partner organization, the Organization name could be used as a prefix.
Roles
A meaningful name for the role that a Trading Partner plays.
ERP_CheckOrderStatus_MSMQT ‘BizApp’ prefix – see Receive Ports.
CRM_CustomerUpdateNotification
CRM_CustomerUpdate_ERP_MSMQT
Shippers
Orchestration Naming Conventions – Workflow Shapes Note: To add documentation to a group of related workflow shapes, use a Group shape. These will display as much text as you care to associate with them, and can add quite a bit of documentation value to the diagram. (Shape names should always follow Pascal casing after the prefix that is specified below.) Shape
Standard
Notes
Example
Scopes
Scope_ or Including info about transaction type may be appropriate in Scope__ some situations where it adds significant documentation Scope_CreditServiceCall value to the diagram.
Receive
Rcv_<MessageName>
Typically, MessageName will be the same as the name of the Rcv_rawCreditReport message variable that is being received “into”.
Send
Snd_<MessageName>
Typically, MessageName will be the same as the name of the Snd_pOAcknowledge
message variable that is being sent. Expression shapes should be named with pascal convention (no prefix) to simply describe the net effect of the expression, similar to naming a method. Expression
Decide
Decide_
Decide shapes should be prefixed with “Decide_” followed by Decide_ApprovalRequired a full description of what will be decided in the “if” branch
If-Branch
If_
If-branch shapes should be prefixed with “If_” followed by a (perhaps abbreviated) description of what is being decided
Else-Branch
Else
Construct Message (Assign)
Construct Message (Transform)
Assign_<Message> (for Construct) <ExpressionDescription> (for expression)
Else-branch shapes should always be named “Else”
GetFindingsReport
If_ApprovalRequired Else
If a Construct shape contains a message assignment, it should be prefixed with “Assign_” followed by an abbreviated Assign_PaymentVoucher name of the message being assigned. which contains expression: The actual message assignment shape contained should be CopyPaymentDetails named to describe the expression that is contained.
If a Construct shape contains a message transform, it should be prefixed with “Xform_” followed by an abbreviated description of the transform (i.e source schema to Xform_<SourceSchema>To destination schema.) Xform_LoanRequestToCreditRequest (for Construct) X_<SourceSchema>To (for expression)
Construct Message (containing multiple shapes) Call/Start Orchestration
The exception to this is the case where the expression is interacting with an external .NET component to perform a function that overlaps with existing BizTalk functionality – use closest BizTalk shape for this case.
The actual message transform shape contained should generally be named the same as the containing shape, except with an “X_” prefix to save space (“X_LoanRequestToCreditRequest”). If a Construct Message shape uses multiple assignments or transforms, the overall shape should be named to communicate the net effect, using no prefix.
Call_
which contains transform shape: X_LoanRequestToCreditRequest
Start_ The corresponding variable name for the exception type Throw_RuleException, which references should (often) be the same name as the exception type, only the “ruleException” variable. camel-cased.
Throw
Throw_<ExceptionType>
Parallel
Parallel_
Parallel shapes should be named “Parallel_” followed by a description of what work will be done in parallel
Delay
Delay_
Delay shapes should be named “Delay_” followed by an abbreviated description of what is being waited for.
Delay_POAcknowledgeTimeout
Listen
Listen_
Listen shapes should be named “Listen_” followed by an abbreviated description that captures (to the degree possible) all the branches of the Listen shape
Listen_POAckOrTimeout Listen_FirstShippingBid
Loop
Loop_<ExitCondition>
Role Link
Loop shapes should be named “Loop_” followed by an abbreviated description of what the exit condition is.
Parallel_CreditVendorCalls
Loop_UntilAllMsgsSent Loop_WhileErrorFlagTrue
See “Roles” in messaging naming conventions above.
Suspend
Suspend_
Describe what action an administrator must take to resume the orchestration. More detail can be passed to error Suspend_ReEstablishCreditLink property – and should include what should be done by the administrator before resuming the orchestration.
Terminate
Terminate_
Describe why the orchestration terminated. More detail can Terminate_TimeoutsExpired be passed to error property.
Call Rules
CallRules_
The policy name may need to be abbreviated.
Compensate
Compensate or Compensate_
If the shape compensates nested transactions, names should Compensate_TransferFunds be suffixed with the name of the nested transaction – or otherwise it should simple be Compensate. Comp_TransferFunds
CallRules_CreditApproval
Orchestration Naming Conventions – Orchestration Types Type
Standard
Notes
Example
Multi-Part Message Types
Multi-part types encapsulate multiple parts. The WSDL spec indicates “parts InvoiceReceipt message.” The name of the multi-part type should correspond to the (which might encapsulate an invoice “logical” document type, i.e. what the sum of the parts describes. acknowledgement and a payment voucher.)
Multi-Part Should be named (most often) simply for the schema (or simple type) <SchemaNameOfPart> Messsage Part associated with the part. Messages
camelCased
Variables
camelCased
Port Types
PortType
Ports
Port
Correlation types
pascalCased
Correlation sets
camelCased
Orchestration parameters
camelCased
InvoiceHeader
Should be named with camel-cased, based on the corresponding schema type or multi-part message type. If there is more than one variable of a type, purchaseOrderAck name for its use within the orchestration.
Should be named to suggest the nature of an endpoint, with pascal casing and suffixed with “PortType”. If there will be more than one Port for a Port Type, the Port Type should be named according to the abstract service supplied.
ProcessPurchaseOrderPortType
which might have operations such as SubmitPO The WSDL spec indicates port types are “a named set of abstract operations RequestPOStatus, etc. and the abstract messages involved” that also encapsulates the message pattern (i.e. one-way, request-response, solicit-response) that all operations on the port type adhere to. Should be named to suggest a grouping of functionality, with pascal casing and suffixed with “Port.”
ProcessPurchaseOrderPort
Should be named with pascal-case convention, based on the logical name of PurchaseOrderNumber what is being used to correlate. Should be named with camel-case convention based on the corresponding correlation type. If there is more than one, it should be named to reflect its specific purpose within the orchestration. Should be named with camel-case convention, and match the caller’s names for the corresponding variables where appropriate.
purchaseOrderNumber