I'm having trouble resuming swift-jobs.  When resuming, it goes through 'Initializing' every single job in the workflow and just finishes without actually picking up where it left off.  Below is the swift script. <div>

Thanks</div><div>Michael </div><div><br></div><div><br></div><div><div>## type declarations:</div><div>type file{}</div><div>type Rscript;</div><div><br></div><div>## Mediator app declaration:</div><div>app (external turn) run_query (string med_args, file config, Rscript code, file Annot){</div>

<div>    Mediator med_args @filename(code) @filename(Annot);</div><div>}</div><div><br></div><div>## this process sets parameters and calls Mediator:</div><div>loop_query(int vert, string user, string db, string host, string query_outline, Rscript code, file config, string subject, string h, int beginTS, int endTS, file Annot){</div>

<div>    string outPrefix = @strcat("gest_vs_nogest_vert",vert,h);</div><div>    string med_args = @strcat("--user ","andric"," --conf ", @filename(config)," --db ", db," --host ", host,</div>

<div>        " --vox ", vert," --subject ", subject," --subquery tsTSVAR"," --begin_ts ",beginTS," --end_ts ",endTS,</div><div>        " --query ", query_outline," --r_swift_args ",outPrefix," ",vert," ",h," ",subject, " --outprefix ", "FAH_Q", " --r_script ",@filename(code));</div>

<div>    external turnpt = run_query(med_args, config, code, Annot);</div><div>}</div><div><br></div><div>## needed parameters to use Mediator:</div><div>string user = @arg("user");</div><div>string db = "HEL";</div>

<div>string host = "<a href="http://tp-neurodb.ci.uchicago.edu">tp-neurodb.ci.uchicago.edu</a>";</div><div>file config<single_file_mapper; file="user.config">;</div><div><br></div><div>## mapping the R code:</div>

<div>Rscript code<single_file_mapper; file="Rturning/turnchi_ss2.R">;</div><div>file Annot<single_file_mapper; file="Rturning/resampled_coding_CarStory.txt">;</div><div><br></div><div>## variables to move across in the foreach loops:</div>

<div>string declarelist[] = ["ss2"];</div><div>string hemilist[] = ["rh"];</div><div>int vertices[] = [1:155991:1];</div><div>#int vertices[] = [0:1:1];</div><div><br></div><div>foreach subject in declarelist{</div>

<div>    foreach h in hemilist{</div><div>        int beginTS = 0;</div><div>        int endTS = 1254;</div><div>        string query_outline = @strcat("SELECT SUBQUERY FROM ",subject,"TS_data",h," WHERE subject = '",subject,"' AND vertex=VOX");</div>

<div>        foreach vert in vertices{</div><div>            loop_query(vert, user, db, host, query_outline, code, config, subject, h, beginTS, endTS, Annot);</div><div>        }</div><div>    }</div><div>}</div></div>