Page 1 of 1

5.1 MVC MethodOutput Log

Posted: October 11th, 2022, 2:54 pm
by shalomsims
In 5.1 MVC, I'm looking in the logs and I see two outputs. One Output comes from a MethodOutput service and displays some data with the path "_MethodOutput/Result/[data]"

Then there is another log for an Output that has the same results but the path is "WorkData/Output/Output/Result/[data]"
Screenshot 2022-10-11 113838.png
Screenshot 2022-10-11 115206.png
We tested and found out that MethodOutput is the reason for both Outputs in the logs but why is that necessary? Which Output should be used and why?
image.png

Re: 5.1 MVC MethodOutput Log

Posted: October 14th, 2022, 12:33 pm
by SteveCap
The MethodOutput service is used to pass value to the output a CallMethod or CallSubMethod service when Classic is set to False to have the outputs as WorkData/CallMethod/Output/Result/NodeFromMethodOutputService.

Within a method or submethod the MethodOutput service will act as a CreateServiceNode with the difference being it will look to see if _MethodOuput exists if it does it will remove it. Then it will put its output under _MethodOutput so then when the entire method is done running it can take all values in _MethodOutput and put it in the calling process WorkData under the CallMethod or CallSubMethod to make it look like above. This is because we only want to take the last one.

Really you should not reference either of them directly as the MethodOutput service should really be the last service in the method or submethod. You should then reference the values in the parent by WorkData/CallMethod/Output/Result/NodeFromMethodOutputService

Re: 5.1 MVC MethodOutput Log

Posted: May 5th, 2023, 12:07 pm
by CathyC
Here is a forum post that explains how to use method output in more detail and with some screenshots.
viewtopic.php?p=1662