5.1 MVC Assistant/Recommended Values Tab and MethodOutputs
Posted: September 14th, 2022, 8:56 pm
There is a submethod that is calling a method to getitemdetails. The getitemdetails method has one success case which returns:
It also has a failure case which returns:
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
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.
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
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=True
WeightSuccess=True
XRefSuccess=True
Items
Item
ItemNumber
Price
Weight
...
Code: Select all
GetItemDetails
Output
Result
Success=False
Message=No items given in parameters
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
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.
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
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