    if ( params.platformHTTP != null ) {
        beforeScript "PATH=${workflow.projectDir}/bin:\$PATH; export PATH; set_dotfiles.sh; startup_POST.sh $params.projectId $params.pipelineId {{ pid }} $params.platformHTTP"
        afterScript "final_POST.sh $params.projectId $params.pipelineId {{ pid }} $params.platformHTTP; report_POST.sh $params.projectId $params.pipelineId {{ pid }} $params.sampleName $params.reportHTTP $params.currentUserName $params.currentUserId {{ template }}_{{ pid }} \"$params.platformSpecies\" {{ overwrite|default("true") }}"
    } else {
        beforeScript "PATH=${workflow.projectDir}/bin:\$PATH; set_dotfiles.sh"
        }