Variables scope and buffers

Discussion created by MarcoTizzoni604411 on Jul 27, 2017
Latest reply on Jul 27, 2017 by MarcoTizzoni604411
Hi everybody,
is there a document or anybody who can explain the different buffers used to store variables and prompts, variables scope and variables resolution. It is really hard to design workflows that can be reused and triggered at different level. 

For instance, I learned the hard way that if a workflow WF.A has a prompt PRPT set and it triggers a WF.B via AC_ACTIVATE_OBJECT with PASS_VALUES, WF.B inherits all variables in PRPT. However, if WF.A uses the function :PUT_PROMPT_BUFFER to set a variable to a specific value, the change it is not passed to WF.B.

For this work, WF.B needs to have PRPT set as well. However, with this setup if any variable values is changed at the prompt pop-up the new values gets overridden in WF.B, so WF.A sees the new values while WF.B the default. 

To workaround the issue I coded this horrible piece of code in WF.B process tab:
I guess it reads the &BASE_FILENAME# variable from the input buffer and puts it in a script variable.