Controlling Process Runner from external process with Return Code

Previous  Home  Next

External process can tell Process Runner if it should continue further or stop.  External process can return 0 to indicate that there was no problem and Process Runner should continue further. Or it can return 1 and indicate that there was a problem and Process Runner should not continue further.

 

Note: This works only if you asked Process Runner to wait for external process. If Process Runner was setup not to wait, it will ignore Return Code and always continue further. Refer to table below for various possibilities.

 

Script Return

Wait Option

Stop On Error Settings

PR behavior

0

No Wait

N/A

Process Runner always continues further

1

No Wait

N/A

Process Runner always continues further

0

Wait until terminated

Unchecked

It waits till all messages are responded and then executes ahead

1

Wait until terminated

Unchecked

It waits till all messages are responded and then executes ahead

0

Wait until seconds (2)

Unchecked

It waits for 2 seconds to respond and then executes ahead

1

Wait until seconds (2)

Unchecked

It waits for 2 seconds to respond and then executes ahead

0

Wait until terminated

Checked

It waits till all messages are responded and then executes ahead since there is no error retuned by script

1

Wait until terminated

Checked

It waits till all messages are responded and then returns without  executing ahead

0

Wait until seconds (2)

Unchecked

It waits for 2 seconds to respond. If user responds during that time , error code is trapped and in this case there is no error so executes ahead. If used doesn’t respond during that time, it just moves ahead without trapping error code.

1

Wait until seconds (2)

Unchecked

It waits for 2 seconds to respond. If user responds during that time, error code is trapped and in this case there is error so execution stops. If used doesn’t respond during that time, it just moves ahead without trapping error code.

 

hmtoggle_plus1Example - VB Script File

 

 

Next:

Process Runner & SharePoint