The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Linking EC's with WO without knowing the ID number of the WO

Highlighted
madriss
Occasional Contributor

Linking EC's with WO without knowing the ID number of the WO

Good morning.
We need your help to do the following:
We wont to open everyday change automatically, which will have two work orders. We performed this task as follows:
1. Prepare a template for change that includes the two work orders with templates.
2. Using sd_event for automatic opening.
The problem is that we can't associate the EC's to the work orders,
they are many and we are going to receive from another system: host file format. Txt
is going to have only the EC's and we do not know what ID of WO we must associate those EC's.
you have any ideas to make this.
Thanks
6 REPLIES
madriss
Occasional Contributor

Re: Linking EC's with WO without knowing the ID number of the WO

Someone can answering please.
madriss
Occasional Contributor

Re: Linking EC's with WO without knowing the ID number of the WO

Please we need your help on this topic
madriss
Occasional Contributor

Re: Linking EC's with WO without knowing the ID number of the WO

Good morning.
We need your help to do the following:
We wont to open everyday change automatically, which will have two work orders. We performed this task as follows:
1. Prepare a template for change that includes the two work orders with templates.
2. Using sd_event for automatic opening.
The problem is that we can't associate the EC's to the work orders,
they are many and we are going to receive from another system: host file format. Txt
is going to have only the EC's and we do not know what ID of WO we must associate those EC's.
you have any ideas to make this.
Thanks
The Pike
Honored Contributor

Re: Linking EC's with WO without knowing the ID number of the WO

Assuming by EC's you mean Configuration Items, what you ask about is simply not possible in 1 single run of sd_event.

When using sd_event you are required to use a mapping. Evidently, the mapping needs an ID to establish a relationship.

I would worry about creating the Change and Work Orders first and then relating those to the corresponding CI's via a second run of sd_event. Of course, you need to somehow extract the Work Order IDs, so a lot of scripting is in order.

Points are welcome.

The Pike
madriss
Occasional Contributor

Re: Linking EC's with WO without knowing the ID number of the WO

Thank you very much for your reply. We developed the solution with sd_event and sd_import. So to creat new change we have in the mapping the description as a key consisting of a text and the date.

1- New change.

sd_event - f file1.ini -v
description_change="blablabla dd1/mm/yyyy"

in the file1 ini.

[SD_EVENT]

LOGFILE=xxxx.log
ERROR_LOGFILE=xxx_error.log
ACCOUNT=****/*****
SERVER=**.**.**
PORT=30980
MAPPING=****
CLASSNAME=new_change
MODUS=insert

2- Link WO to CH

In the mapping we have 2 keys, the description of WO and Change, consisting of a text and the date.

sd_event - f file2.ini -v description_change="blablabla dd1/mm/yyyy" description_wo="blablabla dd1/mm/yyyy"

in file2.ini

[SD_EVENT]
LOGFILE=xxxx.log
ERROR_LOGFILE=xxx_ERROR.log
ACCOUNT=*****/****
SERVER=**.**.***
PORT=30980
MAPPING=*****
CLASSNAME=WO_CH
MODUS=insert


3- Link CI or EC to the wo.

In the mapping we have 2 keys, the description of WO and searchcode of ci.

sd_event -f file3.ini - v description_wo="blablabla dd1/mm/yyyy" CI="XXXXX"

in file2.ini

[SD_EVENT]
LOGFILE=xxxx.log
ERROR_LOGFILE=xxx_ERROR.log
ACCOUNT=*****/****
SERVER=**.**.***
PORT=30980
MAPPING=*****
CLASSNAME=CI_WO
MODUS=insert


madriss
Occasional Contributor

Re: Linking EC's with WO without knowing the ID number of the WO

We developed the solution with sd_event and sd_import. So to creat new change we have in the mapping the description as a key consisting of a text and the date.

1- New change.

sd_event - f file1.ini -v
description_change="blablabla dd1/mm/yyyy"

in the file1 ini.

[SD_EVENT]

LOGFILE=xxxx.log
ERROR_LOGFILE=xxx_error.log
ACCOUNT=****/*****
SERVER=**.**.**
PORT=30980
MAPPING=****
CLASSNAME=new_change
MODUS=insert

2- Link WO to CH

In the mapping we have 2 keys, the description of WO and Change, consisting of a text and the date.

sd_event - f file2.ini -v description_change="blablabla dd1/mm/yyyy" description_wo="blablabla dd1/mm/yyyy"

in file2.ini

[SD_EVENT]
LOGFILE=xxxx.log
ERROR_LOGFILE=xxx_ERROR.log
ACCOUNT=*****/****
SERVER=**.**.***
PORT=30980
MAPPING=*****
CLASSNAME=WO_CH
MODUS=insert


3- Link CI or EC to the wo.

In the mapping we have 2 keys, the description of WO and searchcode of ci.

sd_event -f file3.ini - v description_wo="blablabla dd1/mm/yyyy" CI="XXXXX"

in file2.ini

[SD_EVENT]
LOGFILE=xxxx.log
ERROR_LOGFILE=xxx_ERROR.log
ACCOUNT=*****/****
SERVER=**.**.***
PORT=30980
MAPPING=*****
CLASSNAME=CI_WO
MODUS=insert
//Add this to "OnDomLoad" event