Hi,
I have a customized userRequest for ApplicationInstallation.
When assigning the request, with itop-stencils, I create one task of installation for each component of the application. The task include the version of the component.
I would like, when the user closes the task to automaticaly update the version of the installed component in my CMDB.
The component to update can be simply identified by an OQL request but I don't know how to update it
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Jean-Michel,
In the WorkOrder::AfterUpdate method if state is close and previous was not, retrieve the object to update from Database, change it and force it's update.
Check the tutorials related to Automation
There are multiple examples, where similar stuff are done
This one, even propose a simpler method, by creating a new method doing the remote update and calling that method from the WorkOrder lifecycle
For your use case no need to create a counter, just a method not AddValue, but UpdateComponentVersion for eg.
Last edit: Vincent @ Combodo 2022-07-05
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have a customized userRequest for ApplicationInstallation.
When assigning the request, with itop-stencils, I create one task of installation for each component of the application. The task include the version of the component.
I would like, when the user closes the task to automaticaly update the version of the installed component in my CMDB.
The component to update can be simply identified by an OQL request but I don't know how to update it
Hi Jean-Michel,
In the WorkOrder::AfterUpdate method if state is close and previous was not, retrieve the object to update from Database, change it and force it's update.
Check the tutorials related to Automation
There are multiple examples, where similar stuff are done
This one, even propose a simpler method, by creating a new method doing the remote update and calling that method from the WorkOrder lifecycle
For your use case no need to create a counter, just a method not AddValue, but UpdateComponentVersion for eg.
Last edit: Vincent @ Combodo 2022-07-05
Thanks a lot Vincent