Searching the Help
To search for information in the Help, type a word or phrase in the Search box. When you enter a group of words, OR is inferred. You can use Boolean operators to refine your search.
Results returned are case insensitive. However, results ranking takes case into account and assigns higher scores to case matches. Therefore, a search for "cats" followed by a search for "Cats" would return the same number of Help topics, but the order in which the topics are listed would be different.
|A single word||
||Topics that contain the word "cat". You will also find its grammatical variations, such as "cats".|
You can specify that the search results contain a specific phrase.
Topics that contain the literal phrase "cat food" and all its grammatical variations.
Without the quotation marks, the query is equivalent to specifying an OR operator, which finds topics with one of the individual words instead of the phrase.
Two or more words in the same topic
|Either word in a topic||
|Topics that do not contain a specific word or phrase||
|Topics that contain one string and do not contain another||
|A combination of search types||
- Create Jython Code
- Use External Java JAR Files within Jython
- Execution of the Code
- Modifying Out-of-the-Box Scripts
- Structure of the Jython File
- Results Generation by the Jython Script
- The Framework Instance
- Finding the Correct Credentials (for Connection Adapters)
- Handling Exceptions from Java
- Troubleshooting Migration from Jython Version 2.1 to 2.5.3
Results Generation by the Jython Script
Each Jython script runs on a specific Trigger CI, and ends with results that are returned by the return value of the
The script result is actually a group of CIs and links that are to be inserted or updated in the
ObjectStateHolder class is a way to represent an object or link defined in the
ObjectStateHolder object contains the CIT name and a list of attributes and their values. The
ObjectStateHolderVector is a vector of
The ObjectStateHolder Syntax
This section explains how to build the DFM results into a
Example of Setting Attributes on the CIs:
The ObjectStateHolder class describes the DFM result graph. Each CI and link (relationship) is placed inside an instance of the
ObjectStateHolder class as in the following Jython code sample:
Line 1 creates a CI of type siebelappserver.
Line 2 creates an attribute called data_name with a value of sblsvrName which is a Jython variable set with the value discovered for the server name.
Line 3 sets a non-key attribute that is updated in the
Line 4 is the building of containment (the result is a graph). It specifies that this application server is contained inside a host (another
ObjectStateHolderclass in the scope).
Note: Each CI being reported by the Jython script must include values for all the key attributes of the CI's CI Type.
Example of Relationships (Links):
The following link example explains how the graph is represented:1 linkOSH = ObjectStateHolder('route') 2 linkOSH.setAttribute('link_end1', gatewayOSH) 3 linkOSH.setAttribute('link_end2', appServerOSH)
Line 1 creates the link (that is also of the
ObjectStateHolderclass. The only difference is that
routeis a link CI Type).
Lines 2 and 3 specify the nodes at the end of each link. This is done using the end1 and end2 attributes of the link which must be specified (because they are the minimal key attributes of each link). The attribute values are
ObjectStateHolderinstances. For details on End 1 and End 2, see Link.
Caution: A link is directional. You should verify that End 1 and End 2 nodes correspond to valid CITs at each end. If the nodes are not valid, the result object fails validation and is not reported correctly. For details, see CI Type Relationships.
Example of Vector (Gathering CIs):
After creating objects with attributes, and links with objects at their ends, you must now group them together. You do this by adding them to an
ObjectStateHolderVector instance, as follows:
oshvMyResult = ObjectStateHolderVector() oshvMyResult.add(appServerOSH) oshvMyResult.add(linkOSH)
For details on reporting this composite result to the Framework so that it can be sent to the
Once the result graph is assembled in an
ObjectStateHolderVector instance, it must be returned to the DFM Framework to be inserted into the
ObjectStateHolderVector instance as the result of the
Note: For details on creating OSH for common CITs, see modeling.py.
Sending Large Amounts of Data
Sending large amounts of data (usually more than 20 KB) is difficult to process in UCMDB. Data of this size should be split into smaller chunks before sending to UCMDB. In order for all the chunks to be correctly inserted to UCMDB, each chunk needs to contain required identification information for the CIs in the chunk. This is a common scenario when developing Jython integrations. The sendObjects method is used to send the results in chunks. If the Jython script sends a large number of results (the default value is 20,000, but this value can be configured in the DataFlowProbe.properties File using the appilog.agent.local.maxTaskResultSize key) it should chunk the results according to their topology. This chunking should be performed taking into account identification rules so that the results are entered correctly in UCMDB. If the Jython script does not chunk the results, the probe attempts to chunk them; however, this can lead to poor performance for a large result set.
Note Chunking should be used for Jython integration adapters and not for regular discovery jobs. This is because discovery jobs usually discover information regarding a specific trigger and do not send large amounts of information. With Jython integrations, large amounts of data are discovered on the single trigger of the integration.
It is also possible to use chunking for a small number of results. In such a case, there is a relationship between CIs in different chunks and the developer of the Jython script has two options:
- Send the entire CI and all of its identification information again in every chunk that contains a link to it.
- Use the UCMDB ID of the CI. To do this, the Jython script has to wait for each chunk to be processed in the UCMDB server in order to get the UCMDB IDs. To enable this mode (called synchronous result sending), add the SendJythonResultsSynchronously tag to the adapter. This tag ensures that when you finish sending the chunk, the UCMDB IDs of the CIs in the chunk have already been received by the probe. The adapter developer can use the UCMDB IDs for generating the next chunk. To use the UCMDB IDs, use the framework API getIdMapping.
Example of Using getIdMapping
In the first chunk you send nodes. In the second chunk you send processes. The root container of the process is a node. Instead of sending the entire objectStateHolder of the node in the process root_container attribute, you can get the UCMDB ID of the node using the getIdMapping API and use only the node ID in the process root_container attribute to make the chunk smaller.
We welcome your comments!
To open the configured email client on this computer, open an email window.
Otherwise, copy the information below to a web mail client, and send this email to firstname.lastname@example.org.
Help Topic ID: