Community in read only mode June 18 & 19
This community will be set in READ ONLY mode for a while on Tuesday June 18 into Wednesday June 19 while we import content and users from our Micro Focus Forums community site. MORE INFORMATION
Regular Contributor.. justmike23 Regular Contributor..
Regular Contributor..
429 views

Send email after Req. is 'really' deleted

we found out that there is no action when Req is actually delete.
We can catch action for Req_CanDelete or action which start delete procedure, but after all of that there is always a pop-up "do You want to delete Req',
If I click NO then delete did not took a place. But how to catch if Req. got actually deleted and send email when it got deleted.

0 Likes
5 Replies
Knowledge Partner
Knowledge Partner

Re: Send email after Req. is 'really' deleted

Hi JustMike,

When we are on any specific requirement REQ_ID will be captured in the workflow "req_moveto" event.

Say for example you have chosen not to delete this requirement.

In the next step , you can find existence of req using

Reqfact.item(req_id)

If it returns object,that means didn't get deleted, we should not send email in this case, if it doesn't return any object and if it alerts something like REQ ID doesn't exist, then it means req got deleted and we can send email.

Regards,srihari
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Send email after Req. is 'really' deleted

Hi,

Workflow code only catches situations where users delete items via the UI but not via OTA/REST. If you need to inform users in any case I'd suggest to consider database triggers. Of course you have to be aware that low-level database access is not officially supported and you might have to add the triggers after any ALM patch / upgrade. And your system might send a HUGE number of mails if you delete a large bunch of items...

Regards,

Dirk

0 Likes
Regular Contributor.. justmike23 Regular Contributor..
Regular Contributor..

Re: Send email after Req. is 'really' deleted

Hello,

Yes, THANK YOU FOR ANSWER.

I have got the same idea but how to send an email if the object got deleted?

Dim objReqFactory
Dim objReq
Set objReqFactory = TDConnection.ReqFactory
Set objReq = objReqFactory.Item(CLng(iObjectId))

objReq.Mail CStr(strTo), CStr(strCC), 8, CStr(strSubject), CStr(strComment)   ' THIS WILL NOT SEND EMAIL AS OBJECT DOES NOT EXIST ANYLONGER

0 Likes
Knowledge Partner
Knowledge Partner

Re: Send email after Req. is 'really' deleted

Hi JustMike,

I will try to explore more on your question, on how to preserve REQ object data prior to deletion, so we can use the object data after actual deletion.

On a side note, Have you tried "Alert Rules" option in Customization section, here we have a rule "when a requirement is modified or deleted,alert traced to requirements and child requirements".

Sends email to "Author".

Regards,Srihari

0 Likes
Regular Contributor.. justmike23 Regular Contributor..
Regular Contributor..

Re: Send email after Req. is 'really' deleted

hello,

Yes I  have tried to at first get and save gloably an indicator to Req. object then after delete use it for SendEmail but it is not sending it.

Did not tried as we would like to perform diferent action on modified than on deleted.

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.