I have a workflow comprising of service tasks and user tasks but mostly my question is related to member variables in java code of corresponding service tasks.
I’ve implemented java logic for corresponding service tasks.
So, for “TaskOne” service task, I have configured variables in execution listener like this:
Now there is a java code which will be used for the event “emailNotificationDelegate”, I will have 2 member variables like this:
FixedValue toAddress;
FixedValue ccAddress;
So, all the service tasks where this event is configured will execute the same java code.
My question is, for first service task, I have configured values: toAddress and ccAddress.
Are those values are saved throughout the process instance ?
Because if I configure only “toAddress” in remaining service tasks (which are executed at later stage), the value of ccAddress which is configured in first service task(wxyz@gmail.com) is also used, event though i do not configure ccAddress key.
I was expecting ccAddress field to be empty or having null value but the value just gets carried forward for all the remaining service tasks
Is there any way I can make sure only values which are configured in listener are available in java code?