CBool : I had tried many things and thought it was safe to say
It works in your test script. With JavaScript, even if the file has a different name, it also works with VBScript.
I’ll try if the error stays if I remove everything else from our script.
The complete script looked like this, inside a child target page
' BeforAction
Action.LimitThreads = True
Action.MaxThreads = Min(FBVariables.NUMBER_OF_PROCESSORS * 2, 15)
Action.DisableAsync = FBVariables.DisableMultiThread
' After Action (Reset so that no change is saved in the .fbp8)
Action.MaxThreads = 20
Action.DisableAsync = False
this is how it works at the moment if FBVariables.DisableMultiThread then Action.MaxThreads = 1 'Action.DisableAsync = FBVariables.DisableMultiThread
Since this happened on another target page and the error went unnoticed at first because nothing was visible afterwards, there is now a test.
with DisableAsync the error almost always occurs (FB 8.0.0.3052), but currently I’m using MaxThreads=1.
' AsyncActionGroup: BeforeAction
FBVariables.zTempA = False
Action.LimitThreads = True
Action.MaxThreads = Min(FBVariables.NUMBER_OF_PROCESSORS * 2, 15)
Action.DisableAsync = FBVariables.DisableMultiThread
' AsyncActionGroup: AfterAction
if not FBVariables.zTempA then
call Err.Raise(1, "FinalBuilder", "Action wurde nicht ausgeführt")
end if
' First ChildAction: BeforeAction
FBVariables.zTempA = True
Unfortunatley this isn’t going to work how you think it would because the AfterAction event fires before the child actions are run. So the AfterAction script is actually pulling the rug from under the internals of the action (something we will need to look at).
This is just how it has always been… a design decision I regret but changing it would be a major breaking change. I will look at adding a new AfterChildActions event in FB9.
We made some changes to this action that it captures the properties of the action when execution starts, this way changes to properties of the action in the afteraction script event will not impact on execution.