I have a workflow that runs whenever a new item is created in a list, and I want the workflow to execute a piece of JavaScript code. So far I haven't found a way to call a function through a workflow, so I was wondering if anyone might have an idea on how to do so.
The reason I need this is that instead of sending users an e-mail when a new item is added, I want to send them a notification message that appears on the top right corner on any page in the intranet whenever a new item was added somewhere.
It would also be ideal if I were able to pass variables from the workflow to the javascript code, such as the list item id and the title (to show them in the notification).
So basically, I just want to know how to trigger JavaScript code through a workflow and how to pass parameters and variables to the script. I'm using Nintex workflows.
Any suggestions would be greatly appreciated.
|
|||||
closed as off-topic by Eric Alexander♦ Sep 10 '14 at 22:30This question appears to be off-topic. The users who voted to close gave this specific reason:
|
|||||
|
This would require you to only send JavaScript to a specific user in a specific session. I guess some technology like webworkers or SignalR could accomplish this, but it will be no easy solution. Basically every user session would have to be connected to some sort of hub (SignalR) and then you would have to trigger an event in that hub, from your workflow, that in turn would push out the message to the user. And one other culprit: how will you handle the scenario that the user is not connected to the intranet / SignalR hub? That is another big question you need to solve. |
|||||||||||||||||||||
|
This is the way I would do it:
like this one: http://stackoverflow.com/questions/10168757/how-to-load-this-jquery-notification-bar-on-page-load-instead-of-clicking-the-bu http://tympanus.net/Development/jbar/ (click demo top)
|
|||
|