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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2018 05:11 AM
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!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2018 05:35 AM
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');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2018 07:09 AM
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":
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2019 07:15 AM
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);