ITNCM Internal Workflow, UOWs, and the API
ITCM uses an internal workflow to process work that requires actual communications with network resources (network devices). The API provides methods to submit work into the internal workflow, and to track that work in a similar manner to the ITNCM GUI interface.
If an API method requires access to resource data already stored in the underlying database (for example, the existing stored current configuration for a network resource), then that data is retrieved from or updated in the database in a synchronous manner, and the results of the operation are returned to the user.
If an API method requires an interaction with a network resource, a UOW must be created and submitted to the presentation server from the API. The presentation server does not perform the work directly; the UOW data is entered in the data base and is later acted on by a worker server. If the data is successfully entered in the database, a WorkKey is returned that can be used to check the status of the submitted UOW. If there is a problem with the data that is detected at the time of UOW submission, an exception is returned. Completion time for the UOW depends on the scheduling of the UOW, the backlog of work for the applicable worker servers, and the nature of the UOW. In the case of UOWs submitted for immediate execution, where worker servers are immediately available, the work may be completed in 30 seconds to a minute. Just as with work submitted from the GUI, the nature of the work and the number of resources involved in the UOW can greatly affect the completion time. It is possible to submit UOWs that may take over an hour to complete.
The WorkKey returned when submitting a UOW only indicates that the work has been successfully submitted. If the outcome of the UOW is of interest, the user must check on the status of the UOW using the WorkKey. There are methods in the API that allow either registering to receive events when the UOW changes state, or directly requesting the status of the UOW.
It may be necessary to view the UOW log details to determine specific information related to the success or failure of the UOW once it has completed. There are methods in the API that allow either registering to receive events when the UOW changes state, or to directly query the workflow state and execution status of the UOW.