PA_TASK_SUCCESS in clean script is not enough
To take a proper decision, we should have more information on the termination of the task corresponding to the clean script.
Today, we only have access to a boolean, PA_TASK_SUCCESS (http://doc.activeeon.com/latest/user/ProActiveUserGuide.html#_variables_quick_reference)
We should have the exitcode as well.
Actually, starting from release 7.28, we have also the exit code, if the main script execution is a bash task.
Here is an example of the variables printed in the cleaning script, it contains EXIT_VALUE:0 : [2017-06-28 15:21:28,443 4-thread-5 INFO o.o.p.s.u.TaskLogger] task 6t0 (Linux_Bash_Task) [PA_TASK_NAME:Linux_Bash_Task, PA_SCHEDULER_REST_URL:http://tryqa.activeeon.com:8080/rest, PA_TASK_ID:0, PA_NODESNUMBER:1, PA_TASK_PROGRESS_FILE:/tmp/PA_JVM893173936/SSH-local-0_2/6t0/-774154351/.tasks-progress/job-6-task-0-76c5d489-26f5-4b42-a501-c9911f96752b.progress, PA_SCHEDULER_HOME:/home/cperUser/opt/proactive/scheduling, PA_JOB_ID:6, PA_USER:viale, EXIT_VALUE:0, PA_NODESFILE:/tmp/PA_JVM893173936/SSH-local-0_2/6t0/-774154351/.pa_nodes_6t0, PA_TASK_REPLICATION:0, PA_TASK_ITERATION:0, PA_JOB_NAME:Untitled workflow 1, PA_TASK_SUCCESS:true]
Errata: actually the clean script contains all these bindings since many releases, it's only in case of a walltime that the bindings were not propagated before release 7.28
Ok so let's update documentation accordingly.
@fviale Here are the variables map of a clean script (main script in bash) scheduler ver 13.1.0
[PA_TASK_NAME:Groovy_Task PA_SCHEDULER_REST_URL:https://trydev2.activeeon.com:8443/rest PA_CATALOG_REST_URL:https://trydev2.activeeon.com:8443/catalog PA_TASK_ID:0 PA_NODESNUMBER:1 PA_NODE_URL:pamr://4097/On-Prem-Server-Static-Nodes__localhost__0_3 userspace:pappamr://4096/UserSpaces?proactive_vfs_provider_path=/benguigui PA_SCHEDULER_HOME:/home/cperUser/opt/proactive/scheduling cachespace:/tmp/cache PA_NODE_HOST:trydev2.activeeon.com PA_USER:benguigui PA_TASK_REPLICATION:0 PA_TASK_ITERATION:0 PA_JOB_NAME:script_groovy PA_NODE_SOURCE:On-Prem-Server-Static-Nodes PA_NODE_NAME:On-Prem-Server-Static-Nodes__localhost__0_3 PA_TASK_PROGRESS_FILE:/tmp/PA_JVM1768093207/On-Prem-Server-Static-Nodes__localhost__0_3/24t0/768659261/.tasks-progress/job-24-task-0-81857280-d454-461d-a591-f326cef2c043.progress PA_NOTIFICATION_SERVICE_REST_URL:https://trydev2.activeeon.com:8443/notification-service PA_JOB_PLANNER_REST_PUBLIC_URL:https://trydev2.activeeon.com:8443/job-planner globalspace:/data/global PA_SCHEDULER_REST_PUBLIC_URL:https://trydev2.activeeon.com/rest PA_CLOUD_AUTOMATION_REST_PUBLIC_URL:https://trydev2.activeeon.com:8443/cloud-automation-service PA_JOB_ID:24 PA_CATALOG_REST_PUBLIC_URL:https://trydev2.activeeon.com/catalog PA_NOTIFICATION_SERVICE_REST_PUBLIC_URL:https://trydev2.activeeon.com:8443/notification-service localspace:/tmp/PA_JVM1768093207/On-Prem-Server-Static-Nodes__localhost__0_3/24t0/768659261 EXIT_VALUE:0 PA_NODESFILE:/tmp/PA_JVM1768093207/On-Prem-Server-Static-Nodes__localhost__0_3/24t0/768659261/.pa_nodes_24t0 PA_JOB_PLANNER_REST_URL:https://trydev2.activeeon.com:8443/job-planner PA_TASK_SUCCESS:true PA_CLOUD_AUTOMATION_REST_URL:https://trydev2.activeeon.com:8443/cloud-automation-service]
Both EXIT_VALUE and PA_TASK_SUCCESS exists and are documented.