This model demonstrates the backtracking
functionality, new in 6.1. This is a
backtracking version of this demo.
TrialModule is a module that computes
capitalized string of the input string. We
have a "trial" version of this module, which
allows only 3 times of usage. After three
outputs, the trial expires and the module
outputs only empty strings to the "output"
port, and true values to the "error" port.
The Backtrack actor is used to "hack" this
module. A checkpoint will be created at the
first invocation of the module. The
checkpoint handle is recorded in the
ResourcePool. Every time the module
outputs error, the Backtrack actor restores
its state with the checkpoint. The module
then considers itself not expired, and
continues to work.