Tyler_Auerbeck_8064

Email notification grabbing old value for variable during workflow

Discussion created by Tyler_Auerbeck_8064 on Jun 10, 2016
Latest reply on Aug 5, 2016 by Tyler_Auerbeck_8064
We currently have a workflow that executes three sql jobs, which store various outputs in a static variable during their run. Once all three of the sql jobs end in any_ok, the next step is an email notification. This step then loads variables and executes in the following manner:

:read &UC_CAUSE_NAME,,,
:read &UC_CAUSE_NR,,,
:read &UC_CAUSE_STATE,,,
:read &UC_CAUSE_RETCODE,,,
:set &ENV = GET_VAR(APP.ENV,"Environment",1)
!
:put_att SUBJECT = "App Report - &DBMENV"
:set &PROV# = Get_Var(APP.CONFIG,"ENV1",2)
:set &CCHIE# = Get_Var(APP.CONFIG,"ENV2",2)
:set &HP# = Get_Var(APP.CONFIG,"ENV3",2)

:set &parentname# = SYS_ACT_PARENT_NAME('ACT')
:set &parentnr# = SYS_ACT_PARENT_NR('ACT')
:set &parenttyp# = SYS_ACT_PARENT_TYP('ACT')
:set &date# = SYS_DATE_PHYSICAL('YYYY-MM-DD')
:set &time# = SYS_TIME_PHYSICAL("HH:MM:SS")

The problem I'm seeing is that whenever the email notification runs, it's actually grabbing the value of the variable that was set prior to the current run of the workflow instead of the values that had been set in the previous step of the workflow. Is there some way to "refresh" the variable values in the email notification so that we can make sure it has the latest value? Or is there a better way to be doing this?

Outcomes