【问题标题】:Create ticket in BMC Remedy via Java [closed]通过 Java 在 BMC Remedy 中创建票证 [关闭]
【发布时间】:2009-07-02 14:11:52
【问题描述】:

我需要一个 Java 类来向 BMC Remedy 的帮助台产品提交票证。

想知道是否有人已经这样做并愿意分享代码或经验。

【问题讨论】:

    标签: java remedy


    【解决方案1】:

    杰夫,
    看看下面。这将在 HPD:Help Desk 形式的 v7 中创建一个简单的票证。希望这会有所帮助。

    -杰森


    /* This creates an entry in the form HPD:Help Desk, returns the Entry ID (not Incident Number) to the command line */
    
    import com.bmc.arsys.api.*;
    
    public class CreateEntry {
    
    public static void main(String[] args) {
    
    //Initialize a new ARServerUser object, this is the main object we are using for all actions
    
    // for e.g. user=Demo, password=pwd, server=remedy, port=7100
    
    ARServerUser context = new ARServerUser("Demo", "pwd", "", "","remedy",7100);
    
    //A new entry we want to submit into remedy
    
    Entry newEntry = new Entry();
    
    //put the field values in there. (Integer fieldID, Value of field)
    
    newEntry.put(7, new Value(0));          // Status<br>
    newEntry.put(8, new Value("This record is created via Java API"));  // Short Description<br>
    newEntry.put(1000000163, new Value(4000));  // Impact - (High) 1000/2000/3000/4000 (Low)<br>
    newEntry.put(1000000162, new Value(4000));  // Urgency - (High) 1000/2000/3000/4000 (Low)<br>
    newEntry.put(1000000000, new Value("xyz")); // Description<br>
    newEntry.put(1000000151, new Value("xyz")); // Details<br>
    newEntry.put(1000000099, new Value(0));     // Service Type - 0/1/2/3<br>
    newEntry.put(240001002, new Value("xyz"));  // Product Name<br>
    newEntry.put(200000003, new Value("xyz"));  // Product Cat Tier 1<br>
    newEntry.put(240001002, new Value("xyz"));  // Product Cat Tier 2<br>
    newEntry.put(200000005, new Value("xyz"));  // Product Cat Tier 3<br>
    newEntry.put(1000000063, new Value("xyz")); // Operational Cat Tier 1<br>
    newEntry.put(1000000064, new Value("xyz")); // Operational Cat Tier 2<br>
    newEntry.put(1000000217, new Value("xyz")); // Assigned Group<br>
    newEntry.put(1000000054, new Value("xyz")); // Corporate ID<br>
    newEntry.put(2, new Value("Demo"));<br>
    
    try{
    
    //And here we create the entry itself, printing out the EntryID we get back
    
    String EntryId = context.createEntry("HPD:Help Desk", newEntry);
    
    System.out.println("Request ID = "+EntryId);
    
    }
    
    catch(ARException arException){
    
    arException.printStackTrace();
    
    }
    
    }
    
    }
    

    【讨论】:

    • 我知道你还没有足够的点数来评论回应,(尽管你现在可能这样做了)但是包含 com.bmc.arsys.api 类的 JAR 是什么。*
    • 假设 api 版本 7.0,arapi70.jar 和 arutil70.jar 都需要在类路径中。如果不是 7.0 版,请相应调整文件名。可能是 75 岁、63 岁或 60 岁,怀疑你正在处理比这更早的事情。两者都可以在 ARSystem 服务器基础目录中找到。
    • 刚刚注意到上面的一个错误。更改

      newEntry.put(240001002, new Value("xyz")); // Product Cat Tier 2 to

      newEntry.put(240001004, new Value("xyz")); // 产品 Cat Tier 2
    • 我看到 cmets 不喜欢这里的 html :) 只需将 Product Cat 2 的 FID 更改为 240001004。
    • 您可以重新编辑更改吗?您可以随时编辑自己的答案或问题。你需要 2000 点(我认为)来编辑别人的……至于 JAR,完美!我将在 Novell Identity Manager 驱动程序实例中使用它,我们需要那些特定的 JAR 来让驱动程序首先工作。感谢您的所有帮助!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-24
    • 1970-01-01
    • 2022-08-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多