What I normally do when I'm creating a "utility" Project (as you are doing in this case) is to prefix the vars needed within the Utility to something specific to that Utility. An abbreviation or something. Then, I know what I'm getting when I get there as well as remove the possibility of cross contamination with other projects.
Inside the Utility ForEach loop, use a FileList var like:
Then, create the same FileList var inside your calling Project (or Monitor) using that same syntax.
I always add a Parameter (Variable) to my "Utility" Project matching any value I pass into that Utility for testing and/or definition of what the variable is and where it comes from.
Code: Select all
<project name="My Utility" mainModule="Main" version="2.0" logevel="silent" threadSafe="true">
<variable name="myU.JobDIR" value="I" description="(I)nbound (O)utbound " />
<variable name="myU.JobMODE" value="Q" description="(Q)A (D)ev (P)rod (S)taging" />
<variable name="myU.JobGROUPID" value=" " description="GroupID to process" />
Even if you're calling the project with a Monitor, Scheduled Job or Trigger (GAS).
From the Monitor | Action Tab, you add variables that give you what you need to pass to the Project. In this instance, you would create the FileList from the Monitor, and make the FileList Variable Name as "pfl.FileList" or whatever you are looping through within your Utility. That way the FileList becomes available to you from any location.