Assistant Services and Dynamic Service Nodes

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
JefferyD
Posts: 178
Joined: August 31st, 2021, 11:37 am
Contact:

Assistant Services and Dynamic Service Nodes

Unread post by JefferyD »

When working with dynamic service node trees, the assistant can have difficulty figuring how it can be structured as there is a dependency on previous services that may or may not affect the final result.


Example: Using a "for-each" loop makes it impossible to know the final result as it would be blank if the node path being looped on doesn't exist.
DynamicNodeAssistant.png
DynamicNodeAssistant.png (57.1 KiB) Viewed 6891 times
DynamicNodeAssistant.png
DynamicNodeAssistant.png (57.1 KiB) Viewed 6891 times

Solution 1: Create a static blank record so that 1 instance always exists. It can even be set up in an "if" statement so that the blank record only exists if the node path being looped on doesn't. As long as a blank record will not cause issues, then this could be a viable solution.
DynamicNodeExample1.png
DynamicNodeExample1.png (98.67 KiB) Viewed 6891 times
DynamicNodeExample1.png
DynamicNodeExample1.png (98.67 KiB) Viewed 6891 times

Solution 2: If it's desired to not have a blank record that can mess with later logic, then a second disconnected service can be an alternative approach. In this case, the static blank record exists outside of the execution flow and thus can be referenced without a blank record existing at runtime.

If the original service is exposing it's output, then exposing the disconnected service as well will allow anyone calling the method to also be able to take advantage of the assistant.

The one downside of this approach is that the original service is also still in the assistant. This means that the assistant may or may not show the node structure depending on which version of the service was selected in it.
DynamicNodeExample2a.png
DynamicNodeExample2a.png (25.22 KiB) Viewed 6891 times
DynamicNodeExample2a.png
DynamicNodeExample2a.png (25.22 KiB) Viewed 6891 times
DynamicNodeExample2b.png
DynamicNodeExample2b.png (76.28 KiB) Viewed 6891 times
DynamicNodeExample2b.png
DynamicNodeExample2b.png (76.28 KiB) Viewed 6891 times
word count: 310

Tags:
JustinVanRegenmorter
Posts: 576
Joined: August 26th, 2021, 9:56 am
Contact:

Re: Assistant Services and Dynamic Service Nodes

Unread post by JustinVanRegenmorter »

A projected response node has been added in a previous revision to achieve desired functionality.
word count: 15
Post Reply