|
hi, i'm trying to get the ExecutionCondition to work against a boolean value in the object being iterated. i.e.
<Action Name="GenerateStoredProcedures" Type="TextTemplateAction" Template="Text\Standard.t4" ForEach="$(TableEntities)" CurrentInputName="TableEntityInfo" IterationGroup="Create" Condition="$(TableEntityInfo.IsStandard)"> <Input Name="TableEntityInfo"/> <Output Name="Content" /> </Action>
but unfortunately the condition never fires. it has worked elsewhere (i fairly sure). although when i looked in reflector it seems to be looking for an attribute called "Condition" which i also tried with no sucess.
Is what i'm asking for possible??
Regards.
|
| mickdelaney Wednesday, August 08, 2007 1:44 PM |
Hi, could you finally implement any workaround for the scenario you had? Any luck?
Thanks, -Adrian
|
| Adrian Alonso Tuesday, August 14, 2007 1:52 PM |
I took a look at the code and it seems that the ExecuteCondition value is evaluated just using the DictionaryService so you won't be able to evaluate the current instance that is being iterate. I will check this with the rest of the SFT team if it's correct and how this issue could be fixed.
-Adrian
|
| Adrian Alonso Wednesday, August 08, 2007 2:37 PM |
thanks adrian, i guess i'll have to write my own service which also evaluates the entity itself..
|
| mickdelaney Wednesday, August 08, 2007 3:02 PM |
any luck with this adrian??? regards.
|
| mickdelaney Thursday, August 09, 2007 3:11 PM |
Hi, sorry so the late answer. I'm afraid the scenario is not supported for now. I wouldn't recommend you to implement your own service... I think it will be too hard. What it should be easier is to re-rewrite the TextTemplateAction. Unfortunately the TextTemplateAction is sealed so you won't be able to customize it but what it does is really simple. With a little help of Reflector you should be able to re-implement it adding support for evaluating the IsStandard condition in the exec method. You could also add a new output to the action in order to be able if the template was generated. I think this workaround should be enough to fix the issue.
I will try to push the support of being able to evaluate the condition using the instance being iterated in the next drops of SFT.
Just ping us if you need some help implementing the service or the custom TextTemplateAction.
HTH -Adrian
|
| Adrian Alonso Thursday, August 09, 2007 3:57 PM |
Hi, could you finally implement any workaround for the scenario you had? Any luck?
Thanks, -Adrian
|
| Adrian Alonso Tuesday, August 14, 2007 1:52 PM |
i didnt even start!! just have a lot of backlog items, so i just created 2 different receipes. not a great solution but for now its all i can do. i also toyed with the idea of putting the functionality into the actions but again didnt have time. maybe later. i'm hoping to get involved in the new repository factory so hopefully i'll pick up some knowledge from there.
|
| mickdelaney Monday, August 20, 2007 11:53 AM |