Using function nodes¶
Let's try to use described above nodes in a simple scenario:
An employee should be sent a welcome message. A function is required to be designed to greet messages as per the respective timing of the day.
To view the messages with respective inputs in the message payload.
- 2 timestamp input nodes
- 2 debug output nodes
- A function node
- Select the mentioned requirements and connect the flow as shown.
- Rename the input nodes to "Day message" and "Evening message" and configure them as given below. | |
- Rename the function node to "message splitter" and configure as shown below.
- Rename the output nodes to suitable tags and configure the nodes as defined below: | |
- Inject the input nodes, one at a time.
The message splitter will manage the generation of the message according to the input received.
Inject the day message and you will get a message shown in the message payload:
Inject the evening message and you will get a message shown in the message payload:
Any questions left?
Except where otherwise noted, content on this site is licensed under the MindSphere Development License Agreement.