Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Problem with Event

poyntzj
Kilo Sage

We have a notification setup in the sc_req_item table

We we have created an Event in the Event Registry and associated it to the sc_req_item table

We have a workflow that is using the Create Event option and is passing the sys_id of the requested item

I can see from the Event log that the event is called, the sys_id is passed as Parm1; Parm2 is null and the table is sc_req_item

The Event has processed with no errors, however I do not get the notification

If I use the gs.eventQueue command via a background script, I can see exactly the same issue.

What i have found, is that if by using gs.eventQueue I omit the table, it processes and I get the notification.

Anyone got any ideas on why this would be as I am at a loss.

Cheers

1 ACCEPTED SOLUTION

As the notification has to be sent to a "To" address, and email.addAddress does not support adding a "to", I had to change how this ran


instead of Creating an Event in the workflow I now run a script


It has to get the recipient address and now adds that as Parm1 and the sys_id as Parm2.


all good.



Cheers


View solution in original post

10 REPLIES 10

Kalaiarasan Pus
Giga Sage

Can you paste a screenshot of the notification ?


Hi


files attached


Event is the event registry


notification is the notification


processed is the one that is failing - it as sc_req_item as the table


processed2 is the one that works, - nothing in the table field



Normally I call events via a BR or script, but it is the first time we are looking to use the Create Event feature of a workflow



Cheers


Is there something on Notification that is failing this ? Can you remove everything from the notification and just have subject and a hardcoded user as the receiver and see if the mail is going or not ?



I just tried in demo and it works for me ....


I can, but running these two commands



gs.eventQueue("Tableau_workflow_notification","","","219ffff36f0e71007e874c871e3ee4f6",null);


gs.eventQueue("Tableau_workflow_notification","sc_req_item","","219ffff36f0e71007e874c871e3ee4f6",null);



the top one runs as the table is blank


the bottome on does not as the table is sc_req_item



I'll do a couple more tests in a short while.


Something has just cropped up at work