斯潘8
斯潘4
I have created a custom looper transformer and embedded the saved FMX file.我可能(可能)做错了什么,或者丢失了循环器的一个键终止符,但是如果我手动设置最大迭代次数,结果很好。
例如,I am running a loop that calculates the cumulative effect of the data monthly meaning that I send the results of the sample out as well as loop them back in.Again,I have this part working perfect but I can't stop the machine at the end programmatically.要么天网正在学习要么我搞砸了。
我可以通过一个已发布的参数设置最大迭代次数,它可以按预期工作,但当我把这个交给一个不那么勤奋的客户时,我预见到了麻烦。If they want to run it iteratively for 3 years (of the dataset),他们必须手动输入36的最大迭代计数(现在是以月为单位设置的)。
I do have a calculated max column so if I could somehow set this via an attribute,一切都会好起来的。
有什么想法吗?
FME 2016.0.1构建16174。I have tried on both OSX and PC to no avail.
That is odd.我从来没有像你那样用过,但它应该工作对吗?
作为解决方法:如果变压器(回路部分)不包含任何阻塞变压器(例如FeatureHolder,特征合并等)您可以将“Enabled Blocked Looping”属性设置为“No”,然后自己退出循环。
只需按照通常的方式添加一个发布的参数(或者通过在导航面板中添加它,或者通过在输入端口上公开/添加一个属性)就可以保存最大迭代次数,例如马克斯泰尔然后添加一个AttributeCreator/Manager在将设置迭代计数属性的输入端口之后(例如_并给它一个0的值。在特性进入循环端口之前,添加一个Tester这将检查“iter”属性是否等于$(max)iter。连接传递到输出端口/分支,但未能连接到循环端口。最后,add anAttributeCreator/Manager在循环中,将+1(或任何步长)添加到Iter属性。
You should now be able to set the max iterations through another Published Parameter in your main workspace (or even an attribute!).
对,一些类型的阻塞变压器允许它,其他的不允许。
Always thought that was strange.
但是,您可以通过将阻塞转换器放入普通的自定义转换器来用脚本参数克服它。
The scripted parameter parameters need to be parameters.
These are then accesible trhough the normal "wrapping"customtrnasformer.
Like this:
包装器在哪里
The other way would be to put the calculations for max column inside a scripted parameter and use that.当然,它不能访问属性值,这可能是个问题。
That's interesting.我将向开发人员提交一个请求,因为我不明白为什么不能将其设置为属性。
我看到另一个选择是“打开文本编辑器”。你能从那里的属性中选择它吗?ie use @Value(
Filed as PR#68350 - but I'm not confident it's something we could do (or that any workaround I suggest would work)
?2019安全亚搏在线软件公司|合法的