VI_ESS_PWOHelperPWO send mail new task for approver process did not generate

Hi All,

We have a requirenment to send approval email emmedialty and also collective reminder every day.

When I "QER\ITShop\MailTemplateIdents\RequestApproverByCollection" enable this config param and modify generating condition for the process "VI_ESS_PWOHelperPWO send mail new task for approver"

I see only collective email send process is triggering and  process VI_ESS_PWOHelperPWO send mail new task for approver did not triggers.

For testing I also created custom process for event "DECISIONREQUIRED" without any generating condition and when config param "QER\ITShop\MailTemplateIdents\RequestApproverByCollection" is enabled process did not generate.

Is there any other configuration I have to change so that both process trigeres.

Parents
  • I think you need to implement it the other way round, because the customizer does not fire the events as you figured already. You need to keep the configuration parameter "QER\ITShop\MailTemplateIdents\RequestApproverByCollection" disabled and change the gencondition at the process for sending the collective reminder. (VI_ESS_PWOHelperPWO send mail collection of pending tasks for approver). You need to change the pre-script at this process to ensure that the correct rich-mail template is selected because the deactivate configuration parameter will be returned as an empty string if you use Connection.GetConfigParm to get the value.

  • Hi Markus,

    I tried this also and process "VI_ESS_PWOHelperPWO send mail collection of pending tasks for approver" did not trigger.

    Even I removed complete generation condition from process VI_ESS_PWOHelperPWO send mail collection of pending tasks for approver.

    Looks like job queue I see "Created by QBMDBQueueProcess: fire event DECISIONCOLLECTION for object type PWOHelperPWO" generating but this did not trigger main process.

  • Did you check the Pre-script as well? If the configuration parameter is disabled, the Pre-Script just throws an exception. You need to provide the mail template in your custom pre-script for the process.

  • yes, even I removed pre-script and hard coded email template UID, no process generation.

  • Did you check the process execution of "Created by QBMDBQueueProcess: fire event DECISIONCOLLECTION for object type PWOHelperPWO" for errors? Do the parameters of this job look correct?

  • It worked in my tests.

    • The configuration parameter QER\ITShop\MailTemplateIdents\RequestApproverByCollection was disabled
    • I changed the gencondition and the prescript of the process VI_ESS_PWOHelperPWO send mail collection of pending tasks for approver. Note the hardcoded mail template ident to make it work.
      • Gencondition
        QER\ITShop\MailTemplateIdents\RequestApproverByCollectionDim f As ISqlFormatter = Connection.SqlFormatter   
        
        Value = Connection.GetConfigParm("Common\MailNotification")<>"" _
        		AndAlso $FK(UID_PersonHead).DefaultEmailAddress$ <> "" _
        		AndAlso Not $FK(UID_PersonHead).IsInActive:Bool$ _
        		AndAlso values("UID_RichMail").ToString() <> ""
        
      • PreScript
        Dim RichMail As String = Connection.GetConfigParm("QER\ITShop\MailTemplateIdents\RequestApproverByCollection")
        ' Hardcode for testing
        RichMail = "IT Shop - pending requests for approver"
        
        If not String.IsNullOrEmpty(RichMail) Then
        	Dim rmcoll as IColDbObject = Connection.CreateCol("DialogRichMail") 
        	rmcoll.Prototype.PutValue("Ident_DialogRichMail", RichMail)
        	rmcoll.Load()
        	If rmcoll.Count>0 Then
        		values("UID_RichMail") = rmcoll(0).getvalue("UID_DialogRichMail")
        	Else
        		Throw New ViException(#LD("Mail template {0} was not found (see configuration parameter '{1}').", RichMail, "QER\ITShop\MailTemplateIdents\RequestApproverByCollection")#, ExceptionRelevance.EndUser)	
        	End If
        End If
    • Triggered the schedule, and it worked.
Reply
  • It worked in my tests.

    • The configuration parameter QER\ITShop\MailTemplateIdents\RequestApproverByCollection was disabled
    • I changed the gencondition and the prescript of the process VI_ESS_PWOHelperPWO send mail collection of pending tasks for approver. Note the hardcoded mail template ident to make it work.
      • Gencondition
        QER\ITShop\MailTemplateIdents\RequestApproverByCollectionDim f As ISqlFormatter = Connection.SqlFormatter   
        
        Value = Connection.GetConfigParm("Common\MailNotification")<>"" _
        		AndAlso $FK(UID_PersonHead).DefaultEmailAddress$ <> "" _
        		AndAlso Not $FK(UID_PersonHead).IsInActive:Bool$ _
        		AndAlso values("UID_RichMail").ToString() <> ""
        
      • PreScript
        Dim RichMail As String = Connection.GetConfigParm("QER\ITShop\MailTemplateIdents\RequestApproverByCollection")
        ' Hardcode for testing
        RichMail = "IT Shop - pending requests for approver"
        
        If not String.IsNullOrEmpty(RichMail) Then
        	Dim rmcoll as IColDbObject = Connection.CreateCol("DialogRichMail") 
        	rmcoll.Prototype.PutValue("Ident_DialogRichMail", RichMail)
        	rmcoll.Load()
        	If rmcoll.Count>0 Then
        		values("UID_RichMail") = rmcoll(0).getvalue("UID_DialogRichMail")
        	Else
        		Throw New ViException(#LD("Mail template {0} was not found (see configuration parameter '{1}').", RichMail, "QER\ITShop\MailTemplateIdents\RequestApproverByCollection")#, ExceptionRelevance.EndUser)	
        	End If
        End If
    • Triggered the schedule, and it worked.
Children
No Data