SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Aug 2006
    Location
    Phoenix, AZ
    Posts
    36
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    New QC Patch 10 AuditRecordData object

    I'm attemping to implement this object's functionality into my workflow code but as of yet I've had no luck getting it to work. I attempt to set some objects like so:

    <font class="small">Code:</font><hr /><pre>Dim oTD
    Dim oARFact
    Dim oBugFactory

    Set oTD = TDConnection
    Set oARFact = oTD.AuditRecordFactory
    Set oARData = oARFact.AuditRecordData</pre><hr />I keep getting workflow errors when trying to set up an AuditRecordData object, namely this one:

    <font class="small">Code:</font><hr /><pre>Object doesn't support this property or method: 'oARFact.AuditRecordData':</pre><hr />So... does anyone know if this object is just not supported through workflow or am I going about instantiating it the wrong way? This is the same way I've instantiated the BugFactory and its child objects so I'm not sure what's going on here. Any help on the matter would be appreciated.

  2. #2
    Advanced Member cgrzelka's Avatar
    Join Date
    Feb 2005
    Location
    Bordeaux, France
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: New QC Patch 10 AuditRecordData object

    I don't see any AuditRecordData object in the OTA programming guide (but I don't have Patch 10).

    The AuditRecordFactory has the same properties and methods as other factories, in particular : Item(key) to get an AuditRecord when you know its key (column AU_ACTION_ID in the AUDIT_LOG table, I gues), Filter (to filter audit records, for instance on a user, an entity type and/or an entity key - then you get a NewList from the Filter object), NewList to get a list of all audit records, and so on....

  3. #3
    Member
    Join Date
    Aug 2006
    Location
    Phoenix, AZ
    Posts
    36
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: New QC Patch 10 AuditRecordData object

    Yeah, it's not in the OTA guide because it was just added in patch 10. Here's the example HP sent out with the patch info:

    <font class="small">Code:</font><hr /><pre>// assuming 'conn' holds a valid TdConnection:

    IAuditRecordData auditRecData = new AuditRecordData();

    auditRecData.Action = "CA_Sign_Document";

    auditRecData.EntityId = getEntityId();

    auditRecData..EntityType = getEntityType();

    auditRecData.Description = getSignature();

    IAuditRecAdder auditRecAdder = (IAuditRecordAdder) conn.AuditRecordFactory;

    auditRecAdder.AddAuditRecord( auditRecData );
    </pre><hr />Maybe based on this example someone could help me translate this Javascript into VBScript compatible with workflow.

  4. #4
    Advanced Member cgrzelka's Avatar
    Join Date
    Feb 2005
    Location
    Bordeaux, France
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: New QC Patch 10 AuditRecordData object

    1. I don't think that code is Javascript.
    2. From that code (last but one line), it looks like you need to access to the IAuditRecordAdder interface of the conn.AuditRecordFactory. That won't be possible in VBScript (scripting language like VBScript can only access the main interface of COM objects).

  5. #5
    Member
    Join Date
    Aug 2006
    Location
    Phoenix, AZ
    Posts
    36
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: New QC Patch 10 AuditRecordData object

    Yeah, it may not be Javascript, that was just an arbitrary judgement I made from viewing the syntax. I was afraid of it not working in workflow because of the need to access the object interface, but I thought maybe someone on here had figured out a way around that. Oh well, it's not an integral part of the project, so no biggie. Thanks for your help Christian.

  6. #6
    Member
    Join Date
    Aug 2006
    Location
    Phoenix, AZ
    Posts
    36
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: New QC Patch 10 AuditRecordData object

    I actually got this snippet of code from HP that works within QC's workflow:
    <font class="small">Code:</font><hr /><pre>Sub AddAuditRecord
    Dim ARFactory, ARData
    Set ARFactory = TDConnection.AuditRecordFactory
    Set ARData = CreateObject("TDApiOle80.AuditRecordData")
    ARData.Action = "CA_WF_TestAction"
    ARData.EntityID = "33"
    ARData.EntityType = "BUG"
    ARData.Description = "This is a WF test of IAuditRecordAdder."
    ARFactory.AddAuditRecord ARData
    MsgBox "Audit record added successfully"
    End Sub</pre><hr />For anyone that is interested... The action name must always start with "CA_" for it to work properly, however.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 07:55 PM.

Copyright BetaSoft Inc.