Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: Tim MeagherHi,
This probably depends on the structure of the graph somewhat, and if there are nodes connected to outputs or outclocks of the sub-composite which should or should not run depending on whether or not the sub-composite gets run.
If the main composite itself needs to complete obut the nodes within the sub-composite to trigger
However, in general, this sort of behavior can be done via placing a filter node which checks the current day of the week and then uses the BRAINscript setSuccessReturnCode function to determine whether nodes which use the filter nodes output data will execute.
I've attached an example to show how this can be done.
Bear in mind that any nodes within the sub-composite which don't take input will execute.
If you have nodes within the sub-composite which don't take any inputs and which also shouldn't be run on Mondays, then you would need to also connect the output of the filter node to the inclock of the sub-composite and change the setSuccessReturnCode to 200.
In that case, you would then need to wire the outclocks of all of the other end-point nodes within the main composite (in my example, this would be the node "Other Node", "Some Other data Path", "Some Other Data Path 2") to the composite outclock. This would ensure that nodes clocked to the output of the main-composite node would not execute until those nodes have been executed.
In such cases, however, you can't configure clocked downstream nodes to execute only after all nodes within the Main composite that should execute have executed. In my example, this means that you could configure the "Additional Clocked Processing" node to wait until all of the nodes except for the sub-composite had completed execution. If it was Monday and the sub-composite was to be executed, then the "Additional Clocked Processing" node would not wait until the sub-composite had completed.
Hope this helps ... If it makes sense... Not sure I explained well.
Tim.
Attachments:
RunSubCompositeOnlyOnMonday.brg