How to Set Outputs to document properties in Spotfire?

I'm executing this basic data function using R Script. <- gsub(" ","",
base.path <- paste0("/data/", guide.area,"/",,"/",, "/",, ".html")
	sucess <- "File Exists"
	sucess <- "File Does not Exists"

I know how inputs are worked  but i'm trying to set the document property of "sucess." 

I have the output defined.

 OutputParameterBuilder sucessMessage = new OutputParameterBuilder("sucess", ParameterType.Value);
          OutputParameter sucessOutput = sucessMessage.Build();

and then pretty much trying to add the document property and update the value. 

myFunction.Outputs.SetDocumentPropertyOutput(sucessOutput, "sucess");

My problem is that the document property is not added at all. What am i doing wrong?


(1) Answer