tag:blogger.com,1999:blog-4702950152327976706.post1898527166774699876..comments2024-03-27T19:28:01.524-07:00Comments on Just geeks: HP Open View Service Desk web-api maybe long, but isn't LongBrent Vhttp://www.blogger.com/profile/15891142062380248367noreply@blogger.comBlogger23125tag:blogger.com,1999:blog-4702950152327976706.post-87134710426346715802012-01-10T23:24:14.463-07:002012-01-10T23:24:14.463-07:00I have to open an existing incident. I'm getti...I have to open an existing incident. I'm getting problem in establishing a session using ApiSDSession. However found a class "Session" in "Web API Programmer’s Guide" that connects with server successfully. Unfortunately the method details are not available for "Session" class. Any way to find out the documentation? Is the "Session" class a good substitute for "ApiSDSession"?mabshttps://www.blogger.com/profile/05229145196319485548noreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-15855334339889560352010-06-24T12:12:38.807-07:002010-06-24T12:12:38.807-07:00Please help me where i can get reference how to de...Please help me where i can get reference how to develop on HP OpenView with Java. thanks.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-38607536001979991712010-04-19T21:14:16.855-07:002010-04-19T21:14:16.855-07:00How to get extended attributes of ConfigurationIte...How to get extended attributes of ConfigurationItem. Such as "model" etc.<br /><br />Thankspashtethttp://shmakovpn@krw.runoreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-26038413635848890512009-09-23T08:17:15.345-07:002009-09-23T08:17:15.345-07:00Brent,
That was a really good suggestion. Thank ...Brent, <br /><br />That was a really good suggestion. Thank you.<br /><br />The following code retrieves all service call categories:<br /><br />IServiceCallCategoryHome iservcallcathome = session.getServiceCallCategoryHome();<br />IServiceCallCategory[] iservcallcat = iservcallcathome.findAllServiceCallCategory();<br /><br /> for( int i=0; i < iservcallcat.length; i++ )<br /> System.out.println( iservcallcat[i].getText() );<br /><br />It's almost the same code to get the classification ( IClassificationSer ).<br /><br /><b>Now the question is: how to validate or get the <i>Configuration Item</i> field? Does anybody have any hint?</b>Unknownhttps://www.blogger.com/profile/00804591841138550304noreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-718356299399826932009-09-22T10:43:07.118-07:002009-09-22T10:43:07.118-07:00Thiago,
I would look at ICategoryHome and more sp...Thiago,<br /><br />I would look at ICategoryHome and more specifically, I would look at IServiceCallCategoryHome. Whenever you need to find stuff there is usually a xxxHome class that give you the ability to do searches.<br /><br />I hope that helps.<br /><br />BrentBrent Vhttps://www.blogger.com/profile/15891142062380248367noreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-47400079804369880222009-09-22T10:05:29.087-07:002009-09-22T10:05:29.087-07:00Do you guys have any idea how to create a service ...Do you guys have any idea <b>how to create a service call and assign a category to it?</b><br />For instance:<br />...<br />IServicecall s = scHome.openNewServiceCall();<br />s.setCategory(category_arg);<br /><br />where <b>category_arg</b> is a IServiceCallCategory.<br /><br /><b>What really matters is how do I get a IServiceCallCategory from web-api.jar?</b><br /><br />Thanks in advance.Unknownhttps://www.blogger.com/profile/00804591841138550304noreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-42348792265046394782009-09-07T10:34:43.568-07:002009-09-07T10:34:43.568-07:00Hi rjs,
I don't have any specific experience ...Hi rjs,<br /><br />I don't have any specific experience with CI's with regard to the api, but other people I know have not had trouble with CI's. However, I don't think we were trying to get service calls or incidents from a CI. Sorry I couldn't be of more assistance.<br /><br />Please post back, if you figure something out.<br /><br />Regards,<br /><br />BrentBrent Vhttps://www.blogger.com/profile/15891142062380248367noreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-75875992806235021712009-09-07T03:24:36.201-07:002009-09-07T03:24:36.201-07:00Hi Brent V,
thanks for your reply. Regarding the ...Hi Brent V,<br /><br />thanks for your reply. Regarding the session stability, I find the connection quite good. It is only when I try to get all the incidents or service calls of a CI and do this for allot of CIs the api closes the connection and returns the timeout message. This message from the api is not precise, as I suspect it has something to do with max-rows and Query size. Have you any similar experiences? Thanks again for your feedback.Unknownhttps://www.blogger.com/profile/01728632514219036578noreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-29782881777200624282009-09-04T08:38:53.842-07:002009-09-04T08:38:53.842-07:00Hi rjs,
The session in HP OpenView api is not ver...Hi rjs,<br /><br />The session in HP OpenView api is not very good in my opinion. In earlier version it was very buggy. There is no way to renew a session that I am aware of. I believe that it can timeout at most anytime, which can be frustrating. <br /><br />I suggest verifying that you are closing the session after every use. I also recommend you use a named license instead of a regular license that is not guaranteed a connection. It does make a difference in reliability. And finally, make sure your HP OpenView server is running the latest possible version of the api, and make sure you are using the same one for your report. You can check the version as I describe <a href="http://justgeeks.blogspot.com/2008/07/check-version-of-ovsd-web-apijar.html" rel="nofollow">here</a>.<br /><br />I hope that helps.<br /><br />BrentBrent Vhttps://www.blogger.com/profile/15891142062380248367noreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-79938188023658658592009-04-20T09:05:00.000-07:002009-04-20T09:05:00.000-07:00Hi rjs,
I don't have much experience with Configu...Hi rjs,<br /><br />I don't have much experience with Configuration Items (CI). If you find a good solution, please post your finds. <br /><br />Thanks,<br /><br />BrentBrent Vhttps://www.blogger.com/profile/15891142062380248367noreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-20389616822938134132009-04-17T01:25:00.000-07:002009-04-17T01:25:00.000-07:00Thanks for your replies, and a good solution.
I a...Thanks for your replies, and a good solution.<br /><br />I am currently trying to get the name and value of all the attributes for a CI. I was hoping that the IConfigurationItem would have a getter for this, e.g. getAllAttributes(),but it does not. I would avoid calling each individual getter for each attribute as there are MANY.<br /><br />Is it possible to do this via the IAttributesPerStatusHome?<br /><br />I am considering reflection to call the getters, but I would rather not. <br /><br />Any ideas on have to achieve is highly appreciated.<br /><br />Regards<br />RunarUnknownhttps://www.blogger.com/profile/01728632514219036578noreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-33505029111316896642009-03-12T11:12:00.000-07:002009-03-12T11:12:00.000-07:00Hi,You can use this method to make the full Catego...Hi,<BR/><BR/>You can use this method to make the full Category path.<BR/><BR/> public static String getFullPathCategory(ICICategory category){<BR/> String cat = null;<BR/> <BR/> IKernelCodeHierarchical parent = category.getParentCode();<BR/> for(int i=0; i<6;i++){<BR/> <BR/> if(parent!=null){<BR/> if(cat!=null)<BR/> cat = parent.getText() + " \\ " + cat;<BR/> else<BR/> cat = parent.getText();<BR/> <BR/> parent = parent.getParentCode();<BR/> }<BR/> }<BR/> System.out.println("Path:"+ cat);<BR/> return cat;<BR/> }Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-41404555721750182782009-02-14T06:11:00.000-07:002009-02-14T06:11:00.000-07:00Hi rjs,But the catWhere.addCriteriumOnParentCode(p...Hi rjs,<BR/><BR/><I>But the catWhere.addCriteriumOnParentCode(parentCode);<BR/>seems to retreieve the siblings not the parents.</I><BR/><BR/>It's ablosutely Ok. Because this method adds a criterium on the property "ParentNode" of the nodes. So the query will return the children of the <I>parentCode</I>.<BR/><BR/><BR/>Regards,<BR/>Dmitry.I was born to the USSRhttps://www.blogger.com/profile/02284923808816757266noreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-43534222726480042212009-02-12T10:48:00.000-07:002009-02-12T10:48:00.000-07:00Hi rjs,I must say I am surprised as well that the ...Hi rjs,<BR/><BR/>I must say I am surprised as well that the parent is actually the sibling. I remember there being some weirdness (sorry don't remember the actual issues(s)) with getting the path to the CI. I do recall doing something similar to what you did though. I suspect there is a bug somewhere in your code. Just an unfounded guess though. :)<BR/><BR/>Thanks for dropping by.<BR/><BR/>BrentBrent Vhttps://www.blogger.com/profile/15891142062380248367noreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-11019837782589840702009-02-11T10:11:00.000-07:002009-02-11T10:11:00.000-07:00Hi,I am using the web-api, and trying to get the f...Hi,<BR/><BR/>I am using the web-api, and trying to get the full path of the Category of a CI. E.g. For a Business PC CI I want to retreive the full Category path: Hardware/System/Business PC<BR/><BR/>First I thought there would be such a method in the api, but I could not find any.<BR/><BR/>So I tried to derive the path from the CIs ICICategory parent:<BR/><BR/>/**<BR/> * Gets the full path given the ciCategory<BR/> * @param ciCategory<BR/> * @return the Category string if found, null otherwhise.<BR/> */<BR/> private String getFullCICategorypath(ICICategory ciCategory){<BR/> String reply = ciCategory.getText();<BR/> IKernelCodeHierarchical parentCode = ciCategory.getParentCode();<BR/>// IKernelCodeHierarchicalWhere iKernelCodeHierarchicalWhere = new IKernelCodeHierarchicalWhere();<BR/> ICICategoryWhere catWhere = catHome.createCICategoryWhere();<BR/> catWhere.addCriteriumOnParentCode(parentCode);<BR/> ICICategory parentCategory1 = catHome.findCICategory(catWhere)[0];<BR/> <BR/> ICICategory[] findCICategory = catHome.findCICategory(catWhere);<BR/> <BR/> log.debug("Found the following categories for category " + ciCategory.getText());<BR/> for (ICICategory category : findCICategory) {<BR/> log.debug(category.getText());<BR/> }<BR/> <BR/> if(parentCategory1==null){<BR/> log.debug("ciCategory "+ ciCategory.getText() + " has no more parents. Level 1.");<BR/> return reply;<BR/> }<BR/> <BR/> //Repeat until no more parents are found (Could use recursion here, but since we know the tree has max 4 levels we just keep checking until no more parents)<BR/> //second level<BR/> catWhere = catHome.createCICategoryWhere();<BR/> catWhere.addCriteriumOnParentCode(parentCategory1.getParentCode());<BR/> ICICategory parentCategory2 = catHome.findCICategory(catWhere)[0];<BR/> if(parentCategory2==null){<BR/> log.debug("ciCategory "+ ciCategory.getText() + " has no more parents. Level 2.");<BR/> return null;<BR/> }else{<BR/> reply = parentCategory2.getText() + "/" + reply;<BR/> }<BR/> //third level<BR/> catWhere = catHome.createCICategoryWhere();<BR/> catWhere.addCriteriumOnParentCode(parentCategory2.getParentCode());<BR/> ICICategory parentCategory3 = catHome.findCICategory(catWhere)[0];<BR/> if(parentCategory3==null){<BR/> log.debug("ciCategory "+ ciCategory.getText() + " has no more parents. Level 3.");<BR/> return reply;<BR/> }else{<BR/> reply = parentCategory3.getText() + "/" + reply;<BR/> }<BR/> <BR/> <BR/> <BR/><BR/> log.debug("ciCategory " + ciCategory.getText() +" has parentCode " + reply);<BR/> <BR/> return reply;<BR/> <BR/> }<BR/><BR/><BR/>But the catWhere.addCriteriumOnParentCode(parentCode);<BR/>seems to retreieve the siblings not the parents.<BR/><BR/>Any tips is highly appreciated.Unknownhttps://www.blogger.com/profile/01728632514219036578noreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-67640491852191687512009-01-19T08:44:00.000-07:002009-01-19T08:44:00.000-07:00Hi Abdul,It is not possible to give you code that ...Hi Abdul,<BR/><BR/>It is not possible to give you code that will work on your system because HP OpenView allows administrators to define UI and DB rules that affect what fields are required, business rules, etc. However, the here is some basic code that will hopefully get you started. The easiest way is to just run this and see what exceptions are thrown it is pretty easy to tell what to do from that. <BR/><BR/>IServicecallHome scHome = session.getServicecallHome();<BR/>IServicecall sc = scHome.openNewServicecall();<BR/>sc.setDescription("description here");<BR/>sc.save();Brent Vhttps://www.blogger.com/profile/15891142062380248367noreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-54679037355106252412009-01-18T18:59:00.000-07:002009-01-18T18:59:00.000-07:00Could some please share with me the api and a samp...Could some please share with me the api and a sample code to create a service call in OVSD.Unknownhttps://www.blogger.com/profile/03299427742731808194noreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-85019815923877236642008-02-20T00:49:00.000-07:002008-02-20T00:49:00.000-07:00Yes, some OVSD api design solutions... not obvious...Yes, some OVSD api design solutions... not obvious (at the least) and sometimes like bugs.<BR/><BR/>I never understand why in this case was used so ugly method to add Vote to Approval.I was born to the USSRhttps://www.blogger.com/profile/02284923808816757266noreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-57788608999381901152008-02-18T14:32:00.000-07:002008-02-18T14:32:00.000-07:00I am glad you figured it out. Good job! I had a si...I am glad you figured it out. Good job! I had a similar experience on one of the other properties I was trying set. It seems that OVSD has in some cases two methods (one on each object) to "connect" to objects and only one of them works. It is also worth mentioning that UI business rules setup in OVSD can cause exceptions also. Depending on how complex your UI business rules are the order that you set the values can impact if you get an exception also. Very frustrating from a developers standpoint. HP would probably say it is designed that way, I call if buggy. ;)Brent Vhttps://www.blogger.com/profile/15891142062380248367noreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-14455387015546178852008-02-18T13:59:00.000-07:002008-02-18T13:59:00.000-07:00These docs I have too. They are very scant.Let's l...These docs I have too. They are very scant.<BR/><BR/>Let's look my code.<BR/>This code throws exception like (in russian) "You have no permissions to input this data: vote" in last line:<BR/> IServicecallHome scHome = session.getServicecallHome();<BR/> IServicecall sc = scHome.openNewServicecall();<BR/><BR/> IApprovalVoteHome voteHome = session.getApprovalVoteHome();<BR/> IApprovalVote vote = voteHome.openNewApprovalVote();<BR/><BR/>So I can't just create a vote!<BR/>But if to swap creation of servicecall and vote, code doesn't throw exception:<BR/> IApprovalVoteHome voteHome = session.getApprovalVoteHome();<BR/> IApprovalVote vote = voteHome.openNewApprovalVote();<BR/><BR/> IServicecallHome scHome = session.getServicecallHome();<BR/> IServicecall sc = scHome.openNewServicecall();<BR/><BR/>But throws exception then I try to add vote to Approval:<BR/> sc.getApproval().addApprovalVote(vote);<BR/><BR/><BR/>While writing this post I find solution!! Full code:<BR/> IApprovalVoteHome voteHome = session.getApprovalVoteHome();<BR/> IApprovalVote vote = voteHome.openNewApprovalVote();<BR/><BR/> IServicecallHome scHome = session.getServicecallHome();<BR/> IServicecall sc = scHome.openNewServicecall();<BR/><BR/> vote.setApprover(person);<BR/> vote.setApproved(true);<BR/> vote.setReason("ok");<BR/><BR/> sc.setApprovalInitiator(person);<BR/><BR/> sc.setConfigurationItem(session.getConfigurationItemHome().openConfigurationItem(new Long(...L)));<BR/> sc.setCaller(person);<BR/> sc.getAssignment().setAssigneePerson(person);<BR/> sc.getAssignment().transfer();<BR/><BR/> sc.setDescription("descr.");<BR/><BR/> sc.save();<BR/><BR/> vote.setApproval(sc);<BR/> vote.save();<BR/><BR/>Wow! It last!<BR/>Thanks :)I was born to the USSRhttps://www.blogger.com/profile/02284923808816757266noreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-57396262108885228462008-02-18T12:05:00.000-07:002008-02-18T12:05:00.000-07:00I just have the docs that come with HP OpenView Se...I just have the docs that come with HP OpenView Service Desk CD. Sorry, I have never used the ApprovalVote. What is the problem you are having exactly. Please provide sample code and error message.Brent Vhttps://www.blogger.com/profile/15891142062380248367noreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-75896557526596930352008-02-08T20:29:00.000-07:002008-02-08T20:29:00.000-07:00Hi.Do you have some docs about OVSD web-api? I can...Hi.<BR/><BR/>Do you have some docs about OVSD web-api? I can't create ApprovalVote and have no idea how to solve problem.I was born to the USSRhttps://www.blogger.com/profile/02284923808816757266noreply@blogger.comtag:blogger.com,1999:blog-4702950152327976706.post-58463696044844173002008-02-01T21:17:00.000-07:002008-02-01T21:17:00.000-07:00This post doesn't save my "someone hours of frustr...This post doesn't save my "someone hours of frustration" but make my code simpler.<BR/><BR/>Thanks.I was born to the USSRhttps://www.blogger.com/profile/02284923808816757266noreply@blogger.com