Linking Service Catalog from one instance to another

bennyphipps
Giga Expert

I think I know the answer to this question but we've had a question asked by the business.

We have 2 instances in the organisation being used.  

Instance #1 - is being used for basic Service Catalog, incident, change and a few other applications

Instance #2 - used for service Catalog and Orchestration workflows (MID servers etc etc).

The business would like to use Items from Instance #2 DIRECTLY from Instance #1.

Options I would see would be:

  • Direct integration using web service

        I see many problems with this regarding how do you copy variables linking to a table in another insatnce client scripts script includes in other instances etc etc etc.

  • A URL link in Catalog of Instance #1 to the other instance Cat Item in Instance #2

        Users would obviously be transferred (seamlessly) to another instance. But again this would possibly require that users exist in bot instances etc etc

In both cases tracking of reqeusts woudl be a nightmare...

Obviously ONE instance would be the best option by a million miles!!!   I just want to know how difficult it would be to link instances in sucha complex way.

Regards,

Ben

8 REPLIES 8

Kalaiarasan Pus
Giga Sage

I would go for option 1 and make use of catalog API for ordering the items in the other instance using webservice



Service Catalog Script API - ServiceNow Wiki


The Service Catalog Script API, will be added as a client script or as a business rule ?



If I have a catalog item with a UI Page button that will run the Service Catalog Script API to call a Service Catalog from another instance, I will need to specify the instance in the script right ?


Becuase currently we have


Ordering a single BlackBerry:


var cartId = GlideGuid.generate(null);
 
var cart = new Cart(cartId);
 
var item = cart.addItem('e2132865c0a8016500108d9cee411699'); var rc = cart.placeOrder(); gs.addInfoMessage(rc.number);




We just specify the sys_id of the catalog item, but not the instance where the item is located


This code will go in the web service of the instance 2 ..



You will send the data from instance 1 to the web service of instance 2 .. The instance 2 web service will create the request and return the result to instance 1 ....


Ok,



How would this deal with all the variables the catalog items have.   Most of which are reference variables... with related reference qualifiers.



Also there are client scripts that are important for the behavior of the products... how would you get them loaded.   These also reference script includes to perform server side checks.



Also what would happen regarding the reference numbers and related workflows approvals and stuff......?



Surely the users would need to exists in BOTH instances.



I understand that simply ordering an "Item" which is a static thing is easy enough to do.