Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

ServiceConfiguration with more than one service

SOLVED
Go to solution
Highlighted
Tim Black
Regular Collector

ServiceConfiguration with more than one service

Hi,

I'm trying to load a lot of relations between CI and Services where a CI has more than one Service and a Service as more than one CI and when I use ServiceConfiguration on dataexchange it only relates de CI with one of the services on the excel file and not to all and returns an error on the log that one or more were found.

Do I have to load it any other way because there is more than one service per ci and vice versa ?

Thanks
16 REPLIES
Robert S. Falko
Honored Contributor

Re: ServiceConfiguration with more than one service

Tim,

You may wish to post your .ini file, to help diagnosis the situation.

-Josh
Tim Black
Regular Collector

Re: ServiceConfiguration with more than one service

Sorry about that :)

[DSN]
NAME=CATALOG
USR=
PWD=

[SYSTEM]
LOG=TRUE
XML=TRUE
LOG_FILE=CATALOG.log
XML_OUTPUT_FILE=CATALOG.xml
APPLICATION_NAME=CATALOG

[CLASSES]
NAME=CATALOG

[CATALOG]
SOURCE=CATALOG
ATT=[CI],[SERVICE]
COLUMNS=[CI],[SERVICE]
LOADTABLE=TRUE


I'm mapping CI to Configuration Item with reference to searchcode and Service to Service.

It's loading the data and accepting the values but only one line per CI...
Robert S. Falko
Honored Contributor

Re: ServiceConfiguration with more than one service

Tim,

In your import mapping, is it possible that you are key binding in such a way that whenever a new CI/Service combination is encountered, it overwrites the previous combination for the same CI?

-Josh
Tim Black
Regular Collector

Re: ServiceConfiguration with more than one service

Probably because it's keeping the last entry, so overwriting is for sure what it's doing is overwrite, but what do you mean by key binding ? and most important, how can I not do it ? :)

Robert S. Falko
Honored Contributor

Re: ServiceConfiguration with more than one service

Tim,

In the mapping dialogue, there is checkbox in the lower left for key binding. It means that the current field is used to determine if you will overwrite an existing item, or if you will create a new item, when you do the import.

-Josh
Tim Black
Regular Collector

Re: ServiceConfiguration with more than one service

Sorry but it was a language misunderstanding as my Service Desk is not using English and I wasn't relating it to key binding. Anyway, I have CI and Service mapped, since it forces me to have a key selected how can I work around it and let it load more than one service for one CI ?
Tim Black
Regular Collector

Re: ServiceConfiguration with more than one service

The question that I should have started with is , how to do a 1 to n relation. Where 1 configuration item has more than one Service.

The way I did it as I said overwrites each time ending up only with one Service related to the configuration item.
Robert S. Falko
Honored Contributor

Re: ServiceConfiguration with more than one service

Tim,

You may have an n:n relationship between CIs and Business services, but only a 1:n relation between CIs and either operational services or underpinning services.

-Josh
Tim Black
Regular Collector

Re: ServiceConfiguration with more than one service

That's actually right, it's an n to n relation and after following the Data Exchange documentation I thought it would go ok but still getting errors after the mapping.

Attached is the ini file
Tim Black
Regular Collector

Re: ServiceConfiguration with more than one service

That's actually right, it's an n to n relation and after following the Data Exchange documentation I thought it would go ok but still getting errors after the mapping.

Attached is the ini file.

The xml is generated well but the field ParentId is always empty, should this be like this ?

I am then mapping two different class

Default template

CI_ID --> SearchCode

Default template

CI_ID --> UsedCIs;Configuration Item
Parent --> Name



Tim Black
Regular Collector

Re: ServiceConfiguration with more than one service

Correction :

I am then mapping two different class

Default template

CI --> SearchCode

Default template

SER_ID --> UsedCIs;Configuration Item
Parent --> Name
Robert S. Falko
Honored Contributor

Re: ServiceConfiguration with more than one service

Tim,

I have been able to reproduce your problem, as follows:

In my XML source file I have two fields:
CI
SERVICE

In my import mapping, I map SERVICE to the Service Title and CI to the CI Search code. Only the CI is used as unique key.

Result: a relation is created between the CI and only one service.

If you configure both CI and SERVICE as unique keys, then all relations are correctly imported.

-Josh.
Tim Black
Regular Collector

Re: ServiceConfiguration with more than one service

In the import mapping what class are you using ? ServiceConfiguration ? It just isn't working here...:/
Tim Black
Regular Collector

Re: ServiceConfiguration with more than one service

Ok, i debug the import mapping and got this error on the log after importing Service as a primary key :

Error converting data type nvarchar to numeric
Robert S. Falko
Honored Contributor
Solution

Re: ServiceConfiguration with more than one service

Tim,

Please find the details of a configuration that works on the annexed file.

I hope this helps.

-Josh
Tim Black
Regular Collector

Re: ServiceConfiguration with more than one service

It's all good now, problem was the lack of reference.

Sorry for the beginners ignorance on data exchange and 10 points for your patience :)

Cheers
//Add this to "OnDomLoad" event