Before We Begin
In general English, the broadcast is a term used for “spreading information”. PEGA allows us to create short bulletins like Welcome messages or news or message for the day by using Broadcast data instance.
What is a Broadcast Data Instance?
Broadcast Data Instance in PEGA can be used to display any announcement or daily updates or important notes to end-users in their portal.
This is an option available under the Records -> Technical category. It is created as an instance of the Data-Broadcast class. Keys for this class are pyOrganization, pyOrgDivision, and pyOrgUnit implying that there can be only one Broadcast data instance per organization division’s unit.
To create a Broadcast data instance, we need to mention the name of the Organization, Division, and Unit for which the message is applicable.
Messages of up-to 70 characters in length can then be entered.
How to display the Broadcast message?
OOTB section @baseclass.News can be referenced where ever we need to display the Broadcast message we had created.
Let us now try to display a Broadcast message for a simple use case.
Business Scenario
Consider that OSP organization has an application for HR. They want to intimate HR Managers regarding PEGA recruitment drive in their manager portal and want HR Administrators to have the capability to edit the messages anytime regarding the recruitment drive.
Implementation of Broadcast
First, let us create a Broadcast rule. For this, we need to go to Records and select Broadcast from Technical category as shown below:
In the new form for the rule, let us give a short description and enter Organization, Division, and Unit for HR Managers.
This rule has 2 tabs – Message and History. Let us fill the Message tab about the information on PEGA recruitment drive as per the Business Requirement. The message gets stored in pyMessage property inside Data-Broadcast class. When user associated to an organization division’s unit record for which a Broadcast rule is created logs in, the message that was set in Broadcast rule for that organization division’s unit record becomes available in pxRequestor.pyMessage.
Now that the broadcast message is created, we will switch gears to the UI part on where and how to display this message.
PEGA provides an OOTB section @baseclass.News which can be used to display the broadcast message.
pxRequestor.pyMessage is used to display the message. Edit button that is available in the OOTB section allows to edit the broadcast message.
Edit button by default will be visible if the logged in operator has PegaRULES:SysAdm4 privilege as per HasSecuritySysAdmin when rule. Save as the section and associate the Edit button to a different when rule based on the business needs as it is generally not a good practice to give SysAdm4 access to managers or other users of the application.
Local action @baseclass.EditNews is used to edit the message rule. Pre-activity @baseclass.NewBroadcastMessage fetches the Broadcast message associated with the current logged in operator’s Org-Div-Unit. Post activity @baseclass.EditNews, updates the corresponding Broadcast rule with the edited message.
We need to include the OOTB section in the appropriate section/harness so that the Broadcast message can be viewed by HR managers when they log in.
As per our requirement, HR Administrators can edit the message. We need to customize @baseclass.News section and associate a different visible when for Edit button which can check if the current operator is a HR Administrator.
Once these changes are made, let us login as a HR Administrator. We can see that the Broadcast message is displayed on the portal and the operator has an option to Edit the message.
Let us edit the message – say we change the date from Jan 2nd 2020 to Jan 5th 2020 and submit.
Let us now open the Broadcast data instance rule. We can observe that the message is updated in the rule.
The next time a user in the organization unit logs in, the portal News area displays the updated message.
Let us log in as HR Manager. We can observe that the edited message is displayed. The manager doesn’t have an option to Edit the message.
Comparison of Broadcast with Field Value
For displaying messages, we can make use of Field values. There are no restrictions on the number of characters to display in case of field value messages. Editing message needs access to Developer portal as field value rule has ruleset version associated to it. Whereas, with broadcast option, message can be easily edited without the need of Developer portal as it doesn’t have any ruleset version associated to it.
Conclusion
We can make use of Broadcast rule to present updates to user’s belonging to a particular Unit and also allow authorized users to edit the messages as needed without needing to login into Developer portal to make the changes.
We are glad to publish the article requested by @ Azhar on “Broadcast data instance from Technical category with scenario“. If you want us to publish any articles of your choice, please fill out this form & we will make sure that it gets published.
Thank you so Much Guys!!!!
Happy Learning from OSP @Azhar 😊
Great job. Easy to understand. I never knew there is something called broadcast which can be leveraged for short messages. Thanks OSP team for publishing article on this. I loved the example.
Thanks @Chaitanya Pinnireddy
Happy Learning 😊
This one is very good guys. Awesome.
Thanks @Shashankey Pinnireddy
Happy Learning 😊
My roomie Aditya had suggested me to visit your blog on a regular basis and is telling to try poc following ur steps. I just read this post didn’t try hands-on. Today I will do. In case of help will ask u guys in this comment potion.
Guys, good Explanation !!
Sure @Shashankey Pinnireddy
We will be happy to help you anytime 😊
Property qualifiers
Going forward make use of our “Suggest Topic” form to suggest new topics if any. We have separate process to track new articles request when it comes from the form and we don’t want to miss your suggestion anytime 🙂
Sure guys. I faced some error in that so gave here in comments so that my article wish is considered. My friend will do on my behalf guys🤑🤑🤑.. thanks guys for ur efforts. Even things like this u are having mechanism to track. It is great guys.
Guys, pls post on property qualifier. How to create customised property qualifier? I already mailed u 4 months back guys. I want to learn from u guys. Ur broadcast and savable are gem of your work. Not much I could find about this in other places guys. Please consider and post. Will be very very very helpful for guys like me
We will @Aditya Kunal
From Suggested articles, we pick ones that we feel can be useful for the wider audience. Definitely we will post an article on property qualifiers ASAP.
Thank you so much guys. You are awesome guys. Really so very good of you to consider our requirements guys. No words to say guys.
Please explain the Web Mash Up concepts with real time example.
Sure @Satish
Going forward make use of our “Suggest Topic” form to suggest new topics if any. We have separate process to track new articles request when it comes from the form and we don’t want to miss your suggestion anytime 🙂
Guys. Not sure if my comments reached u. I tried to convey one observation to other readers of this post guys. They may find it useful. When HR admin selects Edit button, no restrictions is placed on broadcast message. But in the back end, error is thrown on the data instance. So, guys, we either need to restrict 70 characters in edit UI or throw validation error if more than 70 characters. Please share this comment guys so that will be useful for all. Overall, this article is very nice guys. U rock. It is very very crystal clear to understand guys. Great job. Keep it up guys!!!!!!
Thanks for the info @Aditya Kunal
It feels happy to see this much interest from a fresher on PEGA. OSP team wish you to reach greater heights 😊
Thank you guys. U guys have already reached great heights in all our hearts by putting efforts like this to help Pega developers. You guys are really awesome. Looking forward for your future posts like this guy’s.
😊😊😊
Nice post. My room and office Pega friend is Aditya Kunal. All is nice on broadcast.
Can you send post on class stricture next article?
Thanks & Nice to hear @Cowsick Pannipolamarasetty
Sure you can see article on class structure soon 😊
Guys, suggest topic not working for me guys. I wanted to request post on Cascade approval. Can you add to ur list of suggested topic. I will add my email id🤑🤑🤑
Your request is noted @Aditya Kunal
Cascading approval you can find the detailed topic in -senior system architech exercise updates-course
@Vinod. Osp guys cover backend details as well which is useful and easy to understand for the readers and that is the whole intension in me asking for cascading approval. I already read cssa.
Guys waiting for new article guys. Request to post 1 per week. Previously u guys posted more than 1 per week and was difficult to read all in 1 shot. So 1 article per week u post guys. Hope you understand.
We see there is a character limit for ‘pyMessage’ in Data-BroadCast class, Thus it is restricting us to enter only 70 characters. We can have this property in our application ruleset and can remove the character limit or can increase based on business needs.
To add a point, this property is stored in a blob column in pr_data table, so we will be good if we can increase the character limit also. Can you share your thoughts here?
Hi Guys,
Thank you for the clear explanation.
Is it possible to give multiple broadcast messages to same Organization, Division and Unit. If so, will the OOTB given in above explanation enough or any other modifications needed.
Great feature. One question.
Can we personalize the message to the logged in user?
For example the Admin can change the message that’s seen by every other user, but how about…
“Good Morning Tom, blah blah blah”
…where “Tom” is the logged in user.
Basically I’m asking if the message text can be customized substituting property values at run time. If not, if you can suggest other options would appreciate it