Triggering custom Event from Workflow

Joe Taylor
Giga Guru

Hello,

  I'm trying to trigger a custom event from a specific workflow, but am having troulble.

  My catalog item "Employee Onboarding" triggers a workflow called "Employee Onboarding".

 The first step in the workflow is a group approval for the HR Dept.

  I want to send a custom email approval notification to this group from the sysapproval_approver table, not the OOB one.

  I have created a Notification called "Approval RITM for Onboarding".  

  This notification refers to an event I created in the Registry called "Employee_Onboarding_Approval".

  The issue is, I don't know how to trigger this event from my onboarding workflow approval step.

  I'm assuming I need to use a script in the "Advanced" box, but don't know exactly what it should say.

 Here's what I have so far:  gs.eventQueue('Employee_Onboarding_Approval',current,gs.getUserName(),gs.getUserID());

Help!

  

13 REPLIES 13

Yash Agrawal1
Tera Guru

Hello Joe,

gs.eventQueue is correct to trigger event from workflow notification.If you are facing issue,will you please share your sciipt.

Regards

Yash Agrawal

Joe Taylor
Giga Guru

You mean my script in the approval activity?

 

Here it is:

 

gs.eventQueue('Employee_Onboarding_Approval',current,gs.getUserName(),gs.getUserID());

 

Hello Joe

The script is right.

1. Go to event log and check if your event is triggered or not

2. Is your notification listening to that event or not. Check that.

3. Both event and notification should be on the same table, only then your notification will be triggered.

Once you check, let me know if anything is not working.

Joe Taylor
Giga Guru

1.  My event is being triggered, but the event log shows the triggering event is "ritm_approval" not "Employee_Onboarding_Approval" like I want.

2.  I attached a snapshot of my notification

3.  I just noticed there is a custom business rule that handles all approvals (change, sctask, ritm, etc.)

It is what is triggering the "ritm_approval" event.