Unable to publish the subflow (Error: attempting to use undefined input = 'current' from )


When attempting to Publish a Subflow following error is seen : 

"Error: attempting to use undefined input = 'current' from <SUB FLOW NAME>". 



This is caused due to the improper usage of inline script under the fields of actions defined in a subflow.


 If you use sub flow, you will need to define Inputs in the sub flow so that the main flow can pass the trigger record to be updated to the sub flow. The "current" variable does not work in sub flow.

Please refer to the following community link to get more clear understanding of the solution.