Workflow - Popup Message | Community
Skip to main content
Level 2
October 16, 2015
Solved

Workflow - Popup Message

  • October 16, 2015
  • 4 replies
  • 2173 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Scott_Brodersen

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

4 replies

-_Dejan_-
October 16, 2015

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

Scott_Brodersen
Scott_BrodersenAccepted solution
Level 8
October 16, 2015

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

Scott_Brodersen
Level 8
October 16, 2015

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

DejanNo4Author
Level 2
October 16, 2015

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