Workflow Wait for event - how to wait for specific event (parm etc.)???

Zod
Giga Guru

Just a quick one ... if I have a wait for event condition, how to I specify the event correctly?

I mean the event might happen often, but I'm locking for one matching a specifig sys_id (for example).

Lets say I have the change request sys_id and like to wait for event "change_complete" for this specific id?

How to set the condition in the Wait Condition?

Thank you!!

3 REPLIES 3

Syvo
Mega Guru

Hi Zod,

AFAIK, the Wait for WFEvent activity will only trigger if the event is aimed specifically at the record which the workflow instance is attached to.

////where current is a task record with a workflow context
var w = new Workflow(); 
w.fireEvent(current, 'execute');

Daniel Oderbolz
Kilo Sage

There is an activity called "Wait for Event w/ parameters", which looks as if it can be used in this context.
I created a business rule that sends an event (here called "some.event") and I pass the sys_id of a record stored in the scratchpad in param1 of the event.

Then, I tried this for the configuration of "Wait for Event w/ parameters":

find_real_file.png

But, alas, this does not work...

Did anybody get this (undocumented!) activity to work?

Best
Daniel


If this answer was helpful, I would appreciate if you marked it as such - thanks!

Best
Daniel

Hi Daniel,

the activity works great, but the format of parameter 1 is wrong.

Type following in parameter 1:   

javascript:workflow.scratchpad.task_id

 

The event can be fired by (use the appropriate sys_id!)

gs.eventQueue("some.event", current, "bcbecf78dbc8c890692c70ba6896195c", null);