dtms: added Before Script and After Script to the model