How do you determine if disambiguation was triggered to activate an action in Watson Assistant - watson-assistant

Currently if a user asks a question that triggers a disambiguation, and then clicks an option, I want to be able to determine if the action fired from that button (not the users input).

You can use the variable input.suggestion_id to determine if disambiguation fired.
For example:
<? input.suggestion_id ? "Arrived to action by Disambiguation" : "Arrived directly to action" ?>
Generates this output.

Related

How can I make notification without an obligation to close the pr0blem?

I need to receive a notification when authentication on the client happens.
I have an item with key:
log[/var/log/auth.log,(sshd.*)?(Accepted)]
Also I have trigger with key:
{test.test.ru:log[/var/log/auth.log,(sshd.*)?(Accepted)].str(Accepted,#1)}=1
I need that there will be only notification without raising a problem. With my config I always should deactivate the problem and I receive a second notification I don't need. How can I make notification without an obligation to close the problem or to receive second notification?
Suppose that this is impossible... What meets my requirements most is to make a specific action for this trigger and do not make a recovery step for it.
In the trigger configuration, you can select "Problem Event Generation Mode" = "Multiple" to have multiple problem / notification.
An Action can have no Recovery Operation and works just fine.
https://www.zabbix.com/documentation/current/manual/config/triggers/trigger

Wit-ai not abandoning stories

I have a two stories, one quite basic and the other has some conditional branching.
Story 1
User says "Menu", bot fires custom action "show_menu".
Story 2
User says 'Hi'
Fire custom action 'get_activation_state', which sets either schedule_active, or schedule_inactive context attributes.
The story branches.
IF schedule not active then Bot says "Blah..You need to activate", Bot executes 'show_activation'. User says 'Activate' (This is actually, hopefully, via a postback from messenger).Bot executes 'activate_schedule'
IF schedule ACTIVE, bot says "How can I help".
All of this works fine if I stick to the script, but if after the activate schedule function fires (which just inserts a button with 'activate') the user chooses to type 'Menu' then Wit (or my use of Wit) needs to be smart enough to abandon its current story line, and start the menu story. Trouble is, its not.
Any help welcomed!

Can I block a form submit action after first click

On a webpage, is it safe to block a submit action after user clicked it once (to avoid double posting) or is there a risk that I now block my user, in case of no/bad connectivity, post not reaching the server etc..
So in other words, can I trust that my post request always reaches the server and back to the user?
It is ok to disable button on Submit... but please make sure that you execute SUBMIT script after you have disabled it...
p.s. Common behavior is that submit button does not proceed to submit after you disabled it, you should do it manually.
To encounter no/bad connectivity, you can set javaScript timer that will return submit button to its normal state after some time, so user can click it again
Ideally you should send a server call and disable the submit button and wait for the response to comeback and if status is failed enable submit button otherwise do nothing and process the response as you need it
i think you are using javascript for making a server call if yes then it's very easy to pass a callback and listen for the response

"busy" state of angular directive

I want to create a directive that displays some data.
At some point I want the directive to signal to the context that is using it that it needs to get some fresh data (e.g. the user pressed some "more" button) I will do this by invoking a bound scope expression "moreClicked".
I assume that when this more button is clicked a round trip to a server will take place until the data to which the directive bound to will update and I would like to display some "busy" indicator until the data actually refreshes.
My Q is what would be a good pattern to implement such functionality?
Would It be true to claim that the directive can not know if it is indeed busy r not and that if it has some ui that represents that such a state it should also have a "busy" attribute that will allow binding and let the user of this directive change this value on its own?
Are there any other alternatives or considerations to make?

How do I [WebMethod(EnableSession=true)] on UpdatePanel postbacks?

Currently we have a set of form controls that do post backs and we decided to get some "free" user experience by wrapping them in an update panel. The controls store data in the session state for that user so that we don't have to constantly request data from our platform.
When doing WebMethods and WebService calls if we want to make use of the session we have to set the EnableSession property to be true if we want to access the session. Since update panels also do the same thing, where is the proper place to put the WebMethod/EnableSession attribute so that requests made from the update panel have access to the session?
Thanks.
Wouldn't you put it on whatever event is associated with your updatepanel's trigger?