agave-jobs/jobs-core/src/main/java/org/iplantc/service/jobs/managers/launchers/WrapperTemplateMacroResolver.java
/**
     * The raw {@code wrapperTemplate} generated from the {@link Software} asset to run as the executable on the
     * remote system. This method resolves any macros in path (not the actual file), and returns it for use building
     * the submit command.
     *
     * @param wrapperTemplate the template to resolve
     * @return the resolved {@code wrapperTemplate} filtered for any job macros
     * @throws JobMacroResolutionException when the execution system or batch queue is not available
     */
The raw  wrapperTemplate generated from the  Software asset to run as the executable on the
remote system. This method resolves any macros in path (not the actual file), and returns it for use building
the submit command.

@param wrapperTemplate the template to resolve
@return the resolved  wrapperTemplate filtered for any job macros
@throws JobMacroResolutionException when the execution system or batch queue is not available
The raw wrapperTemplate generated from the Software asset to run as the executable on the remote system . This method resolves any macros in path ( not the actual file ) and returns it for use building the submit command . @param wrapperTemplate the template to resolve @return the resolved wrapperTemplate filtered for any job macros @throws JobMacroResolutionException when the execution system or batch queue is not available
public String resolve(String wrapperTemplate) throws JobMacroResolutionException
    {
        String resolvedTemplate = resolveJobAttributeMacros(wrapperTemplate);
        resolvedTemplate = resolveJobStatusMacros(resolvedTemplate);
        return resolvedTemplate == null ? "" : resolvedTemplate;
        try {
            ExecutionSystem executionSystem = getExecutionSystem();
            if (StringUtils.isBlank(executionSystem.getStartupScript())) {
                return null;
            }
            else {
                String resolvedStartupScript = executionSystem.getStartupScript();
                for (WrapperTemplateAttributeVariableType jobMacro: WrapperTemplateAttributeVariableType.values()) {
                    resolvedStartupScript = StringUtils.replace(resolvedStartupScript, "${" + jobMacro.name() + "}", resolveJobAttributeMacros(getJob(), executionSystem, jobMacro));
                }
                for (WrapperTemplateStatusVariableType macro: WrapperTemplateStatusVariableType.values()) {
                    wrapperTemplate = StringUtils.replace(wrapperTemplate, "${" + macro.name() + "}", macro.resolveForJob(getJob()));
                }
                return resolvedStartupScript;
            }
        } catch (SystemUnavailableException e) {
            throw new JobMacroResolutionException("Execution system " + getJob().getSystem() +
                    " is no longer available to resolve batch queue for job " + getJob().getUuid());
        }
    }
public String resolve ( String wrapperTemplate ) throws JobMacroResolutionException { String resolvedTemplate = resolveJobAttributeMacros ( wrapperTemplate ) ; resolvedTemplate = resolveJobStatusMacros ( resolvedTemplate ) ; return resolvedTemplate == null ? "" : resolvedTemplate ; }
The raw {@code wrapperTemplate} generated from the {@link Software} asset to run as the executable on the
 remote system.
The raw { @code wrapperTemplate } generated from the { @link Software } asset to run as the executable on the remote system .
// //        try { //            ExecutionSystem executionSystem = getExecutionSystem(); // //            if (StringUtils.isBlank(executionSystem.getStartupScript())) { //                return null; //            } //            else { //                String resolvedStartupScript = executionSystem.getStartupScript(); // //                for (WrapperTemplateAttributeVariableType jobMacro: WrapperTemplateAttributeVariableType.values()) { //                    resolvedStartupScript = StringUtils.replace(resolvedStartupScript, "${" + jobMacro.name() + "}", resolveJobAttributeMacros(getJob(), executionSystem, jobMacro)); //                } // //                for (WrapperTemplateStatusVariableType macro: WrapperTemplateStatusVariableType.values()) { //                    wrapperTemplate = StringUtils.replace(wrapperTemplate, "${" + macro.name() + "}", macro.resolveForJob(getJob())); //                } // //                return resolvedStartupScript; //            } //        } catch (SystemUnavailableException e) { //            throw new JobMacroResolutionException("Execution system " + getJob().getSystem() + //                    " is no longer available to resolve batch queue for job " + getJob().getUuid()); //        }