cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Invoking creation wizard using API does not work in non-interactive mode

CWaltking
Super Contributor
Hello all,
 
I would like to invoke an object creation wizard using APIs as described in the user documentation of HOPEX V5
 
I want to add this code to an already existing batch file which creates/updates Technology objects coming from the CMDB. I want to add the creation of lifecycle objects for these Technology objects, used for GANTT chart representation in the ITPM tool.  
 
My code work in the standard creation mode (mode=1), but does not in the non-interactive mode (mode=2). Can anybody tell me what I miss? Or is this a bug ?
 
This one works. Dates are taken into account for lifecycle creation:
 
 
Spoiler
oMyTech = GetObjectFromId("~d1W9PpYOarGQ[1cwg]")
oMyTech.GetProp("~1NQepAwrI5F3[Date de publication]") = "15/05/2023"
oMyTech.GetProp("~vNQeZ9wrIb73[Fin de support étendue]") = "31/12/2023"
 
Set myCreator = oMyTech.GetCollection("~II(G0eKbFTiT[Vie de l'objet]").InstanceCreator
myCreator.mode = 1
myAssocID = myCreator.Create
 
 
This one does not work. My dates are not taken into account for lifcycle creation:
 
 
Spoiler
oMyTech = GetObjectFromId("~d1W9PpYOarGQ[1cwg]")
oMyTech.GetProp("~1NQepAwrI5F3[Date de publication]") = "15/05/2023"
oMyTech.GetProp("~vNQeZ9wrIb73[Fin de support étendue]") = "31/12/2023"
 
Set myCreator = oMyTech.GetCollection("~II(G0eKbFTiT[Vie de l'objet]").InstanceCreator
myCreator.mode = 2
myAssocID = myCreator.Create
 
Thank you very much for your help.
 
 
1 Reply

oguimard
Retired

Hello,

it depends on how the wizard has been built.

Is the wizard built to work in non-interactive ? if not then that is why.

Is it a standard or custom wizard ?