????This description is based on development with Visual Studio as tool which is also what we recommend?????
Anchor | ||||
---|---|---|---|---|
|
How to install the Visual Studio 2019 enterprise integration extension
...
5 Click “Close” in the appearing window:
...
Anchor | ||||
---|---|---|---|---|
|
This example shows how to create a local Integration Account project i.e., without using a code-repository such as Azure DevOps.
...
You could name the Solution/Project “MySampleEnterpriseIntegration”
Anchor | ||||
---|---|---|---|---|
|
Create an XSD file by right clicking the projectname and choose Add -> New Item
...
Open the MySecondSchema.xsd file in Visual Studio and create a simple schema of your own choice, or use the schema below and save your file
...
Anchor | ||||
---|---|---|---|---|
|
If you want to create mappings between fields in XSD files, then you must create a map file in the project.
...
The map file is now added to your project
...
Anchor | ||||
---|---|---|---|---|
|
If you want to map fields using the visual mapper (.btm), then you must open the file in Visual Studio
...
C:\Users\[user]\source\repos\MySampleEnterpriseIntegration\bin\Debug
...
Anchor | ||||
---|---|---|---|---|
|
Getting the XSLT is just a matter of right clicking the project name and choose “Build”
...
C:\Users\[user]\source\repos\MySampleEnterpriseIntegration\bin\Debug
...
Anchor | ||||
---|---|---|---|---|
|
You will not find XSD files in the same location as the XSLT file that gets generated via Build.
...
C:\Users\[user]\source\repos\MySampleEnterpriseIntegration
...
Anchor | ||||
---|---|---|---|---|
|
When you right click a .xsd file in the Visual Studio project, then you get three options of interest, but we will only focus on one option now.
...
Change those default values into values of your own choice and save the file
Anchor | ||||
---|---|---|---|---|
|
To test your visual map by providing an input file, follow these steps:
...
To locate the generated output file, you must look in the “Output” window.
Look for the location specified right after this sentence “The output is stored in the following file: <your file location is here>”
Open that file in your desired texteditor. You should see something like this.
...
Anchor | ||||
---|---|---|---|---|
|
If you want to use Functoids in your visual map, then follow these steps:
...
If you inspect the generated XSLT file, you will see that required namespaces have automatically been added and that the Functoid code has become inline C# code:
Anchor | ||||
---|---|---|---|---|
|
If you do not want to work with visual maps, then you can apply the method explained below.
...
When working solely with the XSLT file, then you can add the file(s) to the project and not have to use Build to get a new version of the XSLT, as you would when only working with the visual mapper.
Anchor | ||||
---|---|---|---|---|
|
If you have chosen not to use the visual mapper, and only work directly with XSLT, then you still have the option to use inline C# to build custom logic.
...
Ignore the error message. It has no functional influence when you right click your .btm file and select “Test map”. An output will get generated and the return value from the method call will be inserted in the generated file.
...
Anchor | ||||
---|---|---|---|---|
|
To set up a custom functoid you must place the functoid .dll file in this location (Visual Studio 2019 Community), if not done so already in the environment you work in. If you need to set it up yourself, then you must get hold of the required .dll file from Bizbrains.
...
Now try and drag and drop “DistributionObjectName” into the map canvas and drag a connection from it to a target element.
Right click your project of type “Integration Account” and choose Build/Rebuild.
Go to the bin/Debug folder and verify that an XSLT file has been created. Try opening the file in e.g., Notepad++
The XSLT file contains code that is inserted by the custom functoid. That code will be executed in a runtime scenario, where data from Link will be retrieved and inserted as part of the actual data transformation.
<xsl:variablename="var:v1"select="ScriptNS0:GetDocumentDistributionObjectName()" />
Anchor | ||||
---|---|---|---|---|
|
There are a couple of activities associated with unit testing an XSLT, and below we will describe the necessary steps to set it up.
At a glance, you must download and install a special Visual Studio project that Bizbrains has prepared. Next, you must install a Nuget package which will make it possible to communicate with Link’s Rest API.
Anchor | ||||
---|---|---|---|---|
|
Local testing is possible without setting up a unit test project. I.e., you can test a mapping that does not query data from Link using Test Map facility, which we will not describe here.
...
it is expected that you have created an integration account project and want to add a unit test project to the solution.
Anchor | ||||
---|---|---|---|---|
|
Download the Visual Studio project template below. At the moment of writing, you can download the project template as a .zip package from this location: /wiki/spaces/PT/pages/2386493483
Follow the instructions from the same Wiki page.
Do not proceed if you are not able to see the installed project template in Visual Studio.
Now you must right-click your solution (.sln) in the Visual Studio Solution Explorer and choose Add > New Project…
Search for “Bizbrains” or scroll to the bottom to locate this project template:
...
Open Tools > Options and search for ‘just’ in the Search Options field.
Ensure that this checkbox is not checked
...
Anchor | ||||
---|---|---|---|---|
|
Assumption: you have created a unit test project based on the Bizbrains Visual Studio project template.
...
Assert.AreEqual(xmlOutput.SelectSingleNode("//SomeXpath/someElement").InnerText, "Testing123");