Highlighted
Honored Contributor.
Honored Contributor.
547 views

Workflow to insert a row in History

I have a custom workflow button that allows a user to send a customized eMail from a Requirement.  That works, but I'm now being asked to have it log a record in that Requirements History when that eMail is sent.

I have found some examples in the OTA guide, but I can't seem to port that over to Workflow only use.

 

Oh, I'm on ALM 12.01

Thanks, for any help you could provide.

0 Likes
3 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Try this:

Set ARFactory = TDConnection.AuditRecordFactory
Set ARData = CreateObject("TDApiOle80.AuditRecordData")
ARData.Action = "CA_Send_Req_Mail"
ARData.EntityID = Req_Fields("RQ_REQ_ID").Value
ARData.EntityType = "REQ"
ARData.Description = "Req email sent"
ARFactory.AddAuditRecord ARData
Set ARFactory = Nothing
Set ARData = Nothing
Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Hi Jan,

Thanks for reply.  That code does insert a record into the AUDIT_LOG table, but it doesn't show up in the History of the REQ item.

Poking around the DB Tables, it looks like there was no record added to the AUDIT_PROPERTIES table.  It looks like that is what's displayed in the History section of an item.

Mike

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Yes, you don't get the whole functionality that you get with an update of a history enabled field. But HP didn't promise that.

Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.