0 votes
708 views
in Coach Views by (30.6k points)
edited by

1 Answer

0 votes
by (30.6k points)

"Notifications" in the Spark / BPM UI Toolkit are the client-side messages a coach shows to the user - not the e-mail task notifications of the portal. Mechanisms, and how they work:

  • Control-level validation messages: control.setValid(false, "message") marks the control (red border) and shows the text under it; setValid(true) clears it. Used by the coach validation framework: errors added with tw.system.coachValidation.addValidationError(path, msg) are routed to the controls bound to path.
  • Status Box / Alert controls: in-page messages with a color style; set text and show / hide from code (question 2441).
  • Modal Alert: a blocking dialog (${Dialog}.setText("..."), .show()), and Modal Section for dialogs with content; both are Bootstrap modals under the hood.
  • Toast-style notifications: the toolkit has no toast control; the common pattern is an Alert with auto hide placed in a fixed-position layout, or a tiny custom view wrapping a Bootstrap alert with a timeout.
  • Service errors: the Service Call / Data controls raise On error with {errorCode, errorText}; you decide where to show it.
// helper used by every button of a coach: show a message for 4 seconds
function notify(style, text) {
  var a = ${Notice}; a.setColorStyle(style); a.setText(text); a.setVisible(true);
  clearTimeout(window._noticeTimer); window._noticeTimer = setTimeout(function () { a.setVisible(false); }, 4000);
}
notify("S", "Draft saved");

Server-side "notifications" (task assigned, due, comments) are a different feature: Process Portal's notification settings and the task e-mail templates; the Workplace on BAW 20+ / CP4BA shows those as in-app notifications from the server.

References

Related questions

0 votes
1 answer 793 views
0 votes
1 answer 852 views
0 votes
1 answer 1.3k views
0 votes
1 answer 722 views
0 votes
1 answer 1.1k views
0 votes
1 answer 1.3k views
0 votes
2 answers 3.1k views
0 votes
1 answer 2.4k views
0 votes
1 answer 901 views
0 votes
1 answer 1.5k views
0 votes
1 answer 1.5k views
0 votes
1 answer 2.5k views
0 votes
1 answer 531 views
0 votes
1 answer 1.0k views

723 questions

807 answers

98 comments

4.9k users

Join BPM Community Discord Channel

Welcome to BPM Tips Q&A, Community wiki/forum where you can ask questions and receive answers from other IBM BPM experts and members of the community. Users with 2000 points will automatically be promoted to expert level.
Created by Dosvak LLC
Our Youtube Channel
...