Expand my Community achievements bar.

SOLVED

Workflow - Popup Message

Avatar

Level 2

How can I push a popup massage directly out of a workflow process (OSGI component ) like "MyProcess"
example on http://dev.day.com/docs/en/cq/current/workflows/wf-extending.html?cq_ck=1375948862136?
I would like to inform the user that a workflow can not be started (due to missing configuration parameters)
or during the steps that it can not progress, because of the missing user data that should be provided at the workflows run time.

1 Accepted Solution

Avatar

Correct answer by
Level 8

It looks like the InboxManager API is used for creating inbox messages (though I've never done this): https://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/wcm/notification/inbox/InboxManager.html. So your process step implementation would call InboxManager to create the message.

You might consider using the Create Task step to add a task to a user's inbox: http://dev.day.com/docs/en/cq/current/workflows/wf-ref/workflow_steps.html#par_title_16. Your workflow step could check that the needed data exists and if not the workflow routes to the  Create Task step.

To read about Task Management, go to http://dev.day.com/docs/en/cq/current/administering/task_manager.html

hope that helps

scott

View solution in original post

4 Replies

Avatar

Level 1

Thank You for the answer Scott.

But I am looking for something like the PopUp on the screenshot attached, like the one that you get wen you want to translate a page and did not select at least one language.

[img]cq_translation.jpg[/img]

Any idea how to do this?

 

All the best.

Dejan

Avatar

Correct answer by
Level 8

It looks like the InboxManager API is used for creating inbox messages (though I've never done this): https://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/wcm/notification/inbox/InboxManager.html. So your process step implementation would call InboxManager to create the message.

You might consider using the Create Task step to add a task to a user's inbox: http://dev.day.com/docs/en/cq/current/workflows/wf-ref/workflow_steps.html#par_title_16. Your workflow step could check that the needed data exists and if not the workflow routes to the  Create Task step.

To read about Task Management, go to http://dev.day.com/docs/en/cq/current/administering/task_manager.html

hope that helps

scott

Avatar

Level 8

Oh I see...I think what you'd need to do is customize sidekick: /libs/cq/ui/widgets/source/widgets/wcm/Sidekick.js

The  getStartWorkflowConfig: function()  seems to implement the workflow part of sidekick. You could add the popup code to the existing catch block, perhaps.

Google "customize cq sidekick" and you'll get a lot of hits on this sort of thing:  https://www.google.ca/search?q=cq+customize+sidekick

 

scott

Avatar

Level 2

I hopped that I could avoid, playing with the Sidekick,
but it seams like the one and only way to do it.

Thank You & all the best,

Dejan