informaticainformatica-powercenter

How to Pass Workflow Variable to Worklet


I have a persistent workflow variable $$COUNTER with a type of integer and default value of 0, and a persistent worklet variable with a type of integer and default value of 0.

In the workflow, I have an assignment task which increment $$COUNTER. I want to pass $COUNTER value to $$COUNTER_WL.

I already add this config on my worklet. Worklet Setting

However, it doesn't seem that the workflow variable was passed. Here's some log snippets that I found relevant:

Message: Use persisted repository value [0] for user-defined workflow/worklet variable:[$$COUNTER_WL].
Message Code: LM_36505
Message: Link [wl_Test: Start --> dcs_Counter_Checker]: empty expression string, evaluated to TRUE.
Message Code: LM_36546
Message: Decision task instance [wl_Test]: condition is TRUE for the expression [$$COUNTER_WL=0].
Message Code: LM_36488
Message: Session task instance [wl_Test.s_m_Test] : [VAR_27028 Use override value [0] for user-defined workflow/worklet variable:[$$COUNTER_WL].]
Message Code: VAR_27066
Message: Worklet variable name: [$$COUNTER_WL], run instance name [], persisted value: [0].
Message Code: VAR_27066
Message: Workflow variable name: [$$COUNTER], run instance name [], persisted value: [1].

How do I pass the workflow variable to my worklet?


Solution

  • Apparently the settings are already correct.

    It seems that if you want to test whether the workflow variable value has been passed to the worklet variable, you need to start your workflow from session placed before the worklet (start workflow from task on session before the worklet). You cannot start task on the worklet session or else your workflow variable won't be passed to the worklet's.