Hi Sara,
on my side I can not check this with a Notebook node (honestly I do not know what it is supposed to do, I use Watson Pipelines soley in a DataStage conetxt), but in general you should be able to access
tasks.NodeName.results.return_value : Returncode of your task
tasks.NodeName.results.standard_output : What you task writes to the screen
So if you to an echo/print in your task, you should be able to capture it with tasks.NodeName.results.standard_output.
On Pipeline Parameters and Variables: As far as I know, these are used in the context of your pipeline, can be handed over and/or refrenced to/in tasks called in it (e.g. in a Run Bash Script), but you can not amnipulate them there (e.g. changing the value of a Pipelinevariable in your python script).
See an example where I access two Pipeline Parameters in a Run Bash Skript, they first have to be made available for the node in the Environment Variables (optional) section of the Node. This does an echo of the two parameters.
I developed this small pipeline in Legacy DataStage and imported it to CP4D, after one of the two Run Bash Skript nodes I have the UVA_2, where I did reference the Command Output and Return Value, which was translated to the following in CP4D (I guess for compatiblity reasons)
ds.GetCommandOutput(tasks.exec1) + '_' + string(ds.GetReturnValue(tasks.exec1))
I guess this is the same as
tasks.exec1.results.standard_output+ '_' +tasks.exec1.results.return_value
You do not have to do this in an Set user variable but can do this anywhere where you have an expression editor (like an Advance condition of a link conecting two nodes).
If what you run is a python script, then you can also do this in a Run Bash Skript node. Or if your Python skript writes to a flat file, in a Run Bash Skript node you can to a cat on this file and again refrence the standard_output of this Run Bash Skript node.