NotifyUser
Node Action:
The NotifyUser node action sends a notification to the user. This can be shown as a toast message.
Parameters:
se_type
NotifyUser
se_type = NotifyUserse_message
The notification message.
se_showToast
Whether to show the message in a toast too.
se_determineMessage
A lambda to build a message.
se_notificationType
The notification types can be Alert, Information, or Completed.
Example:
Get DSR Representation: Copies the Design State Resource (DSR) to the clipboard and notifies the user when completed.
digraph finite_state_machine {
splines=spline;
edge[arrowsize=1, color=black];
node[shape = box, color = green];
entry[
label = "Copy Design Inf to Clipboard",
shape= invhouse,
height = 1,
se_type2 = DesignToolTrigger,
se_displayName2 = "Copy Design Info (DT)"
se_iconUrl2 = "https://arcfmazuredev.blob.core.windows.net/img/CompleteDesign.png",
se_deferUntilOnline2 = false,
se_requiresInternet2 = true,
se_sortOrder2 = 0,
se_visibilityCondition2 = "function (ctx, msLogger) {
return true && ctx.Event.design.name != \"Demo - 2024.03.15.01\";
}"
se_type6 = GetDesignStateResource,
se_determineAssignmentId6 = "function (ctx, msLogger) {
return ctx.Event.assignment.id;
}",
se_resultVariable6 = Dsr
];
exit[
label= "Complete",
shape=invhouse,
color="#22FF44",
style=filled,
se_type1 = Action,
se_action1 = "function (ctx, log) {
ctx.Output.Cancel = true;
}",
];
copyToClipboard[
label = "Copy to Clipboard"
se_type1 = CopyToClipboard,
se_determineData1 = "function (ctx, log) {
var newtonsoft = importNamespace('Newtonsoft.Json');
return newtonsoft.JsonConvert.SerializeObject(ctx.State.Dsr);
}",
]
showToast[
label = "Notify User Copy Succeeded",
se_type1 = NotifyUser,
se_message1 = "Component Details Copied to Clipboard",
]
entry->copyToClipboard;
copyToClipboard->showToast;
showToast->exit;
}