Millisecond Forums

Batch prematurely aborts after probablilistic reversal learning task

https://forums.millisecond.com/Topic26941.aspx

By SabRV - 5/9/2019

Dear all,

i have a Batch with a couple of tasks (Iowa Gambling Task, Probabilistic Reversal learning Task, Food Go No Go) and a couple of questionnaires.
The problem is now that whenever the batch comes to the PRL, it lets the task finish, but doesnt go to the next questionnaire in line. It doesnt matter on which position i put the PRL, the batch stops at the end of that task. If I put the PRL at the far end of the batch, i experience no problems with the whole batch. I need to put the PRL on second place however, 
Does anyone have an idea what the problem might be here?

Thanks so much in advance!

Best,
Sabrina
By Dave - 5/9/2019

SabRV - Friday, May 10, 2019
Dear all,

i have a Batch with a couple of tasks (Iowa Gambling Task, Probabilistic Reversal learning Task, Food Go No Go) and a couple of questionnaires.
The problem is now that whenever the batch comes to the PRL, it lets the task finish, but doesnt go to the next questionnaire in line. It doesnt matter on which position i put the PRL, the batch stops at the end of that task. If I put the PRL at the far end of the batch, i experience no problems with the whole batch. I need to put the PRL on second place however, 
Does anyone have an idea what the problem might be here?

Thanks so much in advance!

Best,
Sabrina

The PRL has various abort conditions, which lead to <block abortTask> being run. In that <block>, the script.abort() function is called.

<block abortTask>
/ trials = [1 = finish]
/ onblockend = [
values.abort = 1;
script.abort();
]
</block>

By default, the abort() function will terminate not only the currently running script, but also the entire <batch> if the script is being run by a <batch>. To avoid this, change the above <block> to

<block abortTask>
/ trials = [1 = finish]
/ onblockend = [
values.abort = 1;
script.abort(false);
]
</block>

which will only terminate the PRL, but not the overall <batch>.
By SabRV - 5/10/2019

Thank you so so much Dave!!!