copy functions used by dakota service from Contexts to ContextUtil