Skip to main content

Hi All,

I'm trying to create a reusable UDA that would grab any workflow variables that were populated in that particular workflow, and shoot those off to a table in SQL for storage and reporting. Being a UDA, I don't want to specify which workflow variables should be grabbed in each individual scenario and would prefer if there is a way that the UDA could just grab whatever workflow variables were present in that particular workflow.

Can anyone think of a way to do this?

thanks

UDA's content is inserted into workflow in place of UDA action/icon. 

so UDA's content share hosting workflow context and have access to all hosting workflow variables.

that said, you can not dynamically enumerate/determine hosting workflow variables, but if you follow the same namings across different workflows you should be able to achieve what you ask for.

however, I think it's much better approach to handover data between workflow and UDA via parameters. that way you (and everyone else who uses the UDA) know what inputs UDA expects and you don't need to remember variable names and always study what's being done with them within UDA.


Thanks Marian. Helpful as always.

Can you elaborate a bit on what you mean by passing the parameters to the UDA? Just want to make sure I am correctly understanding you!


every UDA allows you to define its input and output parameters


Thanks Marian. 

So in your example, "InputString" exists where? Is it a variable in the parent workflow where the UDA resides?


it's UDA's parameter.

when you place an UDA on design canvas and open configuration dialog you will be asked to to provide a value for InputString to pass it in to UDA and provide a variable for OutputNumer to store a return value from UDA.

it will be just the with every UDA usage instance.

take it like an input and output parameters of a procedure in standard programming


Thanks. Figured that out after. Sorry for being so thickheaded! 


Reply