Howto use field injection with JS task listener


I was wondering if it is possible to use field injection to pass a value to Javascript in a task listener?

Essentially I’d like to use the same bit of JS for “create” and “assignment” events on a task as the code is almost identical and needs to do something slightly different depending on the event type. This would avoid cut and paste and repeating myself.

Any example code would be greatly appreciated if you have done this.

Many thanks!

For my particular use case, I’ve now solved this as it turns out that you can access the event name in the JS using: task.eventName

1 Like

Hi @IanS,

Great you could solve your problem. For completeness: Field injection is only supported for Java delegation code.