Configuration

Prev Next

The basics

To set up the Nexus Value Translator you configure it with your concepts, contexts, etc. This is currently done with SQL scripts.

Dynamic data sets (identities)

For identities you just need to define the concept and the different contexts. The rest is done in run-time.

Here is an example on how to set up a concept for the identity of a product. In the example, there are two systems involved; Agresso and a Product Information Management System (PIMS). The latter has two identities for each product; an internal id and an official code; SKU. The internal id can both contain upper case and lower case characters, while the SKU and the agresso ID is not case sensitive.

DECLARE @conceptId UNIQUEIDENTIFIER
DECLARE @contextId UNIQUEIDENTIFIER

-- Create the concept "product.id"
EXEC CreateOrGetEnumConcept 'product.id', @conceptId OUTPUT

-- Create the context "pims.internal-id (case sensitive)
EXEC CreateOrGetContext @conceptId, 'pims.internal-id', 1, @contextId OUTPUT -- 1 = Case sensitive
-- Create the context "pims.sku"
EXEC CreateOrGetContext @conceptId, 'pims.sku', 0, @contextId OUTPUT -- 0 = Not case sensitive
-- Create the context "agresso"
EXEC CreateOrGetContext @conceptId, 'agresso', 0, @contextId OUTPUT -- 0 = Not case sensitive

Static data sets (enumerations)

For enumerations you need to associate the values in the different value sets. That is, you create a form for each new unique value and creates an instance that is associated with that form for each context where the value is represented.

Here is an example on how to set up a concept that is an enumeration of currency codes:

DECLARE @conceptId UNIQUEIDENTIFIER
DECLARE @formId UNIQUEIDENTIFIER
DECLARE @iso4217ContextId UNIQUEIDENTIFIER
DECLARE @agressoContextId UNIQUEIDENTIFIER

-- Create the concept "currency.code"
EXEC CreateOrGetEnumConcept 'currency.code', @conceptId OUTPUT

-- Create the context "iso-4217" (case sensitive)
EXEC CreateOrGetContext @conceptId, 'iso-4217', 1, @iso4217ContextId OUTPUT -- 1 = Case sensitive
-- Create the context "agresso"
EXEC CreateOrGetContext @conceptId, 'agresso', 0, @agressoContextId OUTPUT

-- Associate values
EXEC CreateOrGetForm @conceptId, 'Swedish krona', @formId OUTPUT
EXEC CreateOrUpdateInstance @iso4217ContextId, @formId, 'SEK'
EXEC CreateOrUpdateInstance @agressoContextId, @formId, '27'

EXEC CreateOrGetForm @conceptId, 'Pound sterling', @formId OUTPUT
EXEC CreateOrUpdateInstance @iso4217ContextId, @formId, 'GBP'
EXEC CreateOrUpdateInstance @agressoContextId, @formId, '12'

EXEC CreateOrGetForm @conceptId, 'United States Dollar', @formId OUTPUT
EXEC CreateOrUpdateInstance @iso4217ContextId, @formId, 'USD'
EXEC CreateOrUpdateInstance @agressoContextId, @formId, '1'