Skip to main content
Transco component component icon — Property promotion & transformation

Transco component

Property promotion & transformation

motivation

Integration scenarios often need to 'promote' or 'enrich' messages/data from either internal or external data sources. Codit is a long-term implementer of something called 'Transco', which was originally a Microsoft BizTalk component. Now, modern Azure Logic Apps integration benefits from this behavior.

Invictus provides a Transco component to promote properties from a SQL database or to transform XML content via XSLT transformations. The component can also promote values to the context of the response.

Component usage

The Transco component has endpoints available for XML or JSON content. Given a stored Transco configuration file, the component promotes values from a client's SQL database or transforms XML content via a stored XSLT file.

TranscoProperty Promotion & TransformationXML or JSONSQL PromotePromote via client's databaseClient's DB + Azure Blob StorageEnrichedXMLXSLT TransformTransform via XSLTAzure Blob StorageTransformedParametersBasic PromotePromote to contextContext
POST/api/TranscoXML or /api/TranscoJsonSimulated

Promotes values from a SQL database or transforms XML content via a stored XSLT file, based on a stored Transco configuration file.

{
"content": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTE2Ij8+PHJvb3Q+PG5hbWUgc3RhdHVzPSJNZW1iZXIiPkpvaG4gRG9lPC9uYW1lPjwvcm9vdD4=",
"transcoConfig": "docs_config.json",
"context": {
"customerActive": true
}
}
  • contentstringrequired

    The input XML or JSON content as a Base64-encoded string.

  • transcoConfigstringrequired

    The filename of the Transco configuration file, stored in the internal blob storage container (for example docs_config.json).

  • contextobject

    The dictionary providing context to the conversion, gets copied 1:1 to the response.

The Transco component successfully promoted values or transformed the content.

{
"content": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTE2Ij8+PE1lbWJlcj5Kb2huIERvZTwvTWVtYmVyPg==",
"transcoConfig": "docs_config.json",
"context": {
"customerActive": true
}
}

Transco configuration file

The component requires a JSON Transco configuration file to describe the instructions to perform. Execution of instructions happens in the order in which they appear. Store the configuration file in the Azure Storage Account in the Transcov2configstore container, in the /Configs folder.

Full Transco config file specification
{
"instructions": [
{
"scopePath": "[XPath/JPath of content scope]",
"namespaces": [
{
"namespace": "[XML Namespace]",
"prefix": "[XML Namespace prefix]"
}
],
"command": {
"databaseConnectionString":"[Raw connection string to DB]",
"databaseKeyVaultName": "[Name of DB connection string secret in Key Vault]",
"commandValue": "[SQL query to be executed]",
"isMandatory": "[If true, will throw error when result is null]",
"columnName": "[Obtain value from specified column if query returns more than one field. If empty, use value from first column]",
"defaultValue": "[Default value of result]",
"parameters": [
{
"paramName": "[Name of param in query]",
"value": "[Type dependent. XPath or JPath if valueType = 'path']",
"type": "[SQL DB type. See: https://learn.microsoft.com/en-us/dotnet/api/system.data.sqldbtype]",
"valueType": "['path' or 'fixedValue' or 'context']"
},
{
"paramName": "[Name of param in query]",
"value": "[Type dependent. Any string value if valueType = 'fixedValue']",
"type": "[SQL DB type. See: https://learn.microsoft.com/en-us/dotnet/api/system.data.sqldbtype]",
"valueType": "['path' or 'fixedValue' or 'context']"
}
],
"destination": "[XPath/JPath of the results destination, or Context key if 'promoteToContext=true']",
"promoteToContext": "[If true, the component saves the SQL query result to Context with 'destination' as key]",
"cache": {
"useCaching": "[If true, caches the SQL query result]",
"cachingTimeout": "[Cache timeout time span]"
}
}
},
{
"xsltTransform": "[Name of XSLT file]",
"extensions": [
{
"namespace": "[Assembly namespace]",
"assemblyName": "[Assembly name]",
"className": "[Assembly class name]",
"dependencies": [
"[DLL dependency file name]",
"[DLL dependency file name]"
]
}
]
}
],
"options": {
"configCache": {
"useCaching": "[If true, config file is cached]",
"cachingTimeout": "[Cache timeout time span]"
},
"indentResult": "[If true, Transco results will be formatted and indented]"
}
}

Use arrow keys to navigate rows. Press Enter or Space to expand a row with sub-properties. Press / to focus the search field.

Press / to filter