Access Production Line sys_variables from WFs inside it

Dear OD experts, is there a way to access PL sys variables from WFs that belong to it, at the time of running PL? So the exact question that I am facing is: I would like to save the Job_id of the PL, that is currently being run, in a table, from a WF within the PL. The first solution that comes to mind is to add a PL-variable that is set as “@sys_pl_job_id@“. and also pass this variable to the WFs that are inside the PL. However now, in case one would like to trigger this PL using Flexible REST API from an independent WF, There seems to be no way to set the PL-variable that is supposed to be “@sys_pl_job_id@” for making the REST API call to execute the PL, therefore the solution with PL-variable seems to not be adequate here. Any ideas here?