Thanks! :-)
From: Robert Molenda <[email protected]> To: [email protected] Date: 05/21/2009 02:22 PM Subject: Re: Automating definition export using driver Sent by: "Action Request System discussion list(ARSList)" <[email protected]> ** Here is how I do it in Java :) private static ARServerUser cim_ARS; private static String str_DEF; private static String str_XML; str_DEF = new String(""); str_XML = new String(""); cim_ARS = new ARServerUser(); cim_ARS.setUser("Demo"); cim_ARS.setPassword(""); cim_ARS.setServer("Some_Server"); try { cim_ARS.login(); List<StructItemInfo> l_items = new ArrayList<StructItemInfo>(); l_items.clear(); StructItemInfo si = new StructItemInfo(); si.setName("HPD:HelpDesk"); // This is what you want to export switch (ObjectType) { // This isis from a function call - so you can simply hard-code or what ever... case StructItemInfo.ACTIVE_LINK: si.setType(StructItemInfo. ACTIVE_LINK);ObjectName_str="ACTIVE LINK";break; case StructItemInfo.CHAR_MENU: si.setType(StructItemInfo. CHAR_MENU);ObjectName_str="MENU";break; case StructItemInfo.CONTAINER: si.setType(StructItemInfo. CONTAINER);break; case StructItemInfo.DIST_MAP: break; case StructItemInfo.DIST_POOL: break; case StructItemInfo.ESCALATION: si.setType(StructItemInfo. ESCALATION);ObjectName_str="ESCALATION";break; case StructItemInfo.FILTER: si.setType(StructItemInfo.FILTER );ObjectName_str="FILTER";break; case StructItemInfo.SCHEMA: si.setType(StructItemInfo.SCHEMA );ObjectName_str="SCHEMA";break; case StructItemInfo.VUI: break; default: System.out.println("Unknown Object Type Reference!: " + ObjectType.toString());break; } l_items.add(si); try { str_DEF = cim_ARS.exportDef(l_items,false); // XML if true - DEF if false str_XML = cim_ARS.exportDef(l_items,true); // XML if true - DEF if false } catch (ARException e1) { e1.printStackTrace(); } } catch (ARException e) { e.printStackTrace(); } So, you have the object(s) stored in a string - you can easily write to a file, etc. What I have is a little 'application' that has a form which contains the "stuff" (object name / type, etc) and the java appl reads it in, and exports it. HTH Robert Molenda On Thu, May 21, 2009 at 10:59 AM, Tony Worthington < [email protected]> wrote: Sounds like it's high time I learned Java. :-) I agree with your recommendation about driver. Tony Worthington Sr. Technical Analyst Kohl's Department Stores N56 W17000 Ridgewood Drive Menomonee Falls, WI 53051 262.703.7763 (phone) [email protected] www.kohls.com From: Carey Matthew Black <[email protected]> To: [email protected] Date: 05/21/2009 12:12 PM Subject: Re: Automating definition export using driver Sent by: "Action Request System discussion list(ARSList)" <[email protected]> Tony, I have often consider this kind of feature... and after a few iterations of this concept this is what I would suggest.... Don't use the driver. I know that sounds harsh. It is a helpful tool. However, it is not stable enough to build an integration on. There is no guarantee that it will even be in the next version, much less that it will work at all like it does in the current version. So, IMO if you tie yourself to it now... then you will surly pay for that decision over and over again in the future. Here is what I would suggest.... Start down the road of a ARFilter plugin. (If you are on v7.1 then specifically use the Java API based plugin feature set.) This way you get to develop (and maintain) the code that does what you want it to do. If you can slap together a Java program to do what what you want done, then converting it into a ARF (Java) plugin is very trivial. If you do not know Java.... then ... well.. learn? or sweet talk some nice ARS API aware Java programmer(s) on ARSList to help a nice guy out. :) This function sound like two inputs: Form Name File Name then the plugin would connect to the ARS Server (as the user that called the plugin, which in v7.1 there is no need to pass username or password :) ) do the export and save the content to the AR Server file system. Or you might opt to write a bit more Java code and make the def file an attachment in an ARS form. :) It does not sound like it should be to hard to do. :) How does that idea sound to you? -- Carey Matthew Black BMC Remedy AR System Skilled Professional (RSP) ARS = Action Request System(Remedy) Love, then teach Solution = People + Process + Tools Fast, Accurate, Cheap.... Pick two. On Thu, May 21, 2009 at 10:48 AM, Tony Worthington <[email protected]> wrote: > I've used driver in the past to export object definitions and am thinking of > automating the process to be called from within a form. > > I know you can create a drm script file with commands similar to the > following using rec and screc > > exp > 1 > 1 > HPD:Incident Management Console > 0 > c:\test.def > > Anyone know if there a way to pass the object name via command line so that > it does not need to be embedded in a script? > > A more extensible approach would be to create an xml structure similar to > the one that the installers use -- but I'm not sure how to feed that into > driver and have it spit out a def file. > > <Item_List> > <el Type="Guide">SHR:SHR:HelpDialog</el> > <el Type="Guide">SHR:SHR:ContractSave</el> > <el Type="ActiveLink">SHR:SHR:DefaultCompany_012_1000000251 > <el Type="Filter">CTR:SHR-Set-Submitter</el> > <el Type="Filter">CTR:SHR-SetInstanceID</el> > <el Type="Filter">CTR:CTB:NotifDateCheck02</el> > <el Type="Filter">CTR:CTB:NotifDateCheck</el> > <el Type="Menu">SHR:SHR:FormName</el> > <el Type="Menu">SHR:SHR:Contracts-PaymentCode</el> > <el Type="Menu">CTR:ATX:PaymentType</el> > </Item_List> > > Anybody a driver guru? :-) > > Thanks, > Tony > > Tony Worthington > Sr. Technical Analyst > Kohl's Department Stores > N56 W17000 Ridgewood Drive > Menomonee Falls, WI 53051 > 262.703.7763 (phone) > [email protected] > www.kohls.com _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor:[email protected] ARSlist: "Where the Answers Are" CONFIDENTIALITY NOTICE: This is a transmission from Kohl's Department Stores, Inc. and may contain information which is confidential and proprietary. If you are not the addressee, any disclosure, copying or distribution or use of the contents of this message is expressly prohibited. If you have received this transmission in error, please destroy it and notify us immediately at 262-703-7000. CAUTION: Internet and e-mail communications are Kohl's property and Kohl's reserves the right to retrieve and read any message created, sent and received. Kohl's reserves the right to monitor messages by authorized Kohl's Associates at any time without any further consent. -- If it were not for the gutter, my mind would be homeless! _Platinum Sponsor: [email protected] ARSlist: "Where the Answers Are"_ ********************************************************************** CONFIDENTIALITY NOTICE: This is a transmission from Kohl's Department Stores, Inc. and may contain information which is confidential and proprietary. If you are not the addressee, any disclosure, copying or distribution or use of the contents of this message is expressly prohibited. If you have received this transmission in error, please destroy it and notify us immediately at 262-703-7000. CAUTION: Internet and e-mail communications are Kohl's property and Kohl's reserves the right to retrieve and read any message created, sent and received. Kohl's reserves the right to monitor messages by authorized Kohl's Associates at any time without any further consent. _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor:[email protected] ARSlist: "Where the Answers Are"

