SAP RemoteTaskManager (JOBQ) with runtime parameter "Terminate automatically" does not terminate

Document ID : KB000087614
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Error Message :
N/A

The SAP RemoteTaskManager (JOBQ) with runtime parameter "Terminate automatically" in the Attributes tab does not terminate when no SAP job is found.  
This should only happen when "Terminate automatically" is not set.
When jobs are found, RemoteTaskManager terminates after the last found job finishes, which is the expected behavior.

Investigation

Step 1

Create RemoteTaskManager using runtime parameter "Terminate automatically":
 
0EMb0000001QfJ1.png

Step 2

Create intercepted Jobs in SAP:
 
0EMb0000001QfJ6.png:

Step 2a: OK Case

Execute RemoteTaskManager. Intercepted jobs execute and RemoteTaskManager terminates:
 
2016-12-19 13:37:35 - U2004115 Child job name = 'SCJ_INTERCEPT(13364500)', number = '4223673'.2016-12-19 13:37:35 - U2004115 Child job name = 'SCJ_INTERCEPT(13364700)', number = '4223674'.2016-12-19 13:37:35 - U2000005 Job 'SCJ_INTERCEPT' with RunID '4223673' started.2016-12-19 13:37:35 - U2004032 SAP job 'SCJ_INTERCEPT' with number '13364500' started successfully.2016-12-19 13:37:36 - U2004027 SAP job 'SCJ_INTERCEPT' with number '13364500' ended normally.2016-12-19 13:37:36 - U2000005 Job 'SCJ_INTERCEPT' with RunID '4223674' started.2016-12-19 13:37:36 - U2004032 SAP job 'SCJ_INTERCEPT' with number '13364700' started successfully.2016-12-19 13:37:37 - U2004027 SAP job 'SCJ_INTERCEPT' with number '13364700' ended normally.
Step 2b: NOT OK CaseExecute RemoteTaskManager. No intercepted job is available:
0EMb0000001QfJB.png

RemoteTaskManager stays active:
 
0EMb0000001QfJG.png

Statistics:
 
0EMb0000001QfJL.png


Reference
User Guide > Process Assembly Perspective > Defining Objects > Attributes Page
 
Cause:
Cause type:
By design
Root Cause: This behavior exists by design. The documentation was changed:
User Guide > Process Assembly Perspective > Defining Objects > Attributes Page
Resolution:
This field was added on 30/03/2017. This article has not been updated yet. Refer to the "Description" or "Workaround" sections for solution information.

Fix Version(s):
N/A
Additional Information:
Workaround :
Solution 1: Use “R3_ACTIVATE_INTERCEPTED_JOBS” instead of RemoteTaskManager.Disadvantage: Intercepted jobs cannot be processed in parallel.Solution 2Use “R3_GET_JOBS” to see whether there are intercepted jobs available.If so, activate RemoteTaskManager.If not, skip it.An example for solution 2 can be found attached (uc4_export_check_before_run_SAP_JOBQ.xml).
File Attachments:
uc4_export_check_before_run_SAP_JOBQ.xml