Page 1 of 1
Ways to specify Method Output
Posted: April 15th, 2022, 4:51 pm
by CathyC
In MVC there seems to be 3 ways to specify that there is a node in the submethod that needs to be brought up to the parent level. I think they work in different ways. Can someone please clarify what each of them are, how they should be used, and how they difference?
- Set on a service level output to true
- using method output service
- specifying output in the callmethod service
Re: Ways to specify Method Output
Posted: April 18th, 2022, 9:00 am
by SteveCap
This is only for when a Call service (CallMethod, CallMethodAdvanced, CallSubMethod, CallSubMethodAdvanced) has Classic = False
The MethodOutput service will allow you to return name value pairs to the call service. It will output as WorkData/CallMethod/Output/Result/Name. Only one MethodOutput service can be used.
The Call service Outputs nodes are used to bring a service from the method up to the WorkData of the caller. It would be added as WorkData/ServiceFromMethod/Output/Result. It would then act just like if it was ran from that process. For this to work the services SelectOutput flag should be true though currently that is a bug and it still will work even if you don't. The fix to require the SelectOutput flag to be true is in queue to be tested.
Re: Ways to specify Method Output
Posted: April 26th, 2023, 11:52 am
by CathyC
Re: Ways to specify Method Output
Posted: April 26th, 2023, 12:51 pm
by CathyC
When Classic = 'True':
- Flagging a service to "Expose Service Output" makes it referencable as a child of the CallMethod when it is ran from the parent logic canvas:
So this would be referenced as: WorkData/CallMethod/Output/Result/ServiceWithinMethodFlaggedForOutput/Output/Result/ChildNodeOfService
This downside of this approach was that the references get to be very long. This is why the new way was created, but this will still work if classic mode is turned on.
- Approach #2 is similar when classic is turned on as to when it is off. The difference is that there are more steps in between which make the path to reference longer.
So this would be referenced:
WorkData/CallMethod/Output/Result/_MethodOutput/Result/ChildNodeOfMethodOutputService
Since approach #1 was the way all method output used to be referenced before the new way, and since approach #2 is very similar by offering the same disadvantage with none of the benefits, it doesnt make much sense to use this.
- Approach #3 will not work if classic mode is on. These parameters will exist, and you can fill them out, but when the CallMethod runs, it will not produce a new node in the parent logic canvas the way it would work if classic was False.