Trigger feedback panel in tasklist


#1

Hi,

I would like to make use of the feedback popups in the tasklist.

In my custom directive I upload files via REST. afterwards I would like to show a pop-up as done in other parts of camunda (e.g:)

How can I achieve this?

Kind Regards,
Nico


How to create a link in a notification
#2

I found it.

Add ‘Notifications’ as controller dependency.

Notifications.addMessage({type:“success”, status:“Success”, message: “Successfully removed upload.”});
Notifications.addError({status:“Failed”, message: “Error while removing upload. Please try again.”});


#3

I have been looking for something like this!

@nvanbelle
Can notifications be called by Script Tasks? Does Camunda does have a Notifications Queue on the Server?

What is the difference between the two functions?

Keywords: Add Tasklist Notifications, Create Notifications,


#4

Hi Stephen,

Yes you can always inject Notification in your cam-scripts like this:

<script cam-script type="form-script">
        inject(function($scope, $http, $modal, $q, Notifications) {
                    ... code

                     .catch(function (err) {
                        Notifications.addError({duration:5000, status:"Failed", message:"Failed to fetch data"});
                    });
       }
</script>

The messages themselves do not get pushed physically onto a queue.

UPDATE: realysed you were asking about script tasks. I do not use them, I have no idea you can use them there :no_mouth:


#5

@nvanbelle thanks for the code sample! Always appreciated (easier to copy and paste :stuck_out_tongue: )

The “physical queue” is what i was looking into. Does not look like there is a server side queue (unless i am missing something).

Some sort of “Text Messages” queue would be great. Something that you could send text based messages to users.

The use case that has been coming to mind, is if there is some sort of background task occurring, or some sort of confirmation message information you want to send to the user (but not as a task) in the task list, something like a text based message would be great.