protected ExecutableScript parseScriptResource(String resource, String language, CmmnHandlerContext context) {
if (StringUtil.isExpression(resource)) {
ExpressionManager expressionManager = context.getExpressionManager();
Expression scriptResourceExpression = expressionManager.createExpression(resource);
return new DynamicResourceExecutableScript(scriptResourceExpression, language);
}
else {
DeploymentEntity deployment = (DeploymentEntity) context.getDeployment();
String scriptSource = ResourceUtil.loadResourceContent(resource, deployment);
return parseScript(scriptSource, language);