5.1 MVC Assistant/Recommended Values Tab and MethodOutputs

This forum allows users to post and respond to "How Do I Do ....." questions. The information contained in this forum has not been validated by K-Rise Systems and, as such, K-Rise Systems cannot guarantee the accuracy of the information.
Post Reply
shalomsims
Posts: 38
Joined: March 16th, 2022, 1:04 pm
Contact:

5.1 MVC Assistant/Recommended Values Tab and MethodOutputs

Unread post by shalomsims »

There is a submethod that is calling a method to getitemdetails. The getitemdetails method has one success case which returns:

Code: Select all

GetItemDetails
	Output
		Result
			Success=True
			Message=Success
			PricingSuccess=True
			WeightSuccess=True
			XRefSuccess=True
			Items
				Item
					ItemNumber
					Price
					Weight
					...
It also has a failure case which returns:

Code: Select all

GetItemDetails
	Output
		Result
			Success=False
			Message=No items given in parameters
In building the submethod, I need to know what the GetItemDetails method returns in the success case to drag it in for use elsewhere. I need to drag it in from the left panel to create the xsl:value-of logic.

The Assistant tab is what opens automatically, so I use this and dont click on the other options unless I need something from them.

The problem is that when I expand the GetItemDetails node under "Services" in the left menu when "Assistant" is selected, it shows only the failure case output
This is the fail case being shown in assistant
This is the fail case being shown in assistant
Success case (From the logs)
Success case (From the logs)
I asked other developers and Jeff mentioned this is because EASYProcess is looking in the method and returns the output of the first MethodOutput it finds, which is the failure case one.
CallMethod returning Success or Failure through MethodOutput service
CallMethod returning Success or Failure through MethodOutput service
Since it is taught to use the left panel to develop with, I was not aware other developers that work with EASYProcess MVC just drag in what is given in the Assistant tab and after that finish typing the path they know EASYProcess will use.

For example, if you use the nodes given to you in the "Assistant" tab, it will create:

WorkData/GetItemDetails/Output/Result

Then you can type after it so you have:

WorkData/GetItemDetails/Output/Result/Items/Item/ItemNumber

Cathy mentioned this is more obvious to experienced developers who have worked with EP 5.1 classic and EP 4.8 because the "Assistant" tab used to be called "Recommended Values" which conveyed that this was just a recommendation and not the only possible values to use.

Cathy mentioned that the "Assistant" tab is EASYProcess saying "here let me try to help you", but that EASYProcess often gets this wrong and so you have to say "nah that's not what I want, I'm gonna do it myself" so you type manually to give the expected path you know it will use.

I assumed it was the result of EASYProcess running my code as I build to give the output I will need. This revealed it is EASYProcess looking for the first MethodOutput it finds, not necessarily the one I am setting my Submethod up to use based on the inputs I put in the CallMethod.

Jeff suggested that to make it easier for EASYProcess to know what I really want, I change GetItemDetails so it only has one GetItemDetails and instead have CreateServiceNodes called PreMethodOutput for the failure and success case which have the actual values to use in the one true MethodOutput. That way EASYProcess will stop getting confused by having more than one MethodOutput. This seems like a workaround though and like it would complicate the canvas by forcing only one MethodOutput service (messy canvases).

Anyway, this wouldn't work because the Item of the output is an array, so when there are no items, it returns none. So I still would not be able to select the node:
WorkData/GetItemDetails/Output/Result/Items/Item/ItemNumber
from the Assistant.

Now I understand that for it to actually run and return logs, I would need to run it in step and use the "Output" tab. Or run it from the page or DesktopView tab and go to the Logs tab at the top
Differences in these were not as clear to me until now.
Differences in these were not as clear to me until now.

Suggestion: EASYProcess should search the entire canvas for any connected MethodOutputs and return the following tree from the assistant, both MethodOutputs.

Code: Select all

GetItemDetails
	Output
		Result
			Success=True
			Message=Success
			PricingSuccess
			WeightSuccess
			XRefSuccess
			Items
				Item
					ItemNumber
					Price
					Weight
					...
		Result
			Success
			Message
:D
word count: 667

Tags:
SteveCap
Posts: 327
Joined: August 26th, 2021, 9:18 am
Contact:

Re: 5.1 MVC Assistant/Recommended Values Tab and MethodOutputs

Unread post by SteveCap »

Task #10801 has been created to address this. This post will be updated when it has been completed.
word count: 18
Post Reply