How to find Process Definitions Associated Process Email Templates

Dear All,

We want to find out Process Email Templates used in each BPM, can you please suggest best way to find Process Definitions Associated Process Email Templates.

Thanks,

Shreya

Parents
  • Hello 

    From the Sugar graphic interface, you'll need to navigate to the Designer of your Process Definition and open the settings of each Message event to see the related Process Email Template name. 

    If you have access to the Database I believe you can list all the Process Email Templates related to a given Process Definition ID with the following query: 

    SELECT def.prj_id as ProcessDefinitionID,def.evn_criteria as EmailTemplateID ,templ.name as EmailTemplateName
    FROM pmse_bpm_event_definition def, pmse_emails_templates templ
    WHERE def.prj_id='<ProcessDefinitionID>'
    AND def.evn_criteria=templ.id;


    Can you give it a try and let me know if this works for you? 

    I hope this helps. 

  • Dear ,

    Thanks for the response, I m trying to get process definition name, please check below query:

    SELECT def.pro_id as ProcessDefinitionID,pmse_project.name as ProcessDefinitionName,def.evn_criteria as EmailTemplateID ,templ.name as EmailTemplateName
    FROM pmse_project
    LEFT JOIN pmse_bpm_event_definition def
    ON def.pro_id = pmse_project.id
    LEFT JOIN pmse_emails_templates templ
    ON templ.id = def.evn_criteria
    WHERE pmse_project.prj_status = 'ACTIVE' AND pmse_project.deleted = 0;

    Above query is not working...

    Thanks,

    Andre

  • Hello 

    There was a typo on my query that you copied into yours, on the Select it should be def.prj_id instead of def.pro_id.

    I corrected it and added a line to exclude rows with empty template names. Let me know if this works for you. 

    SELECT def.prj_id as ProcessDefinitionID,pmse_project.name 
    as ProcessDefinitionName,def.evn_criteria as EmailTemplateID ,
    templ.name as EmailTemplateName FROM pmse_project 
    LEFT JOIN pmse_bpm_event_definition def 
    ON def.prj_id = pmse_project.id 
    LEFT JOIN pmse_emails_templates templ 
    ON templ.id = def.evn_criteria 
    WHERE pmse_project.prj_status = 'ACTIVE' 
    AND pmse_project.deleted = 0
    AND templ.name IS NOT NULL;


  • Dear Andre,

    If I run above query then it's not fetching all process definitions email template even though 

    pmse_project.prj_status = 'ACTIVE'.

    Can you please check.

    Is "pmse_bpm_event_definition" table contains entries for process definitions events which are triggered?

    Thanks,

    Shrey 

Reply Children