I'm trying to start one workflow from another. One of the things I would like to pass to the second workflow is the initiator of the first one.
However, when I try to log the value in the console like this:
def initiatorVarTest = {{initiator}}
loggerApi.info('Initiator: ' + initiatorVarTest)
I see the following in the console: Initiator: Script31$_run_closure3@6d9d597c
How can I extract the user email from the auto-generated initiator variable?
Originally I had this {{initiator}} line in the builder to start another workflow, but there I got the error that it's expecting a string and that this method cannot handle Script31$_run_closure3@6d9d597c.
I used How to get all method names of a class without inherited methods with Groovy? to find out what methods this class has.
Which returned:
I then used:
to get the initator email.