Executing JavaScript as business rules