This section describes a lightweight technique for gathering integration requirements and translating them into a list of BizTalk Server 2004 artifacts to be delivered. It discusses a typical BizTalk Server 2004 integration scenario. Readers can compare this typical scenario with their own requirements and create plans and documents accordingly.
The planning phase also includes setting up the development environment and the development processes to provide a stable and efficient development environment. Making changes to the development environment or processes during the development phase can be very disruptive, so time spent planning them is likely to save time later in the project.
Like most software development problems, the successful delivery of an integration solution depends upon the collection and collation of large amounts of information prior to the design process. The following sections suggest a lightweight approach to gathering the information that is typically useful to the design and development of an integration solution. This information includes the business processes and the messages that the solution requires.
Business Processes
An important function of the planning process is to draw up the master list of business processes that you will deliver with the integration solution. This task ensures that a single, comprehensive list of all the business processes exists, along with a list of all the business rules that apply to those processes. You can use this list to plan and design the development of the BizTalk Server 2004 artifacts that are required to carry out those business processes.
One possible approach to developing the list of business processes is to devise logical categories of related business processes and then list all the processes within each category. For example, categories like "User Management," "Supplier Transactions," "Customer Transactions," "Catalogue Management," or "Credit Control" are often meaningful to the business and typically consist of several related business processes (with related system and messaging requirements).
In the example scenario, the business process list is documented in the following tabular format.
Table 1 Example processes and categories
|
Business process category
|
Process name
|
|---|
|
Account Management
|
AccountCreateNewAcc
|
|
|
AccountUpdate
|
|
|
AccountValidate
|
|
Order Fulfillment
|
OrderProcessNewOrder
|
|
|
OrderConfirmBillingStatus
|
|
Billing
|
BillGenerateMonthlyBill
|
|
|
BillGeneratePendingBill
|
|
|
BillUpdateBillHeader
|
The team now has a master list of business processes that need to be developed. The next step is to capture the process details that are significant to the integration solution. Detailed information that is typically captured about each process falls into two categories—logical process information and implementation information. You may also want to diagram the high-level processes so that developers will have a starting point for creating BizTalk orchestrations.
Logical Process Information
This information describes the process in the abstract, without being concerned about the actual implementation technologies. It is typically gathered by interviewing the owners of the business processes rather than IT or system specialists. To gather logical process information, you might perform actions or answer questions like the following:
-
Produce a "flow chart"-style description of process logic. See "Diagramming Business Processes" below.
-
Define core business entities (not systems) that are involved in the process, for example, customers, orders, parts, invoices.
-
Identify the events or actions that initiate a process (both human and system-based).
-
Determine where exceptions occur in the current business processes and how those exceptions are handled (that is, is a process restarted, is human intervention required).
-
Determine where business data validation takes places in a process.
-
Understand the business rules that form part of the process.
-
Determine whether there are long-running processes (for example, days, or weeks).
-
Is any human intervention required to complete a process?
-
What is the nature of the communication between processes and other systems? For example, is the process real-time or batch-based?
-
Does information need to be translated or transformed?
-
Are manual processes being automated?
-
Are new processes being created to achieve the solution?
-
Are any of these processes currently residing in other systems? Can these be documented?
-
What business metrics, milestones, or key business data in the process must be reported to management?
-
How are humans notified or how do they interact in the process?
Implementation Information
Information related to the implementation is often dictated by the design and constraints of the existing systems being integrated. It is important to keep in mind the constraints placed around processes by the environment and other systems. These constraints often significantly influence the final design.
To gather this information you might perform actions like the following:
-
List the transport-specific requirements for each process.
-
List the security models and protocols required to interact with other systems.
-
List the messages to be consumed and produced by a given process.
-
Understand the message format constraints that exist (that is, which messages exist, which are standards, and which need to be created).
-
Detail the requirements for handling exceptions and errors.
-
Understand any transactional data requirements of a process, including any compensation logic required for long-running transactions.
-
List any message correlation requirements.
-
List any requirements for cross-referencing the indexing of data between the systems being integrated. (For example, is it necessary to maintain a link between the two separate customers? Do IDs used by different systems describe the same customer?)
-
List the auditing or management information system requirements.
-
List the applications or interfaces used to allow human intervention into the processes.
-
Understand the operational requirements of the processes, that is, what operational data must they expose (for example, logging) and what operational systems must they comply with?
Diagramming Business Processes
The Orchestration Designer for Business Analysts (ODBA) is a Microsoft Visio®-based tool that provides an environment for designing business processes as orchestrations. This tool is intended for business analysts to create basic orchestration flows in the familiar Visio environment. Using this tool, business analysts can create high-level orchestrations that can later be exported to the Orchestration Designer that developers use for implementing orchestrations.
The ODBA has the following advantages for discussing, white-boarding, and designing orchestrations:
-
It uses Visio (rather than Microsoft Visual Studio® .NET) to run, and is therefore better suited to non-developer environments.
-
It can be used by non-developers who are familiar with Visio.
-
The resulting diagrams can be easily incorporated into requirement and design documents.
-
The output from the ODBA can be imported into Visual Studio .NET and used as the basis for orchestration design.
To download the Orchestration Designer for Business Analysts, go to the downloads section of the BizTalk Server Web site at http://go.microsoft.com/FWLink/?LinkID=42402.
The use of Unified Modeling Language (UML) sequence diagrams or the "swim lane" style of diagrams can be useful in gaining a consensus on the actual flow of a business process. Microsoft Office Visio provides specific UML sequence shapes that can be used to document and distribute business process definitions. For information on creating UML sequence diagrams in Visio see the Office Online Web site at http://go.microsoft.com/FWLink/?LinkID=44996.
Defining Messages
The process of examining all business processes produces a list of the messages that are required to deliver the solution. When defining messages consider the following:
-
Determine the complete list of entities that are meaningful to the organization to allow the processes to be designed. Typically you started this list when looking at the processes and you will refine it here to produce the "business-centric" list of all the entities that are required.
-
Determine which message schema will define the "standard" messages. These are messages that are not constrained by any specific integration requirement but instead define a business entity, concept, or operation.
As an example, consider a "customer" message. Typically, different back-office systems implement interfaces that handle many different subsets of customer data, but there is only one standard that represents the organization's view of "customer." Note that this standard is based upon how the organization views the entity (as opposed to a system). This information could then used to define the Customer Message Standard for the organization and will be driven by the organization's long-term goals. For example, you can define the customer message so that it can contain data that is not currently required, but will be needed to deliver new services in the future.
-
When considering standards for messages, consider the cost of creating a standard and the cost of mapping to and from the standard for each of the upstream and downstream systems. In some cases, the standard provides benefits (especially when multiple systems all use a variation on the standard). In other cases mapping from one system to another system (without mapping to the intervening standard) can be a more practical approach.
-
Determine the ownership of standards. It is important for an organization to realize that messaging standards are a representation of business entities and concepts and should be owned by the business and IT jointly. This includes the owning of namespaces.
-
Are there existing messaging standards that you can use? Industry-specific standards may exist for exchanging data between organizations (for example, health care and finance). It is worth determining whether such a standard exists, and if it does, whether using the standard rather than defining a new one can provide benefits (both current and future).
-
Some vendors may publish standard messages for interacting with their systems. Using these schemas may save considerable development effort and remove specific integration challenges from the project team to a vendor's supported solution.
-
When defining messages, your result should be a comprehensive list of the messages you require to implement the solution. By stabilizing and gaining agreement to this list early in the project, you can avoid the introduction of new messages late in your development phase.
When describing the complexities of an integration solution, it is important that you use a strong set of terms to ensure clarity throughout the planning, designing, and development phases. You begin this process in the planning phase by identifying the naming conventions you use to describe systems and their operations. The naming conventions in the following table can be applied to the integration solution.
This document does not present a comprehensive list, but instead provides terms found useful on a variety of projects. For a comprehensive approach to integration terms, see the MSDN® paper "Enterprise Integration Patterns with BizTalk Server 2004" at http://go.microsoft.com/FWLink/?LinkID=42403.
Table 2 Integration terms
|
Name
|
Description
|
|---|
|
Integration layer
|
The technology that provides the actual integration functionality. In this document, the integration layer is provided by BizTalk Server 2004.
|
|
Upstream system
|
A system that participates earlier in the business process than the point currently being discussed or documented. Typically upstream systems transmit messages to the integration layer.
|
|
Downstream system
|
A system that participates later in the business process than the point currently being discussed or documented. Typically downstream systems accept messages from the integration layer.
|
|
Source system
|
The system from which a specific message originates.
|
|
Destination system
|
The system to which a specific message is targeted.
|
|
Process initiator
|
A system or event that starts (initiates) a process that the integration layer will be involved in.
|
|
Activated process or activated system
|
A process or system that is activated by an initiating process.
|
|
Master data
|
Data that is the master copy for a given process.
|
|
Adapter
|
Messages from a system are sent by using some protocols handled by an adapter. An adapter abstracts the system from the protocols used to communicate.
|
|
Duplicated data
|
Data that is the duplicated from the master for a given process. Sometimes known as slave data.
|
When describing data or messages between systems and the integration layer, it can also be useful to use a standard notation to avoid confusion over the direction of message flow. This is particularly useful when multiple request-response operations exist between systems.
One possible approach is to describe message instances between the systems using the notation of "incoming" and "outgoing" where "incoming" and "outgoing" are understood from the point of view of the integration layer. The following messages are examples:
Messages sent to the integration layer:
-
CRM_Add_Customer_Incoming_Request
-
Order_ProcessOrder_Incoming_Response
Messages sent from the integration layer:
-
Order_ProcessOrder_Outgoing_Request
-
CRM_Add_Customer_Outgoing_Response
-
The following figure shows the messages targeting the integration layer.
Figure 1 Message direction and naming
While it can be helpful to name message instances in an orchestration, naming the message schema with a name describing direction may cause confusion in other areas of the solution, especially if the schemas are reused or exchanged with other parts of the system.
Many line-of-business messaging applications, especially financial systems, use a numeric system for identifying the messages (that is, the message type, or schema, and the destination system/direction), for example, 9820000-1104 in ISO 8583, MT 512 in SWIFT. In such cases you can either maintain the numeric notation or use a combination of numbers and text to identify messages (such as MT_512_Securities_Trade_Confirmation).
It is not uncommon for a complex process to use 10 to 20 related incoming and outgoing request and response messages. A naming convention applied to orchestration messages and variables can aid clarity. A standardized approach can reduce possible errors and confusion and make documentation more effective.
In some cases, naming conventions can produce very long names that are not easy to use in Visual Studio, given that the dialog boxes and panes are narrow. In these cases consider using a coding scheme such as CRM_Add_Customer_IReq and CRM_Add_Customer_Oresp, where IReq is an incoming request and OResp is an outgoing response.
Describing Systems
When describing an integration solution, there is typically a large amount of detail to be captured about each of the systems and processes. It is useful to start by listing some common properties of each of the systems involved. It is typical to collect this information for each system participating in the integration solution.
The following table shows some common system attributes.
Table 3 Common attributes of systems
|
Attribute
|
Description
|
|---|
|
System purpose
|
The general business and technical purposes of the system being documented. Often there are system specialists involved in an integration solution who have no previous knowledge of the other systems involved. An overview can be valuable to ensure effective communication across the team.
|
|
Interfaces and access methods
|
A description of how the integration layer accesses the system (and vice versa). This is usually described in terms of the protocols and standards used by the system for both incoming and outgoing operations.
|
|
Message and data formats
|
Details on the likely format of incoming and outgoing data and messages.
|
|
Data master
|
When understanding data and process it is important to understand which system holds the master copy of each type of data. For example, a CRM system may be the master for all customer address data, but may also hold replicated accounts data.
|
|
Volume and frequency of data operations
|
The volume and frequency of data operations can have an impact on the design of an integration solution. During planning, it is typical to capture as much information about this volumetric data as possible. Ensure that these figures include peak volume requirements because these may be a significant requirement.
|
|
Security models used
|
When designing an integration solution, the security requirements are often one of the most complex areas to model and implement. Typically this information consists of:
-
A description of the authentication and authorization models imposed upon the integration layer when calling into a system
-
A description of the authentication and authorization models used when calling out of a system into the integration layer
-
Any requirements the system places on secure communications (for example, encryption required to communicate with the system)
|
Example Integration Information Gathering Scenario
In our example scenario the planning process starts by documenting the systems as shown in the following table, with more detail being included as the planning and design processes uncover more information. The following table lists examples of the type of data that is typically recorded. The systems described here represent a customer relationship management system and an account management system.
Table 4 Example system information
|
System
|
Customer relationship management system (CRM)
|
Account management (Accounts)
|
|---|
|
System purpose
|
Provides pre-sales, sales, and customer management functions to customer services representatives. The application provides the logic, storage, and front end for all interaction between customers and the organization (for example, the screen used in call centers when a customer calls up). Used to manage prospects and to manage the status of a customer.
|
Maintains the databases and logic used to manage customer accounts and the logic to run account billing and management processes.
|
|
Interfaces and access methods
|
Incoming and outgoing: Access to and from this system is via custom XML documents posted using HTTP over Web interfaces (not Web services). The XML documents are defined by the CRM system. That is, other systems wishing to communicate with the CRM system must conform to the specifications laid down by the CRM system.
Typically used in an interactive manner, where a change needs to be made to a customer or product within a matter of seconds or minutes. (Synchronous).
|
Incoming: Unidirectional HTTP access to the system, with the system accepting XML messages on an HTTP listener, with no response message (other than a transport success message).
Outgoing: Batch-based file outputs typically running nightly, weekly, or quarterly processes. Files written to a UNIX file share location.
|
|
Message and data formats
|
Incoming message formats: CRM-specific XML schema. Definition available as XSD file. Actual schema used is dependent upon message type (of which six exist).
Outgoing message formats: CRM-specific XML schema. Definition available as XSD file. Actual schema used is dependent upon message type (of which six exist).
|
Incoming message formats: Custom XML message as defined by Accounts system. Sample XML messages available.
Outgoing message formats: Positional ASCII flat file with headers and footers. Definition available as Word document.
|
|
Data master
|
CRM is the master source for pre-sales prospect information.
While the system provides access to customer information, it is not the master for customer information (which is held in Invoicing).
|
This system is the master for customer and account information.
|
|
Volumes and frequency of data operations
|
Updates from the CRM system are regular during the day, covering the entire 24-hour period (due to a global roll out). Volumes of operations are 1-2000 per day. The resulting 1-2000 messages mostly hold customer data. Due to the internal definition of a customer used by the CRM system the messages to and from the CRM system can consist of very large XML documents, with sizes of 500K not uncommon. Message size and frequency is significant parameter in sizing the integration servers and may be significant during the design phase.
|
Incoming: Incoming requests to the Accounts system are infrequent and small in size.
Outgoing: Due to its batch nature, under certain circumstances the volume of data passed from the Accounts system can be very large. Typically these large volumes occur during processes like quarterly or year-end billing runs. These large volumes are significant because it is often the case that there exists a relatively short duration in which all this information must be processed. (For example, there might be 1000 files of 3 MB each.)
|
|
Service windows
|
Available for a 24 x 7 global application.
|
Available GMT 8 AM – 8 PM (with peak usage at month ends).
|
|
Security models used
|
Incoming: The CRM system expects a user identity and password to be passed as a part of all incoming messages for validation against an internal user store.
Outgoing: By default the CRM system's outgoing HTTP requests do not pass credentials to the target system.
|
Incoming: HTTP requests accepted from a set of known IP addresses only.
Outgoing: Configurable credentials are used to write outgoing data files to a specific location.
|
Categorizing Interfaces
Having previously defined the systems and business processes in scope, the next step is to document the interfaces that are required to enable the integration layer to connect to the upstream and downstream systems. One way to capture this information is to list the processes and then detail each of the interfaces required by each process. If you are designing a system to replace an existing integration solution it can be helpful to obtain actual copies of all the types of messages that are currently going through the various systems.
The following list describes typical information that you should gather while you are categorizing interfaces:
-
Interface name
-
Business name
-
Interface description
-
Source system name
-
Destination system name
-
Interface address (URI/URL)
-
Interface direction—examples include:
-
Unidirectional/Incoming (to the integration layer)
-
Unidirectional/Outgoing (from the integration layer)
-
Bidirectional/Incoming
-
Bidirectional/Outgoing
-
Protocol
-
Message/data format used
-
Message schema name
-
Expected number of messages per minute, average and peak
-
Expected average message size
-
Message schema owner
Later in the planning process, this list of interfaces can be further extended to help produce a detailed list of functional requirements that can be used as the basis of a BizTalk Server 2004 development.
A helpful way to document those functional requirements is in the form of test cases with specific input files and expected output files. This typically means collecting a lot of data early in the project, but in all likelihood this data will be required when development or testing starts. By gathering it early in the development process, you can spot any unanticipated challenges early on.
Documenting Interfaces as Contracts
When developing an integration solution, the definition of interfaces is a significant part of the design process. The interface is typically considered as a "contract" between each of the parties involved in the development of the integration solution. The contract verifiably ensures that parties are developing compatible systems.
When documenting interfaces it is useful to be able to produce detailed descriptions of the interfaces as part of the contract. The best way to document the contract is with a domain-specific language like Web Services Description Language (WSDL), or with some other consumable form of metadata. All parties can use these descriptions to validate that their development meets the interfaces expected by upstream and downstream systems. When working with XML-based solutions like Web services and BizTalk Server 2004, standards exist to produce these detailed contract descriptions. The following table shows the contract formats for various interface types.
Table 5 Interface types and contract formats
|
Interface message type
|
Contract format
|
|---|
|
XML message
|
XSD schema files.
Note
If no XSD schema file exists, but sample XML messages exist, then BizTalk Server 2004 can generate an XSD based upon a sample XML file. See "Add Generated Items" in BizTalk Server 2004 Help for more details on this functionality.
|
|
XML Web service
|
WSDL definition files.
|
|
Flat files
|
BizTalk schema and the flat file validation tools.
Note
The flat file command-line tools can be used to aid the validation of flat file instances against a BizTalk Server schema and can be found in the SDK under SDK\Utilities\Pipeline tools.
|
Summary
At the end of the information-gathering process, the high-level requirements of the integration solution are captured in a series of related documents that list unique business processes, systems, and interfaces. As the design process progresses, the level of detail captured increases. Prior to development, it is typical to produce a list of BizTalk Server 2004 artifacts to be developed during the build phase.
Additionally the planning phase may well identify the number and type of test harnesses or stub systems that will be required to meaningfully develop and test the business processes. The planning phase may also identify the data requirements needed to allow development to proceed. This may include migration requirements and cross-reference data.
You use this list of requirements to aid in designating teams, planning schedules, and identifying required development resources.
The approaches described in this section relate to the general approaches needed when developing within a team. Many of the concepts in this document are covered for general .NET development in the MSDN white paper Team Development with Visual Studio .NET and Visual SourceSafe.
Dividing Tasks and Allocating Ownership
When developing a solution within a team it can be very helpful to define owners and development teams for distinct parts of the solution early in the development process. Typically, named individuals (or groups of individuals) are given ownership of logical parts of the solution. Useful divisions of work can include allocating ownership of:
-
Individual business processes
-
Process-specific messages, schemas, transports, and protocols
-
Shared message standards
-
Map development
-
Error messages and error-handling standards
-
Upstream and downstream system interfaces
-
Helper classes and utilities
-
Test data and test tools
-
Deployment and build processes
Typically, the owners are responsible for understanding their parts of the solution and act as the "gateway" to any requested modifications. In this way when a modification to a design is proposed, the owner can assess the effect of the proposed changes and then allow or disallow that change. This is particularly important when working with shared parts of the solution, like shared message standards, where a change can have a potentially significant impact upon the development team and upstream or downstream systems.
Solution Structures and Team Development Models
The following sections discuss solution structures and development models for a BizTalk Server 2004 project with multiple developers.
The term "solution structure" refers here to the logical and physical structure used to store all the related BizTalk Server 2004 files and folders required to produce, develop, test, and deploy a production solution.
The term "team development model" refers to the relationship between Visual Studio .NET projects and solutions, Microsoft Visual SourceSafe® source configuration, and the setup and processes used for a team of developers using common resources across multiple workstations.
It is important to enforce a solution structure. A BizTalk Server 2004 solution that is built to meet business requirements typically consists of many separate related artifacts. To avoid rework and build failures, these artifacts need to be managed throughout the project from development, test, deployment, and production. A typical BizTalk Server 2004 solution will contain the artifacts in the following table.
Note |
|---|
|
This list does not include artifacts related to Business Activity Monitoring (BAM), Human Workflow Services (HWS), and the Business Rules Engine (BRE).
|
Table 6 Typical Visual Studio .NET and BizTalk solution entities
|
Artifact
|
Description
|
|---|
|
Visual Studio .NET solution files
|
The files produced by Visual Studio .NET when creating and editing a BizTalk Server 2004 solution.
|
|
Strong name keys
|
Strong name key files used to assign strong (unique) names to the assemblies produced during the build process.
|
|
Binding files
|
The files that BizTalk Server 2004 uses to bind a BizTalk Server 2004 assembly to physical resources (HTTP addresses or file locations).
|
|
ASP.NET Web service files
|
ASP.NET files, .NET DLLs, and configuration files produced by the BizTalk Web Services Publishing Wizard that provide a Web service interface to BizTalk Server 2004.
|
|
Output DLLs
|
The assembly files produced by the build process.
|
|
HTTP receive functions
|
Configuration information that describes Microsoft Internet Information Services (IIS) virtual directories that host the BizTalk Server HTTP receive DLL.
|
|
Referenced DLLs
|
Files containing functionality used by the BizTalk Server 2004 solutions using file references.
|
|
Cross-reference data
|
Data used to prime the BizTalk Server 2004 cross-reference databases.
|
|
Test data
|
Data files used to initiate or participate in the testing of processes under development.
|
|
Test tools
|
Tools used to initiate or participate in the testing of processes under development. These might include "stub" Web services that act like a Web service not available during testing, or tools that act like an external application submitting a message into BizTalk Server 2004.
|
The solution structure is important to a team of BizTalk Server 2004 developers for the following reasons:
-
Any integration solution by its nature consists of many independently developed assemblies that need to fit together, like pieces of a jigsaw puzzle, to deliver the complete solution. If these pieces are not closely managed throughout the development, there is a strong chance the pieces will not fit together when the complete solution is tested. A predefined solution structure assists in enabling the management of these parts.
-
In a solution of medium to high complexity, BizTalk Server 2004 projects are themselves often linked and dependent upon each other. A solution structure helps ensure that the relationships between BizTalk Server 2004 projects is enforced and maintained throughout the development process.
-
Deploying and testing a BizTalk Server 2004 solution requires more than just the output of the compilation process. A typical process may require binding files, test data, test harnesses, and stub systems as well as the BizTalk Server 2004 assemblies to perform a functional test. A well-defined solution structure allows testing and deployment to be automated.
A typical BizTalk Server 2004 solution structure is composed of the following logical elements:
-
A Visual Studio .NET solution structure, which describes the relationship between BizTalk Server 2004 solutions, project files, and dependencies.
-
A file system folder structure in which to store BizTalk Server 2004 project files and the other associated entities required to develop and test a solution.
-
A development model that describes how a team of developers share the server resources required to develop a solution.
-
An approach to using Visual SourceSafe that enables the BizTalk Server 2004 projects and artifacts to be successfully source controlled and shared among a team of developers.
Dividing BizTalk Server Artifacts between Projects
There are many ways to create a BizTalk Server application composed of maps, schemas, orchestrations, pipelines, and so on. The most common is to place all of the BizTalk artifacts in one project, compiled and then deployed as a single unit. This method has the benefit of simplicity but is less effective when you take into account required modifications and project upgrades.
Using this model, when modifications or upgrades are needed, you must first undeploy the complete application. This means stopping the orchestrations and potentially affecting related entities. For example, if you use custom pipelines, the undeploy operation causes the pipeline bindings to default back to the pass-through pipeline. After you deploy a change, you must reconfigure any location that uses custom pipelines.
As an alternative to using the single-project approach, consider how the application is structured and look for ways to split the artifacts into logical groups. A typical way to manage this is to place orchestrations, pipelines, schemas, and maps in their own projects. If a pipeline changes, just a single assembly can be undeployed, and there is no need to undeploy maps or schemas. In the same way, if a map changes there is no need to undeploy the schemas. Additionally, consider dividing sub orchestrations (that is, orchestrations that are called by other orchestrations) into their own projects.
Remember that a project can only be deployed as a single unit. If the task of redeploying a single project begins to involve the rebinding of unrelated resources, then you should consider splitting the project into smaller units that allow the deployment and binding of related items only.
Note |
|---|
|
The preceding approach is a "horizontal" division of work. You may want to consider a vertical division as well (that is, by project or business process functionality). For example, if a pipeline or schema is updated it should only affect the business project that it is related to. This is relevant if you have the requirement to avoid shutting down a CRM integrator when the ordering system updates a schema.
|
The following table shows the structure of a typical project.
Table 7 Typical project structure
|
Project
|
Description
|
|---|
|
Standard schemas project
("Shared Schema")
|
This project contains all the schemas that are shared across the whole solution. This project is referenced by other BizTalk Server 2004 projects. It is separate because it needs to be shared and should be stabilized early in the project.
|
|
Functionally grouped orchestrations ("Billing Project")
|
These projects contain logically related orchestrations, such as "Billing project" and "Invoicing project." These are usually separated out because these related orchestrations are usually under control of a single individual and they often contain schema local to their own processes.
|
|
Shared orchestrations projects
("Email Handler")
|
These are orchestrations that are shared across the whole solution. These are kept separate to allow other projects to reference them. Typical examples include "error handling project" or "email send project." They contain the orchestrations and schema necessary to complete a discrete set of tasks. Where possible, you should stabilize these functions early on in the project because changes can affect all projects using them.
|
Team Development Models
Team development with BizTalk Server 2004 has close parallels with team development of Web applications. Both models typically have dependent elements that can be shared between the team members or a user in isolation.
The development model for BizTalk Server 2004 proposed in this paper is based upon the "isolated model" of development. The models available for BizTalk Server development are "isolated," "semi-isolated," or "non-isolated." In the isolated model, no elements of the developer environment are shared (with the exception of access to a common Visual SourceSafe tree). When using semi-isolated and non-isolated models, increasing areas of the developer environment are shared. The nature of the BizTalk Server 2004 runtime means that isolated development typically provides the most effective approach. BizTalk Server 2004 developments are typically composed of several distinct environments, as shown in the following table.
Table 8 BizTalk Server environments
|
Environment
|
Description
|
|---|
|
Developer tools
|
Tools used to produce BizTalk Server 2004 solutions. Composed of Visual Studio .NET and BizTalk Server 2004 design-time tools and test tools.
|
|
Developer runtime
|
Environment used to test a developer's output. Composed of the BizTalk Server 2004 runtime, deployment tools, and test tools.
|
|
Integration test environment/shared test runtime
|
Environment used to test multiple developer deliverables in a single environment (often logically mirroring the production environment). Composed of the BizTalk Server 2004 runtime and deployment tools.
|
|
Pre-production environment
|
Environment that is as close to the physical production environment as possible. This is used to test the deployment processes and runtime of the completed integration solution. This environment can also be used for scalability and performance testing.
Composed of the BizTalk Server 2004 runtime and deployment tools.
|
|
Production environment
|
Environment used to deploy the completed integration solution. Composed of the BizTalk Server 2004 runtime and deployment tools.
|
The team development model described below details an approach to configuring the developer tools, developer runtime, and shared runtime to provide an isolated developer environment.
What Is the Isolated Development Model?
Using an isolated model a developer edits, debugs, and runs functional tests completely isolated from other developers. Each developer has a self-contained development workstation with a local BizTalk Server Group. Access to the master source files is controlled via a Visual SourceSafe database located on a network file share. The following figure illustrates an isolated development model.
Figure 2 Isolated BizTalk Server development
The isolated model of BizTalk Server development provides the following benefits:
-
No chance that BizTalk Server shared configuration information will interfere with another developer's work (for example, XML target namespace clashes occurring from multiple installed versions of shared schema)
-
No opportunity for any one individual's BizTalk Server deployment and test processes interrupting other users (for example, the starting and stopping of BizTalk Server host instances, receive locations, or dependent services like IIS, SQL, and SSO)
-
Ability to clear resources like event logs and tracking databases without disrupting other users
-
Ability for developers to use different versions of shared resources, for example, helper classes and error-handling processes
-
Ability for developers to attach and debug the BTSsvc.exe process without halting other developers' processes
A shared or non-isolated model can be used for developing with BizTalk Server 2004 if it is absolutely required, but developer efficiency may be reduced by the lack of the benefits listed above.
Using Microsoft Virtual PC to Host BizTalk Server 2004 Development Environments
In our experience of developing BizTalk Server 2004 solutions Virtual PC can be used to efficiently create an isolated development environment. Within Microsoft Consulting Services, this is the standard approach used on nearly all BizTalk Server 2004 developments. Using Virtual PC typically saves the development teams a considerable number of hours of effort (per developer) to create the development environment, and is an extremely efficient way to enforce a standard development environment. It has additional advantages including the ability to efficiently "package up" a development environment. This technique is often used for scenarios like sharing best practices, handing over issues between teams, and testing possible server configurations.
For more details on implementing this approach, see "Using Virtual PC or Virtual Server to Host the BizTalk Server 2004 Developer Environment" later in this document.
For product information about Microsoft Virtual PC 2004, see the Windows Web site at http://go.microsoft.com/fwlink/?LinkId=44997.
Partitioning Visual Studio .NET Projects and Solutions
Visual Studio solution files (with the .sln file extension) are used to group related projects together and are primarily used to control the build process. You can use solutions to control build dependency issues and control the precise order in which contained projects are built. Partitioning describes the processes of creating Visual Studio .NET solution files that divide up the multiple projects that compose a complete BizTalk solution. The approach used to partition BizTalk Server 2004 solutions and projects has a significant impact on the development and build processes in a team environment. There are three main approaches to consider when partitioning solutions and projects, as shown in the following table.
Table 9 Solution partitioning approaches
|
Partitioning approach
|
Description
|
Applicability
|
|---|
|
Single solution
|
The team creates a single Visual Studio .NET solution (the master solution) and uses it as a container for all of the BizTalk Server 2004 projects required by the BizTalk Server 2004 solution.
|
Viable for simpler BizTalk Server 2004 projects with only two or three developers.
|
|
Partitioned single solution
|
Used in more complex developments where related sets of projects are grouped together within separate sub-solution files. A master solution still exists but is used for building the entire solution on the build server.
|
Should be considered for more complex solutions with several developers.
|
|
Multi-solution
|
Using this model there is no master solution file and file references are used between projects in separate solutions (although project references are still used between projects within an individual solution).
|
Not recommended. Relies on non-recommended file-based references.
|
The partitioned single solution approach is often applicable, but is the most complex to set up. For these reasons this approach is documented in the appendix. The single solution approach uses the same principles as the partitioned, and the approach documented can easily be modified for the single solution. Unless you have very good reasons to use a multi-solution model, you should avoid this approach.
Attributes of a Partitioned Single Solution
When developing more complex BizTalk solutions it can be advisable to reduce the number of projects and source files required on each development workstation by grouping related sets of projects together within separate sub-solution files. This approach can be particularly beneficial if the complexity of the BizTalk Server 2004 solution means that loading, navigating, and rebuilding projects can take a significant amount of time.
This partitioned single solution allows developers to work on separate, smaller subsystems within the inner-system boundary. The following diagram illustrates the partitioned single solution model. Notice how separate solution files are used to allow you to work on smaller subsystems contained within the inner-system boundary. Also note how this results in projects being contained within more than one solution file. For example, in the following figure, Projects D and H are in a total of three solution files including the master solution.
Figure 3 Partitioned single solution
In the partitioned single solution model:
-
All projects are contained within a master solution file. This is used by the system build process to rebuild the entire system. If you need to work on the top-level project file, you also work with the master solution.
-
Project references are used between individual projects. For example, file references are not used and instead the project containing the dependency is added to the solution and a project reference created.
-
Separate solution files are introduced for selected project files. If you want, you can introduce a solution file for each project within your system. Each solution file contains the main project file, together with any downstream project it depends on and any further projects it depends on, and so on down the dependency chain.
-
Separate solution files allow you to work on smaller subsystems within your overall system but retain the key benefits of project references. Within each sub-solution file, project references are used between constituent projects.
For more information about partitioning Visual Studio .NET solutions see Chapter 3, "Structuring Solutions and Projects," in the MSDN white paper Team Development with Visual Studio .NET and Visual SourceSafe that was referenced at the beginning of this section.
Using Project References
As described in the previous section, single solutions and partitioned single solutions use project references to create references between dependent BizTalk Server 2004 projects. This is significant because project references provide significant advantages over file-based (DLL) references. Specific benefits include:
-
A build process using project references automatically calculates the build order dictated by the dependencies. This significantly simplifies the build process for projects with dependencies.
-
A project-referenced solution can determine if a referenced project has been updated and will manage the rebuilding of the references. This is important in an environment when several users have dependencies upon a shared project (like a helper project) that is changing during the development phase.
Referencing External Dependencies
Use DLL references when referencing an external DLL that is outside of the BizTalk Server 2004 solution.
For example, suppose that an external organization is supplying schemas that are out of the control of the BizTalk Server development project. These DLLs would be referenced by DLL. Other examples are .NET Framework assemblies and third-party assemblies.
Copy Local Attribute
When working with project or file references, do not change the default "Copy Local" attributes for a referenced project or DLL.
For more information about partitioning Visual Studio .NET solutions see Chapter 4, "Managing Dependencies," in the the MSDN white paper Team Development with Visual Studio .NET and Visual SourceSafe that was referenced at the beginning of this section.
Creating the VSS Structure
The file system folder structure used to store the BizTalk Server 2004 integration solution must accommodate not only the BizTalk Server 2004 solutions and projects, but also all the additional artifacts that are required to develop, build, test, and deploy a BizTalk Server 2004 solution. The folder structure must also be compatible with the structure used within the team's Visual SourceSafe (VSS) repository to ensure efficient integration with the common source control tasks.
The folder structure described here is based upon typical BizTalk Server 2004 requirements and is designed to comply with common Visual SourceSafe tasks. It can be modified to meet the requirements of a given development team.
When creating the VSS structure, keep in mind the following points:
-
Use a consistent folder structure for solutions and projects. Development in a team development environment is easier to manage if a common structure for storing Visual Studio .NET solutions and projects is used across the whole team. This is especially true when each BizTalk Server 2004 project will be generating and using files such as binding files that will be required by build, test, and deployment teams.
The structure of BizTalk Server 2004 project files means that certain project entities (like the strong name key file) are by default referenced by an absolute file path. This means that unless the same file structure is replicated by each developer, each developer will need to modify the project to allow the project to compile and deploy.
It is often easy to start development without taking the time to standardize on the folder structures. This will inevitably cost more time later on as project links and test harnesses need to be "patched" as the solution develops.
-
Keep VSS and file system structures identical. To simplify the management of multiple developers' environments, set up a folder structure within Visual SourceSafe that matches your local file system structure. This helps ensure that a developer can simply get a latest version from Visual SourceSafe and know that the structure on the disk is compliant to the team's standards.
-
Define and use a common root folder across the team. It is recommended to keep all project code and deliverables under a single folder root, which can be created on all developers' computers. For example, create a root folder of $/SysInteg2004 within Visual SourceSafe and all developers can create C:\SysInteg2004 on their local file systems. This acts as a container for all of your development systems.
The drive need not be the C drive, but if a drive other than C is used, make sure that all developers have a similarly named drive available. In case you want to use drive letters that are not available on all computers, the SUBST shell command can be used to create drive letters mapped to physical folders, for example:
When the preceding command is executed at the command prompt, it creates a drive letter m: mapped to physical folder c:\SysInteg2004. Avoid using a network share to store the project files (to avoid the security warning that arises from developing a .NET application on a non-local drive).
-
Create a master solution that will hold all projects. As described in the section above, the single partitioned model for BizTalk Server development is generally recommended for medium to high complexity BizTalk projects. For this reason a master solution should be created that will hold all the subprojects. This master solution will typically be used as the main build solution. For notes on creating a master solution for a partitioned single solution in Visual SourceSafe see "Appendix: Step-by-Step Guide to Setting Up a Partitioned Single Solution."
-
Store all Visual Studio .NET BizTalk Server 2004 projects in a folder under the master solution. If Visual SourceSafe is being used as the source control environment then it is necessary to ensure that all subprojects are created in a folder underneath the folder holding the master solution that contains them.
Note |
|---|
|
It is possible to store multiple solution files in the same folder, but this limits the ability of Visual SourceSafe to create partitioned solutions.
|
For notes on adding subprojects to a master solution for a partitioned single solution in Visual SourceSafe see "Appendix: Step-by-Step Guide to Setting Up a Partitioned Single Solution."
For more information, see "Working with Visual SourceSafe" in the MSDN white paper Team Development with Visual Studio .NET and Visual SourceSafe that was referenced at the beginning of this section.
-
Divide the folder structure into shared and process-specific sections. When creating the file structure it is usual to divide up the folder structure to separate the shared entities versus the specific business process entities. The shared entities are common to multiple projects and may include helper classes.
For example, the first three folders in the following list are organized by shared entity and the last two are organized by business process:
C:\SysInteg2004\_Master_Solution\Shared\
C:\SysInteg2004\_Master_Solution\Shared\EmailHelper
C:\SysInteg2004\_Master_Solution\Shared\SharedSchema
C:\SysInteg2004\_Master_Solution\AccountRequest\
C:\SysInteg2004\_Master_Solution\AccountValidate\
-
Pipeline projects. During development of pipeline components, it is a common requirement to modify and retest a pipeline independent of the rest of the solution. For this reason it is often helpful to keep pipeline solutions as a separate BizTalk Server 2004 project, resulting in a separate pipeline assembly that can be removed and redeployed without the need to perform rebinding of the rest of the solution.
Additionally it is common practice to keep the code that implements the actual pipeline interfaces and pipeline processing logic in a separate project with a reference from the BizTalk Server 2004 project (containing the .btp files) to the C# or Microsoft Visual Basic® .NET project.
For notes on debugging pipelines see "Debugging Pipelines" later in this document.
-
Creating deployment and test scripts. When developing with BizTalk Server 2004 it is common to automate complex or often-repeated tasks by using scripts or command (.cmd) files. Nearly all BizTalk Server 2004 deployment and runtime tasks are exposed as command-line tools or Windows Management Instrumentation (WMI) interfaces to enable the development of scripts to aid automation of these tasks.
To enable the development of a unified build and deployment process, build and install scripts should be built by the individual developers, but viewed as reusable parts of the complete solution. If the scripts are written to be reusable then tasks like the deployment of a complete solution package can reuse the scripts. For example, if the deployment and undeployment scripts accept parameters to specify the paths for the DLL and binding file folder locations, the scripts can be reused when the compiled BizTalk Server assemblies are in a different location.
Using this approach, each developer adds the install scripts for their specific processes to the folder and then a single process can easily be written to perform a full deployment of all processes. For more information about deployment scripts see "Automating Deployment Tasks." For more information about build scripts see "Automated Build Processes."
Scripts are typically stored along with the process they reference, using standard script names as in the following examples:
C:\SysInteg2004\_Master_Solution\AccountValidate\scripts
C:\SysInteg2004\_Master_Solution\AccountValidate\scripts\deploy.cmd
C:\SysInteg2004\_Master_Solution\AccountValidate\scripts\undeploy.cmd
In this way solution-wide scripts can be built up that call the individual process scripts (for example, SolutionDeploy.cmd calls AccountValidate\scripts\undeploy.cmd).
An alternative approach may dictate that the scripts used to deploy a BizTalk Server 2004 solution need to be in a single shared folder. In this case the scripts need to be named according to the process they relate to. Again this approach can be used to build solution-wide scripts by calling individual scripts.
-
Strong name keys. All BizTalk Server 2004 projects result in assemblies that are deployed to the global assembly cache, and as such they must be signed with a strong named key during compilation.
Typically a single Visual Studio .NET solution uses a single key file. This is true because the solution is treated as a single entity and is managed as such. If the business solution being developed is actually composed of two or more distinct parts, then consider if two key files should be used. Multiple keys in this scenario allow the parts to be treated as independent entities in the future, for example with differing upgrade paths.
When considering helper projects, the same considerations apply. If the helper project is (or will be) a separate entity then it should be built using a separate strong name key.
In an organization that has a closely guarded secure key that developers do not have access to, consider using delayed signing with the key. For more details on delayed signing, see Delay Signing an Assembly in the .NET Framework Developer's Guide available in the MSDN Library.
The process of creating the key and including it in the project is simple; however developers should be aware that the path to the key stored in the BizTalk Server 2004 project is stored by default as an absolute path that includes the drive name (for example, Z:\CommonFiles\Keys). This has the disadvantage that projects cannot be edited or compiled on another workstation unless the path to the keys is exactly the same (or the key paths are modified every time the project is moved).
If it is required to not tie the project to a specific drive name it is possible to change the path to a relative path (and hence remove the drive name) by modifying the assembly key file path.
For a BizTalk project with the default folder structure for the output assembly, for example:
<project folder>\bin\development
The key file path will be modified to the following:
The following figure shows the relative key file path.
Figure 4 Relative strong name key paths
It is often helpful to build a project directory structure that can be replicated upon every workstation with a specific path to the key in the structure, for example:
C:\SysInteg2004\_Master_Solution\Shared\Keys
-
Test harnesses and stubs. It is generally recommended that test harnesses and test stubs be developed early in the project because they are useful resources and they also help develop a deeper understanding of the actual interactions between the integration layer and the other systems. If test harnesses are kept under the master solution then they can be included in the source control of a specific process or under a more general shared project. For example:
C:\SysInteg2004\_Master_Solution\Shared\Test
For more details on test harnesses, see "Testing BizTalk Server 2004 Solutions."
-
Cross-reference seed data. If the BizTalk Server 2004 cross-reference databases are being used as part of the business processes under development then it is often necessary to load the databases with the necessary data to allow lookup operations to successfully take place. Cross-reference data can be input using the BizTalk Server 2004 Cross Reference Import Tool (btsxrefimport.exe) and XML "seed files."
When the import tool is run it empties the cross-reference databases before importing new data from the seed file. This means that prior to the development of the "all processes" deployment script all seed data must be consolidated into one seed file. For example:
C:\SysInteg2004\_Master_Solution\Shared\CrossRefData\MasterSeedData.XML
Early in the development cycle, individual developers may need to seed their local database with process-specific data only. In this case the seed data should be held in individual files, named according to the process they relate to. For example:
C:\SysInteg2004\_Master_Solution \Shared\CrossRefData\AccountRequestSeedData.XML
-
Storing BizTalk binding files. When developing BizTalk Server 2004 projects binding files are produced that define the binding of a logical process to the physical transports and hosts. This binding information is initially created by using the GUI tools but is then persisted in binding files to ensure that a process can easily be deployed in a repeatable, scripted manner.
Complexity arises from the fact that the physical binding information for the development environment may be different from that in the test, pre-production, and final production environments. Additionally the binding files contain references to the specific version numbers for the DLLs being deployed, and consequently these files need to be managed to be kept in sync with any DLL version number changes.
To help manage this complexity the binding files should always be located within a specific location for a given process and named following a naming convention. This makes it easier to perform modifications to the binding files (either manually or automatically).
Typically binding files should be kept in a folder called "bind" underneath the project folder and named according to a naming standard. For example, the binding files for the "AccountRequest" process in the development environment could be kept in a file as in the following example:
C:\SysInteg2004\_Master_Solution \AccountRequest\bind\bind_AccountRequest_Stage1_DevEnv.xml
Note how this convention allows binding files from multiple processes to be moved to a single folder location and still be identified. In some solutions multiple binding files may be required. Ensure that the naming convention used can take this into account.
-
Location for file dependency DLLs. When creating the folder structure it is helpful to create a common folder to hold DLLS that are referenced as file dependencies. By ensuring that all developers follow the same folder structure, file references will not become broken when solutions are moved between developers or workstations. For example:
C:\SysInteg2004\ReferencedBin
-
Test messages. When developing schemas and using messages it is common to spend considerable effort testing many different sample messages against XML schema and orchestration processes.
In a real-world solution, sample messages are a valuable asset because they contain data that is meaningful to the business solution. Random or dummy values in the same message will typically cause the process to fail. For this reason sample messages should be treated with as much care as the code of the solution.
To assist in managing the message files, keep test messages under a specific folder called "msgs". In cases where there are both "generated instances" and "example messages" (for example, messages from an existing system) it is useful to keep these messages separate to allow comparison between the developed schema and actual data. For example:
C:\SysInteg2004\_Master_Solution\AccountRequest\msgs\
C:\SysInteg2004\_Master_Solution\AccountRequest\msgs\generated\
C:\SysInteg2004\_Master_Solution\AccountRequest\msgs\examples\
It is common in an integration project to have multiple versions of schemas and consequently, multiple versions of message files. In the same way that code has a version number applied, it is worth considering ensuring that version numbers are used when naming files.
It may also be worth considering storing message instances within Visual SourceSafe. This has the added advantage of allowing comments to be added to versions and previous versions to be examined.
Note |
|---|
|
Instances of a message can be generated from a schema and can also be validated by using the "Generate Instance" function in the Visual Studio .NET BizTalk Server 2004 Schema editor. This function is extremely useful when testing a newly created schema against a system to be integrated. The generation capability also allows you to start development when the schema of a message is known but you have not yet been provided with instance messages.
|
-
Example folder structure. The example folder structure described above typically looks like the following for a sample project:
C:\SysInteg2004\ReferencedBin\
C:\SysInteg2004\_Master_Solution\Shared\Keys\
C:\SysInteg2004\_Master_Solution\Shared\CrossRefData\
C:\SysInteg2004\_Master_Solution\Shared\TestHarnesses\
C:\SysInteg2004\_Master_Solution\Shared\SharedSchema\
C:\SysInteg2004\_Master_Solution\Shared\EmailSendOrchestration\
C:\SysInteg2004\_Master_Solution\Shared\ErrorHandlingOrchestration\
C:\SysInteg2004\_Master_Solution\AccountRequest\
C:\SysInteg2004\_Master_Solution\AccountRequest\bind\ C:\SysInteg2004\_Master_Solution\AccountRequest\msgs\
C:\SysInteg2004\_Master_Solution\AccountRequest\msgs\generated\
C:\SysInteg2004\_Master_Solution\AccountRequest\msgs\examples\
C:\SysInteg2004\_Master_Solution\AccountRequest\scripts\
C:\SysInteg2004\_Master_Solution\AccountRequest\AccReqRecPipe
C:\SysInteg2004\_Master_Solution\AccountRequest\AccReqRecPipeCode
This document assumes that the team developing the BizTalk Server 2004 solution consists of multiple developers who will be using Visual SourceSafe as their source control tool.
For step-by-step notes on creating a master solution for a partitioned single solution in Visual SourceSafe see "Appendix: Step-by-Step Guide to Setting Up a Partitioned Single Solution."
Solution Character Sets
There is a known limitation with Visual SourceSafe related to the handling of Unicode files. When working with BizTalk solutions it is necessary to prevent Visual SourceSafe from corrupting BizTalk Unicode files by performing the following steps before adding a BizTalk Server 2004 solution to Visual SourceSafe:
-
Start Visual SourceSafe 6.0 Admin.
-
Select the SourceSafe database to be used.
-
On the Tools menu, click Options.
-
Click the File Types tab.
-
Add the following to the end of the list of binary files. Verify there are semicolons between each file type.
*.btm;*.btp;*.xsd;*.odx
-
Click OK.
The preceding steps cause Visual SourceSafe not to inspect BizTalk files and attempt to change their formatting.
Note |
|---|
|
Files of the above type previously added to Visual SourceSafe will need to be deleted, including selecting the check box to destroy them permanently. Files then need to be re-added to Visual SourceSafe. Ensure that a backup of the files exists before carrying out this step.
|
Use Visual Studio .NET for Source Control Operations
All project creation and manipulation within Visual SourceSafe should be performed by using the integrated Visual SourceSafe support menus within Visual Studio .NET. Do not use Visual SourceSafe Explorer to perform these operations.
Note |
|---|
|
Even when using the Virtual PC approach to development, Visual SourceSafe should be used in exactly the same manner as in a traditional development environment.
|
When to Check In BizTalk Server 2004 Projects
The recommended approach to using Visual SourceSafe is to check in code only when it has successfully passed functional tests and the developer is confident that the code will successfully build without breaking any related code. Applying this model to BizTalk Server 2004 results in the following guidelines:
-
BizTalk Server 2004 projects that contain only message schema should not be checked in until the schema have been successfully tested against a variety of sample messages.
-
BizTalk Server 2004 projects that contain a business process should not be checked in until the solution has been successfully tested using the appropriate input and output messages using the correct send and receive ports.
-
ASP.NET Web service projects should not be checked in until the Web service code has been tested against the initiating system or by using a test harness.
If this model is followed, then the Visual SourceSafe repository will always hold a build that can be successfully built and tested. This principle is important if the approach of "nightly builds" is to be adhered to.
Checking In Intermediate Versions
An alternative approach to check-in is that of checking in "intermediate" versions. In this approach an intermediate version will not yet have successfully passed functional tests and can be thought of as "between builds." This is generally not a recommended approach because it breaks the general principle of always having a buildable version within the source control system. However some teams prefer this approach because it allows developers to use the source control system to check in and roll back versions without needing to fulfill the criteria needed to check in a formal build.
If the approach of checking in intermediate versions is required, then the source control can no longer be assumed to contain a "buildable" version. Instead it is required to distinguish between the intermediate versions and build versions. Using Visual SourceSafe this can be done in a variety of ways, either automatic or process based. For example:
-
Developers follow a process of notifying the build manager when a "buildable" version is added to Visual SourceSafe.
-
Developers check in a tested version, ready for building, into a "promoted area" within Visual SourceSafe. This promoted area is then used as the source upon which the master build is based.
-
Code or script can be written that uses the Visual SourceSafe COM interfaces. For example, a specific label can be used to denote code ready for a build and the script searches for this label and then "pins" this source into a separate Visual SourceSafe branch This branch is then used as the source for master builds.
Version Controlling Non-BizTalk Server Project Files
BizTalk Server uses additional files that can beneficially be versioned and stored in Visual SourceSafe. The following files are examples:
-
Binding files (both development and test)
-
Custom pipeline assemblies
-
Test data (for example, test messages)
-
Test harnesses (which may change over the project lifetime)
-
Build, deployment, and start-and-stop scripts that may need to be shared between development and build teams
If these files are related to a specific Visual Studio .NET BizTalk project then these files can be included within the BizTalk project and managed by using the Visual Studio .NET integrated source control functions. To include a file or folder into an existing Visual Studio .NET project, do the following:
-
In Solution Explorer, click Show All Files.
-
Select the folder or file to include in the solution.
-
Right-click the folder or file, and then select Include In Project.
The following figure shows the screen for including files in a project.
Figure 5 Including files in a project
If the non-BizTalk Server project files are not part of a Visual Studio .NET project, then you can manage them by using Visual SourceSafe Explorer.
Note |
|---|
|
Visual SourceSafe Explorer should NOT be used to manage any items that are part of a Visual Studio .NET project under source control.
|
Checking the Visual SourceSafe Database
When Visual SourceSafe databases are large, heavily used, or being accessed by many concurrent users, it is recommended to regularly run the "Analyze VSS DB" command from the Visual SourceSafe menu. If the analysis detects errors, then they can be fixed by using the "Analyze and Fix VSS DB" command. Both these commands need to lock the Visual SourceSafe database, and hence require everyone to be disconnected from Visual SourceSafe.
Creating an Example Solution Structure and Integrating with Visual SourceSafe
"Appendix: Step-by-Step Guide to Setting Up a Partitioned Single Solution" contains a step-by-step guide to creating a partitioned single solution structure using Visual Studio .NET and Visual SourceSafe that follows the guidance listed earlier. This step-by-step guide is intended as a working example and individual projects should modify the steps listed to meet their requirements.
Working with BizTalk Server and Assembly Version Numbers
When developing with the .NET Framework, versioning is governed by a standard set of rules that ensure that when a version number changes, the impact of that change is typically minimal. Due to certain design and implementation choices made during the development of BizTalk Server 2004, version numbers with BizTalk Server 2004 do not always follows the standard .NET Framework rules. The following sections describe these conditions.
Overview of .NET Versioning
When a BizTalk Server 2004 project is compiled, the resulting DLL is a .NET assembly and its behavior follows the standard .NET versioning behavior. If it occurs that multiple versions of the same assembly are installed with the same assembly version number, the system will produce unexpected results. For this reason it is important to ensure that BizTalk Server 2004 assembly versioning is planned and managed.
Each DLL containing a .NET assembly has two distinct ways of expressing version information. The following table shows the difference between the assembly version and the file version.
Table 10 DLL version numbers
|
Assembly version
|
File version
|
|---|
|
The assembly version number together with the assembly name and culture information is part of the assembly's identity. The assembly version number is used by the runtime to enforce version policy and plays a key part in the type resolution process at run time. This version number is physically represented as a four-part string with the following format:
<major version>.<minor version>.<build number>.<revision>
|
The file version is a string that is displayed by Microsoft Windows® Explorer. This number can be used to manually determine which version of a file is installed.
|
The following figure shows where these two version numbers can be viewed for a DLL.
Figure 6 DLL version numbers
Implications of Changing Version Numbers
In .NET development it is typical to update the assembly version number to the current build number when a build takes place. However when developing a BizTalk Server 2004 solution, changing the assembly version number can break the relationship between an assembly and the dependent items that reference the DLL by its assembly version number. The following table lists items that refer to a BizTalk Server 2004 assembly by using its version number and the effect of changing an assembly version number.
Table 11 Entities affected by assembly version number changes
|
Entity
|
Effect of changing assembly version number
|
|---|
|
Binding files
|
Changing the assembly version number causes any existing binding files that reference the assembly to fail. This is because the binding file references the assembly by attributes including its version number. To reuse existing files they will need to be modified or regenerated. Binding files are XML and so modification can be undertaken using tools like Visual Studio .NET, Microsoft Office Infopath®, or Notepad, or alternatively can be scripted or automated by using a tool.
See "Patching Binding Files" for more information about reusing existing binding files using tools.
See "BizTalk Server 2004 Deployment Toolkit" later in this document for examples of scripted binding file modification as part of a scripted build process.
|
|
BAM tracking profile definition file (.btt) files
|
Changing the assembly version number causes any existing BAM tracking profile definition file files to fail. The BAM tracking files are a binary file format so they cannot be edited and instead must be regenerated. If BAM tracking profiles are required it may be necessary to do either of the following:
-
Avoid frequently updating version numbers during the build process.
-
Delay building BAM tracking profiles until version numbers are stable.
|
|
Web services published by using the Web Services Publishing Wizard
|
When the Web Services Publishing Wizard is used to produce an ASP.NET Web interface, the assembly version of the BizTalk Server DLL is included in the ASP.NET source code. The assembly version number is used at runtime by the ASP.NET interface as part of the bodyTypeAssemblyQualifiedName property of the Web service operation. If the version number of the BizTalk Server assembly changes without updating the bodyTypeAssemblyQualifiedName property then subsequent Web service operations will be rejected by BizTalk Server.
If the receive location uses the xmldefaultpipeline the subscription relies on the document type and will use the embedded assembly information and fail if the assembly does not exist. If you use the passthrupipeline (which is the default if you expose a port and let the wizard create the receive location) it ignores this embedded assembly information.
|
Approaches to Incrementing BizTalk Server 2004 Assembly Version Numbers
During a project you have a choice between the following:
-
Choose a fixed assembly version for a given deliverable and increment only the file version number.
-
Increment both the assembly version and the file version as the development progresses.
The following table compares these two possible approaches to updating the version numbers.
Table 12 Comparing approaches to update version numbers
|
Increment the informational file version only and keep a fixed assembly version
|
Increment both the assembly version and the informational file version
|
|---|
|
Assembly version number = Fixed number
File version number = Build number
|
Assembly version number = Build number
File version number = Build number
|
|
BizTalk Server runtime may pick up wrong version of assembly if multiple assemblies installed
|
BizTalk Server always runs latest version of assembly, even if multiple assemblies installed
|
|
Only one version of solution can be deployed at any time
|
Can deploy different versions of the solution side by side (although other aspects of the solution may clash, for example, schema definitions)
|
|
BizTalk Host needs to be restarted to force the loading of updated assemblies
|
Forces BizTalk Server to load new assemblies
|
|
Less work to create a new deployment because files that reference the assembly version number (for example, binding files and tracking profiles) do not need to be edited
|
More work for deployment because files that reference the assembly version number need to be kept updated with new version
|
When to Change File and Assembly Versions
Creating a policy on when to increment a BizTalk Server 2004 assembly version number depends on several variables including build processes, testing processes, number of assemblies and binding files, and the type of build being delivered.
The following table compares shipping and non-shipping build types.
Table 13 Comparing build types
|
Build type: Non-shipping
|
Build type: Shipping
|
|---|
|
Non-shipping builds are builds that are not intended to ship to an end user. Non-shipping builds are the builds typically produced during the development and test cycle and are used only by the development and test teams. Non-shipping builds are typically unsupported.
|
Shipping builds are intended to ship to an end user and become deployed on the end user's systems. Shipping builds are supported.
|
Approach 1: Fix assembly versions for non-shipping builds
Following this approach, assembly versions are kept fixed and file version numbers are updated with each build, as shown in the following table.
Table 14 Build types for Approach 1
|
Build type: Non-shipping
|
Build type: Shipping
|
|---|
|
Increment the informational file version only and keep a fixed assembly version.
|
Increment both assembly version and informational file version.
|
Following this approach means that binding files do not need to change; however the following additional requirements should be noted:
-
Ensure that the file version is always modified to reflect the build number. If the file version is not modified then it will become much more difficult to distinguish between different assembly versions. Relying on other attributes like file size and date stamps is less accurate.
-
Note that previously deployed BizTalk Server 2004 assemblies will be overwritten by the next deployment, so parallel deployments of versions will not be possible.
-
Because the assembly version number is not changing, BizTalk Server 2004 will not detect that the assembly has changed and so it will be necessary to force the BizTalk Server 2004 runtime to load the new version into the host's memory. This can be achieved by stopping the BizTalk Server 2004 runtime. For more details on how to achieve this, see "Restarting BizTalk Server Hosts and Services."
-
It can be advantageous to have a process output its current build number as debug information. This ensures that when processes run, it is possible to confirm that all the build versions are as expected. See "Output Assembly Version to Aid Tracing, Debugging, or Exception Handling" for more details on how to view version number information at run time.
Approach 2: Increment assembly versions for non-shipping builds
Following this approach, assembly version numbers are incremented for every build, including non-shipping builds, as shown in the following table.
Table 15 Build types for Approach 2
|
Build type: Non-shipping
|
Build type: Shipping
|
|---|
|
Increment both assembly version and file version.
|
Increment both assembly version and file version.
|
This approach incurs the added effort of modifying the assembly build numbers and modifying the associated dependencies that use the build numbers (like binding files).
If the BizTalk Server 2004 development team follows the approach of incrementing assembly version numbers for every build, then there are several possible ways of automating the required changes in version numbers and binding files. These options are discussed in "Approaches to Incrementing BizTalk Server 2004 Assembly Version Numbers."
Which approach versioning should you use? For the majority of developments Approach 1 (fixed assembly versions for non-shipping builds) is typically suitable. It has the advantage of requiring fewer resources to test and as long as informational version numbers are kept updated, DLL conflict issues should be detectable and resolvable by using the informational version number.
Map Function Version Numbering
.NET assemblies can be invoked from within a map (using the scripting functoid, found under the advanced functoids palette), and this provides a great deal of flexibility for delivering custom map functionality. However it is important to understand that the internal representation of the map files references not only the assembly type name but the full assembly version number.
This is significant because it means that if the version number of the assembly called by the map changes, then any links that reference the assembly will break. In a complex map this can cause considerable rework.
To avoid this issue it is recommended that if assemblies are required to be called from a map, a specific assembly is created to hold only map functionality and the assembly version number of this assembly is fixed. In this way, other helper functions can have the assembly version updated without breaking the maps.
If an assembly referenced from a map is changed after map development then consider updating the map file outside of the Visual Studio .NET BizTalk Server 2004 Map Editor to reflect the updated version numbers.
To achieve this use the following steps:
-
Do not open the map by double-clicking it (because this will cause the links to break and incur rework).
-
Open the map by using the Visual Studio .NET XML editor: Right-click the map in Solution Explorer, click "Open with", and then choose "HTML/ XML editor".
-
After the instances of the "Map only" assembly reference number have been located in the XML structure they can be replaced with the updated version number by using "Replace" on the Edit menu.
-
The map can then be saved, closed, and opened by using the standard BizTalk Server 2004 map editor.
The version number of helper classes referenced by project references or file reference and used by orchestrations (for example, from within expressions) can be changed without encountering the issue described above.
After the completion of the information-gathering phase, described in the first section of this document, it is usual for the team to begin to produce design documents for the BizTalk Server 2004 orchestrations. These documents are typically then used to validate the proposed designs with system and process owners prior to commencing the development phase.
One of the primary benefits of the BizTalk Orchestration model is the great clarity you can achieve when a software implementation is pictorial. Regardless of how well a developer comments code, there is always a need to maintain a separate set of artifacts including process diagrams, Visio diagrams (with varying shape usage), prose documents, and whiteboard discussions that are used to convey what the code is actually doing. This is especially true when working with a business audience.
When working with a BizTalk Orchestration, the diagram is the implementation of a piece of functionality (at least at a specific level). This provides opportunities to use an orchestration diagram in several helpful ways within a project life cycle, as follows:
-
To capture an initial high-level design, using all the orchestration shapes as intended but without fully implemented maps and schemas. These designs are often called "skeleton orchestrations." All of the external system interactions, communication patterns, decision points, parallel vs. joined flows, and so on, can be represented at this point in a skeleton orchestration.
-
To gain consensus with the development team and business sponsor about the functionality. An efficient route to discussion can be to place the high-level skeleton orchestration designs on a wall with project stakeholders and then walk through the processes. The Orchestration Designer for Business Analysts provides another way to walk through the functionality. This tool 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. (See "Diagramming Business Processes" earlier in this document.)
-
To estimate the number of tasks required and the level of effort needed to develop the solution. The various messages and shapes in your initial orchestration can often provide a reasonably granular approach for time estimating. If the complexity of messages is taken into account it is possible to construct a draft project plan that includes orchestration entities. If this draft plan is tested early on in the project, the approach can be refined to provide a reliable model for estimation.
Skeleton Orchestration Design
One approach to developing BizTalk Server orchestration designs is to use Visual Studio .NET to produce "skeleton" projects. The skeleton projects provide a way of validating the assumptions about the number and type of messages and the operations taking place upon the messages to complete a process.
These skeleton projects exhibit the following attributes:
-
Projects should be divided up in accordance with the planned schema and process ownership.
-
Projects contain skeleton schema with correct schema names. These schema contain correctly named root nodes and correct target namespaces, but need not contain any further schema detail.
-
Projects contain skeleton maps that have a source and destination schema but need not have any links.
-
Orchestrations reference the appropriate skeleton schema.
-
Orchestrations contain messages and variables created from the skeleton schema. This can be useful to understand which orchestrations share messages.
-
Orchestrations contain the receive and send operations dictated by the design.
-
Orchestrations contain the process logic associated with the process, including send, receive, mapping, and logic operations.
-
Expression shapes contain comments that describe the functionality of the expression. The expression shapes also need to contain at least one valid line of expression to allow the skeleton solution to compile without errors (for example, System.Diagnostics.Debug.WriteLine("In expression 1");).
As the designs are progressed, the skeleton projects can be used as the starting point for the BizTalk Server 2004 development phase. To add documentation to a group of related workflow shapes, use a Group shape. Group shapes display as much text as you care to associate with the shape. Many of the other orchestration shapes can hold descriptions, and it can be useful to use this to express planned implementation detail.
To make best use of the BizTalk Server skeleton designs, it is helpful to use a documentation tool to export the skeleton design. See "Documenting BizTalk Server 2004 Systems" later in this document.
This section provides guidelines on naming projects, assemblies, orchestrations, messages, and other artifacts within BizTalk Server 2004.
XML Namespace Conventions
Prior to starting a BizTalk Server 2004 development it is good practice to ensure that a standard is created for new XML target namespaces. The actual standard is often less important than the uniformity it confers across the project. An example target namespace naming policy might be:
http://<organisationname>.com/namespaces/<system>/<operation>/<direction>
Where:
-
<organizationname> is the name of the organization as used in the organization's domain name
-
<system> is the business system that the message relates to
-
<operation> is the operation on the interface
-
<direction> is the direction of the message from the point of view of the system referred to by <system>
-
<direction> is typically "incoming" or "outgoing" for unidirectional messages
-
<direction> is typically "IncomingRequest", "OutgoingResponse", and so on, for bidirectional and synchronous systems
-
Optionally a year, date, or version number can be used as part of the message standard. However be aware that changing these will result in rework for the BizTalk Server developers because the maps and orchestrations will need to be updated to point to the "new" schemas. This can be a significant cost in a large solution.
BizTalk Artifact Namespaces
Many artifacts within a BizTalk solution have a standard .NET namespace associated with them. The MSDN paper "Standard guidance on .Net namespace naming" should be adhered to with BizTalk artifacts, namely:
CompanyName.TechnologyName.Feature
Note that these are Pascal-cased and nested namespaces will have dependencies on types in the containing namespace.
For more information about naming guidelines, see the Namespace Naming Guidelines article on the MSDN Web site at http://go.microsoft.com/FWLink/?LinkID=42405.
BizTalk Projects and Assemblies
BizTalk project names and assembly names should often match the name of the associated namespace, such as the following name:
CompanyName.projectName.Function.dll
A division into assemblies such as the following will often be quite suitable for a BizTalk project:
MyCompany.MyProject.OrderProcessingProcessOrch.dll
MyCompany.MyProject.InvoiceBatchProcess.dll
MyCompany.MyProject.SharedSchemas.dll
MyCompany.MyProject.Pipelines.dll
MyCompany.MyProject.PipelineAssemblys.dll
Orchestration Naming Conventions
When deployed, an orchestration "type name" is the name that is used and displayed by the BizTalk Server administration tools to refer to the orchestration. When creating a new orchestration, this property defaults to "orchestration_1". When creating a new orchestration, change this property to a descriptive name to help distinguish the orchestration.
Messaging Artifact Naming
All artifacts 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).
The following table shows an example messaging artifact naming convention.
Table 16 Example messaging artifact naming convention
|
Artifact
|
Standard
|
Notes and examples
|
|---|
|
Schema file
|
<RootNode>_<Standard>.xsd or
<DescriptiveName>_<Standard>
|
Standards include XML, X12, FlatFile (FF), and other custom formats.
If root node does not distinguish the schema, use descriptive name.
Example:
PurchaseOrderAcknowledge_FF.xsd or
FNMA100330_FF.xsd
|
|
Property Schema file
|
<PropSchema>_<Standard>.xsd
|
Should be named to reflect its common usage, across multiple schemas if appropriate. Prefixed with "Prop_" to help distinguish it from standard message schema.
Example:
Prop_PONumber_XML.xsd
|
|
Map file
|
<SourceSchema>_To_<DestinationSchema>.btm
|
If XSLT file is specified for map, XSLT file should be named identically with .xsl extension. If orchestration contains multiple instances of messages derived from the SourceSchema, use the message instance names instead.
Example:
PurchaseOrder_FF_To_PurchaseOrderAcknowledge
|
|
Orchestration file
|
A meaningful name that represents the underlying process.
|
Example:
EvaluateCredit.odx
|
|
Send/Receive Pipeline file
|
<AppName>_Rcv_<SchemaName> or
<AppName>_Rcv_<Function>
<AppName>_Snd_<SchemaName> or
<AppName>_Snd_<Function>
|
A pipeline might be used to ensure reception of particular schema(s), or to perform some other function. "AppName" prefix (corresponding to name of the application deploying to BizTalk) helps when many applications are deployed to the same BizTalk installation.
Example:
ERP_Rcv_ PurchaseOrderAcknowledge_FF
ERP_Rcv_CatalogUnzip
|
|
Receive ports
|
<AppName>_<InputSchema>_To_<OutputSchema>
or
<AppName>_<FunctionalDescription>
|
"AppName" prefix (corresponding to name of the application deploying to BizTalk) helps when many applications are deployed to the same BizTalk installation.
Use functional description if the input schema (and potentially output schema, if request/response) do not adequately describe the port.
(No need to add Snd/Rcv/Port, etc. since they are grouped accordingly in admin tools.)
Examples:
ERP_PurchaseOrder_XML_To_POAck_XML
(for request/response port)
ERP_PurchaseOrder_XML
(for one-way port)
ERP_CheckOrderStatus
|
|
Receive locations
|
<AppName>_<ReceivePortName>_<Transport>
|
Example:
ERP_CheckOrderStatus_MSMQT
|
|
Send port groups
|
<AppName>_<FunctionalDescription>
|
Example:
CRM_CustomerUpdateNotification
|
|
Send ports
|
<AppName>_<Schema>_<Transport>
or
<AppName>_<FuncDescription>_<DestApp>_
<Transport>
|
In some cases, the schema being sent is descriptive enough. In others, a functional description of the action to be taken by a destination application is better suited.
Example:
CRM_CustomerUpdate_ERP_MSMQT
|
|
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.
|
Example:
|
Note that the .NET type name of the artifacts listed above should match (without the file extension) the file name. The .NET namespace will likely match the assembly name.
Orchestration Shape Naming
Establishing and following naming conventions are good practices for designating variables, messages, multipart types, and so on, but they become even more important for the workflow shapes contained within an orchestration. 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.
Note |
|---|
|
To add documentation to a group of related workflow shapes, use a Group shape. Group shapes display as much text as you care to associate with them, and can add quite a bit of documentation value to the diagram. However, if you intend to instrument the application by using BAM, be aware that a Group shape does not exist at run time and as such cannot be part of a BAM tracking profile. If this is the case, you could use a non-transactional scope shape instead.
|
The following table shows an example orchestration shape naming convention.
Table 17 Example orchestration shape naming convention
|
Shape
|
Standard
|
Notes and examples
|
|---|
|
Scope
|
Scope_<DescriptionOfContainedWork> or
Scope_<DescOfcontainedWork>_<TxType>
|
Including brief information about transaction type may be appropriate. Example:
Scope_CreditServiceCall
|
|
Receive
|
Rcv_<MessageName>
|
Typically, MessageName will be the same (though Pascal-cased) as the name of the message variable that is being received "into" (though the message variable will be camel-cased).
Example:
Rcv_RawCreditReport
|
|
Send
|
Snd_<MessageName>
|
Typically, MessageName will be the same (though Pascal-cased) as the name of the message variable that is being sent (though the message variable will be camel-cased).
Example:
Snd_POAcknowledge
|
|
Expression
|
<DescriptionOfEffect>
|
Expression shapes should be named with Pascal convention (no prefix) to simply describe the net effect of the expression, similar to naming a method.
Example:
GetFindingsReport
|
|
Decide
|
Decide_<DescriptionOfDecision>
|
Decide shapes should be prefixed with "Decide_" followed by a full description of what will be decided in the "if" branch.
Example:
Decide_ApprovalRequired
|
|
If-Branch
|
If_<DescriptionOfDecision>
|
If-branch shapes should be prefixed with "If_" followed by a (perhaps abbreviated) description of what is being decided.
Example:
If_ApprovalRequired
|
|
Else-Branch
|
Else
|
Else-branch shapes should always be named "Else".
Example:
Else
|
|
Construct Message (Assign)
|
Assign_<Message> (for Construct)
<ExpressionDescription> (for expression)
|
If a Construct Message shape contains a message assignment, it should be prefixed with "Assign_" followed by an abbreviated name of the message being assigned.
The actual message assignment shape contained should be named to describe the expression that is contained.
Example:
Assign_PaymentVoucher
which contains expression:
CopyPaymentDetails
|
|
Construct Message (Transform)
|
Xform_<SourceSchema>To<DestSchema> (for Construct)
X_<SourceSchema>To<DestSchema>
(for expression)
|
If a Construct Message shape contains a message transform, it should be prefixed with "Xform_" followed by an abbreviated description of the transform (that is, source schema to destination schema).
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").
Example:
Xform_LoanRequestToCreditRequest
which contains transform shape:
X_LoanRequestToCreditRequest
|
|
Construct Message
(containing multiple shapes)
|
N/A
|
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/Start Orchestration
|
Call_<OrchestrationName>
Start_<OrchestrationName>
|
N/A
|
|
Throw
|
Throw_<ExceptionType>
|
The corresponding variable name for the exception type should (often) be the same name as the exception type, only camel-cased.
Example:
Throw_RuleException, which references the "ruleException" variable.
|
|
Parallel
|
Parallel_<DescriptionOfParallelWork>
|
Parallel shapes should be named "Parallel_" followed by a description of what work will be done in parallel.
Example:
Parallel_CreditVendorCalls
|
|
Delay
|
Delay_<DescriptionOfWhatWaitingFor>
|
Delay shapes should be named "Delay_" followed by an abbreviated description of what is being waited for.
Example:
Delay_POAcknowledgeTimeout
|
|
Listen
|
Listen_<DescriptionOfOutcomes>
|
Listen shapes should be named "Listen_" followed by an abbreviated description that captures (to the degree possible) all the branches of the Listen shape.
Example:
Listen_POAckOrTimeout Listen_FirstShippingBid
|
|
Loop
|
Loop_<ExitCondition>
|
Loop shapes should be named "Loop_" followed by an abbreviated description of what the exit condition is.
Example:
Loop_AllMsgsSent
|
|
Role Link
|
N/A
|
See "Roles" in Table 16 above.
|
|
Suspend
|
Suspend_<ReasonDescription>
|
Describe what action an administrator must take to resume the orchestration. More detail can be passed to error property, and should include what should be done by the administrator before resuming the orchestration.
Example:
Suspend_ReEstablishCreditLink
|
|
Terminate
|
Terminate_<ReasonDescription>
|
Describe why the orchestration terminated. More detail can be passed to error property.
Example:
Terminate_TimeoutsExpired
|
|
Call Rules
|
CallRules_<PolicyName>
|
The policy name may need to be abbreviated.
Example:
CallRules_CreditApproval
|
|
Compensate
|
Compensate
or
Compensate_<TxName>
|
If the shape compensates nested transactions, names should be suffixed with the name of the nested transaction. Otherwise it should simply be Compensate.
Example:
Compensate_TransferFunds
or
Comp_TransferFunds
|
For documentation purposes, we recommend that developers add descriptive text to the shapes' description property. Third party BizTalk documenter tools (see "Documenting BizTalk Server 2004 Systems" below, can generate Microsoft Word documents or a compiled help file that contain these shape descriptions. These documents are used as the basis of system documentation.
Orchestration Type Naming
The following table shows an example orchestration type naming convention.
Table 18 Example orchestration type naming
|
Shape
|
Standard
|
Notes and Examples
|
|---|
|
Multi-Part Message Types
|
<LogicalDocumentType>
|
Multi-part types encapsulate multiple parts. The WSDL specification indicates "parts are a flexible mechanism for describing the logical abstract content of a message." The name of the multi-part type should correspond to the "logical" document type, that is, what the sum of the parts describes.
Example:
(which might encapsulate an invoice acknowledgment and a payment voucher)
|
|
Multi-Part Message Parts
|
<SchemaNameOfPart>
|
Should be named simply for the schema (or simple type) associated with the part.
Example:
|
|
Messages
|
camelCased
|
See "Message Instance Naming" below.
|
|
Variables
|
camelCased
|
Example:
|
|
Port Types
|
<function>
|
Should be named to suggest the nature of an endpoint with Pascal casing. If the orchestration is exposed as a Web service, the port name is exposed in the generated WSDL. For this reason these names are not suffixed with "PortType" to avoid the "PortType" being visible to external interface.
If there will be more than one Port for a Port Type, the Port Type should be named according to the abstract service supplied.
Example:
ProcessPurchaseOrderPortType
which might have operations such as
|
|
Ports
|
<function>Port
|
Should be named to suggest a grouping of functionality, with Pascal casing and suffixed with "Port." Typically, the port name should reflect the likely name of the physical port created in the binding files. This will aid configuration.
Example:
|
|
Correlation types
|
pascalCased
|
Should be named with Pascal-case convention, based on the logical name of what is being used to correlate.
Example:
|
|
Correlation sets
|
camelCased
|
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.
Example:
|
|
Orchestration parameters
|
camelCased
|
Should be named with camel-case convention, and match the caller's names for the corresponding variables where appropriate.
|
Message Instance Naming
When naming messages within orchestrations, you should use a standard naming convention to avoid the confusion that can arise when messages are traveling between multiple systems in both directions.
Consider naming messages from the point of view of the integration layer (that is, incoming means incoming to the integration layer, outgoing means leaving the integration layer). It may help to include underscores (_) in the names.
The following table shows an example message naming convention.
Table 19 Example message naming convention
|
Message name
|
Usage
|
|---|
<SystemName><OperationName>Incoming
|
To describe a message received from an asynchronous system by the integration layer
|
<SystemName><OperationName>Outgoing
|
To describe a message being sent to an asynchronous system by the integration layer
|
<SystemName><OperationName>OutRequest
|
To describe the outgoing request message sent to a synchronous system by the integration layer
|
<SystemName><OperationName>OutResponse
|
To describe the associated response incoming message received from a synchronous system by the integration layer
|
<SystemName><OperationName>InRequest
|
To describe the incoming request message received from a synchronous system by the integration layer
|
<SystemName><OperationName>InResponse
|
To describe the associated response outgoing message sent to a synchronous system by the integration layer
|
If the messages being described are traveling between multiple possible systems, then a naming convention based upon system names may not be meaningful. An alternative approach is to name the messages after their schema, with a description of the message usage in the orchestration, for example:
CRMCustomerUpdate_validate_Incoming
CRMCustomerUpdate_newAddress_Outgoing
The configuration of a deployed BizTalk Server 2004 system is stored within the configuration database of the BizTalk Server 2004 group. Tools have been written to query the Configuration database and produce formatted output that lists the configuration information to help you document BizTalk Server 2004 systems.
These tools can be useful for:
-
Documenting a skeleton design early in the design process
-
Producing complete system documentation
-
Validating a newly deployed system against an expected system configuration
You can find a BizTalk Server 2004 reporting tool that generates a compiled help file detailing the BizTalk Server configuration. For more information, see Configuration Management Power Toys at the BizTalk ChalkTalk Web blog at http://go.microsoft.com/fwlink/?LinkId=43658.
This tool creates compiled help (.chm) and Word 2003 XML files to quickly document the many artifacts (hosts, ports, orchestration diagrams, schemas, maps, pipelines, adapters, rule engine vocabularies and policies, and more) and their dependencies within a BizTalk Server 2004 environment.
Note |
|---|
|
This tool may be moved to MSDN in the future, so if the link above is not available, search MSDN for "BizTalk 2004 Documenter."
|
By the nature of integration development, testing BizTalk Server 2004 solutions involves exchanging data with other systems. To functionally test BizTalk Server 2004 processes, you must obtain suitable test data and have access to the appropriate method of interacting with this data. In some cases you can interact with the actual systems that the integration layer requires to exchange data with during the development stage. In many cases, however, this will not be possible. In this scenario it is typical to use test harnesses and test stubs to allow development to proceed in the absence of the actual systems.
Test Data
Test data is a very significant resource when developing an integration solution. Without valid test data you often cannot test a business process fully. When planning an integration development, you must ensure that the project includes sufficient resources and time to obtain valid data to allow testing. This is particularly true when the test data needs to be produced from systems that have never previously been integrated.
If existing data flows already exist it can be extremely beneficial to the design and testing of the integration solution if example messages are captured for all existing business operations.
Test Harnesses and Test Stubs
For integration environments, test harnesses and test stubs can be defined as the following:
-
Test harness. Code or utilities used to allow the testing of an integration process. Typically a test harness is used to submit data to the integration layer to initiate a process.
-
Test stub. Code or utilities used to simulate a system that is not available, but from which a response is required to allow the testing of a process. Typically a test stub is used to accept data as if it was the unavailable system and respond with the appropriate response, thereby allowing the process to continue despite the absence of a system.
Example test harnesses include:
-
A Visual Studio .NET project simulating an unavailable system by making a Web service request into the integration layer using the WSDL "contract" file that describes the final SOAP calls between the system and the integration layer.
-
An ASP.NET application simulating an unavailable system by performing an HTTP POST to the integration layer, passing a sample message and displaying the responding XML output and HTTP response code.
-
Custom code that uses the System.Xml.XmlDocument classes to produce a specified number of test input XML files with varying values and sizes to allow the volume testing of a batch business process.
Example test stubs include:
-
A Visual Studio .NET project that simulates an unavailable system by accepting incoming Web service requests from the integration layer and returning a response. The project will potentially use some simple logic to vary the response values for testing purposes. The Web services WSDL may be provided from a system that already exists or that is to be built using the WSDL as the agreed interface.
-
An ASP.NET application that accepts HTTP POSTS from the integration layer and returns one of several possible XML messages based upon some simple logic.
It is generally recommended that test harnesses and test stubs are developed early in the project because they are a useful resource and they also help develop a deeper understanding of the actual interactions between the integration layer and the other systems.
For more information about example test stubs and harnesses, see "Useful Development Tools" later in this document.