Are you submitting multiple jobs within the same script, or do you run the script multiple times and need to figure out what the job IDs was after a submission from a day ago?
In the former case, there is usually no need to ask the Repository about your Job IDs, because you are performing the submissions, and you can fish out the JobID right after the first submission, and stuff it in the array yourself before setting the bitarray and firing the next submission. (However, it appears that the option for getting only the user’s jobs does not work right, as you mentioned. I will investigate).
You will notice that in many places in SubmitMaxToDeadline_Functions.ms, when we finish waiting for the DeadlineCommand to complete, we then call
renderMsg = SMTDFunctions.getRenderMessage() --this gets the render message
SMTDFunctions.getJobIDFromMessage renderMsg --this extracts the Job ID from the message body
SMTDSettings.DeadlineSubmissionLastJobID --this is the property that will now contain the Job ID
So you can call these functions after the first job submission, and this gives you the ID of the job to depend on (I assume that is the Fume sim job).
Then you can stuff the ID into a sub-array in either the SMTDSettings.JobsArray which is normally populated by the SMTDFunctions.CollectJobs() function, or into the SMTDSettings.PreviousJobsArray which is normally populated by SMTD each time a job is submitted via its UI.
If you want, you can output the IDs to a text file or INI file so you can grab them later (even the next day) when you need to submit a new job in a new session that depends on jobs from the previous day/session.
But right now I assume you want to submit a pair of jobs where the one is dependent on the other within the same script run.
I would suggest using SMTDSettings.PreviousJobsArray and setting the SMTDSettings.DependOnPreviousJobMode to #previous mode.
In other words,
SMTDSettings.DependOnPreviousJobMode = #previous --can use any or all entries from the SMTDSettings.PreviousJobsArray list
SMTDSettings.DependencyJobItems = #{1} --use only the first entry
--Now set the array to only the previous job's info,
--the only thing that really matters is the second item, the Job ID, so we can leave the rest empty
SMTDSettings.PreviousJobsArray = #(#("",SMTDSettings.DeadlineSubmissionLastJobID,"","","","","")
If you call SMTDFunctions.CreateSubmitInfoFile() after this, the code block responsible for dependencies will take the first sub-array from the SMTDSettings.PreviousJobsArray array and use its second element to set the dependency.
If you need to make your job dependent on multiple Job IDs, you can set the bitarray to multiple indices, populate the PreviousJobsArray with any number of entries with their own Job IDs you collected after submitting each of your jobs, and the next job will become dependent on all of them.
So as long as you collect the IDs after each call to SMTDFunctions.waitForCommandToComplete(), there is no need to ever ask the Repository for the Jobs, wait for 15 seconds, be annoyed and blame me for the pain
Explaining a bit more about what the script is meant to do might make it clearer in my head what your problem really is…