Create Event to trigger workflow - not working

Ed1
Kilo Contributor

Hello,

i am testing on a dev environment.

I have added in Map Transform a onComplete script to send an Event:

i tested these 2 methods:

var e = new GlideEvent("my_import_servers_1", "", "", "");
e.insert();

and tested also:

gs.eventQueue('my_import_servers_1', "", "", "");

 

In SystemLogs/Events i well see my Event after the transform so it seems to work.

 

In The Flow designer i have added a trigger on this type of Event:

find_real_file.png

But this is never triggered. But if i enter the event and update it of click on reprocess Event, the flow is well triggered.

 

Am i missing something when i create the Event in javascript in onComplete?

 

Thank you for your help

 

1 ACCEPTED SOLUTION

Oh ok,

You can take a look at following link:

 

Script with flows

So, instead add an event to trigger the flow, you can execute the flow with script using the flow API

Hope it helps,

Thanks

View solution in original post

11 REPLIES 11

Alejandro RP
Kilo Guru

Hi,

Maybe you can try with trigger = created, instead of created/updated.

Hope it helps,

Thanks.

Ed1
Kilo Contributor

Hello,

 

Thank you for your reply. I already did it at the beginning but just to be sure i just retried. No difference.

Driving me nuts, it's not triggering the flow (i am waiting a long time to be sure the queue is not busy) but if i just click on 'Reprocess Event' the flow there is triggered and processed.

 

Not sure what is done when reprocessing that is not done with:

gs.eventQueue("my_import_servers_1", current, import_set.sys_id, map.sys_id);

 

Thanks

Oh ok,

You can take a look at following link:

 

Script with flows

So, instead add an event to trigger the flow, you can execute the flow with script using the flow API

Hope it helps,

Thanks

Ed1
Kilo Contributor

Sorry didn't see your reply, i had to click on show reply.

 

I will have a look thanks.