FB 5.5
Short Q's:
-
Are action list parameters stored globally or is there a separate instance of the parameters for each action list if run multiple times in an Async Action Group?
-
Can an action list parameter be passed to a project variable in a project that the action list includes? I'm having trouble getting this to work (see below).
More Info:
I run an automated build to compile several apps within a source control branch every half hour but as I now have multiple source branches building them sequentially takes longer than half an hour. Running them asynchronously would improve things quite a bit (many of the actions are CPU or network bound).
I want to be able to build more than one branch simultaneously using an Async Action Group. It would be great to have async iterators (in my case the INI File iterator as an INI file lists which branches to build). I know that's on the to-do list.
I have a couple of action lists for re-use and have created an Async Action Group containing one child action for each branch (it's more complex than that as the number of branches cannot be pre-determined, there could be many, so I have a set of 20 Run Action List child actions and they figure out which branch they need to build if any - but this is essentially what happens). Here's a conceptual overview:
Main Project
Main Action List
- Async Action Group [max threads=2]
-- Run Action List BuildBranch (set branch_name=A)
-- Run Action List BuildBranch (set branch_name=B)
-- Run Action List BuildBranch (set branch_name=C)
-- Run Action List BuildBranch (set branch_name=D)
BuildBranch Action List (parameter: branch_name)
- Do some stuff
- Run Action List Build (set branch_name=%branch_name%)
Build Action List (parameter: branch_name)
- Include Project CommonBuildConfig (set branch_name=%branch_name%)
- Do a lot of other stuff
CommonBuildConfig Project (project variables: branch_name, aaa, bbb, ccc)
Main Action List
- Get some info based on %branch_name%
- Set variables aaa, bbb, ccc (passed back to host project)
Question: If the BuildBranch and Build action lists get run asynchronously can the value of their branch_name parameter be different for each instance of each action list?
Problem: The action lists successfully set the branch_name parameter of the action lists they call but the BuildActionList is not able to pass the value of its branch_name parameter to the branch_name variable in the CommonBuildConfig project. Here are the properties for the Build Action List's Include Project CommonBuild action:
- Reload environment variables: checked
- Share host project variables namespace: checked (might have to re-think how to pass back variables as this project is run asyncrhonously)
- Set variables before loading: branch_name to %branch_name%
I am able to set project properties in included projects in cases where I am not sharing the host project variable namespace. Is sharing the variable namespace preventing the setting of the included project's variable?
Cheers,
Jarrod Hollingworth