This blog post describes the setup to receive notifications from workitems sent by SAP Business Workflow in SAP Fiori Launchpad (bell icon):
This blog post copies the text from the official documentation Enabling Push Notifications (SAP Business Workflow) | SAP Help Portal. and it’s enriched with a few screenshots taken from the blog post Fiori Launchpad – Notification Configuration – SAP Community.
Important prerequisite
You have enabled the Notification Channel (see: Notification Channel Configuration (Fiori Launchpa… – SAP Community), otherwise you can’t use the notifications in SAP Fiori Launchpad.
Activating Your Task Provider for Push Notifications (link to SAP Help Portal)
Activate your task provider to enable push notifications in the SAP Fiori style for your workflows in SAP Business Workflow.
Context
You have to activate your task provider once, so that the Provider button in transaction SWF_PUSH_NOTIF1 turns green. Only then can you configure your application to enable push notifications.
Procedure
Call transaction SPRO and start the SAP Reference IMG.
Search for Notification.
Select the entry Notification Channel Provider Enablement.
Choose Administration > Notification Provider Settings > Register Notification Providers.
Be careful, the entries are sorted by Line number, not by Provider ID.
If the provider ID SAP_BUSINESS_WORKFLOW exists, skip this activity:
If it doesn’t exist, create it:
For Notification Provider ID, enter SAP_BUSINESS_WORKFLOW.For Provider Class, enter CL_SWF_PUSH_NOTIF_PROVIDER.For Description, enter a description.Choose Administration > Notification Provider Settings > Manage Notification Providers.Choose New Entries, select SAP_BUSINESS_WORKFLOW, and activate it.
Choose Save.
Results
Your provider button in transaction SWF_PUSH_NOTIF1 is now green.
Configuring Your Application for Push Notifications (link to SAP Help Portal)
Configure your application to enable push notifications in the SAP Fiori style for your workflows in SAP Business Workflow.
Prerequisites
Your provider button in transaction SWF_PUSH_NOTIF1 is green. For more information, see Activating Your Task Provider for Push Notifications.
You have WF_Admin authorization.
Procedure
Call transaction SWF_PUSH_NOTIF1.Change to edit mode.Choose Create New Entry.
Choose the task or the workflow step that you want to create notifications for.For a task, you do not need to maintain Version and Step.For a workflow step, you have to maintain Version with the definition version, and you have to maintain Step.
The definition version is usually 0000. For major changes only (for example, there is a new alternative for a user decision), you can define an entry with a new original version to separate the configuration for the old and new workflow instances. You can create the new version with the Copy button.
The text for Object Name is entered automatically.Set the Active flag.
To disable notifications, remove the flag.
We recommend that you disable all notifications before transporting.
Optional: You can group tasks to be executed at the same time, and send just one push notification for the group. If you want the notifications for a task to be grouped on the notifications UI, set the Groupable flag.Choose Actions.Enter an Action Text.If you have set the Groupable flag, enter an Action Text for Mass Execution.Optional: By default, actions can be executed directly from push notifications. If you want to prevent them from being executable, select the Hidden checkbox.You can configure the style of the button for the actions.Choose Texts.Configure a notification text without exposing sensitive information.Configure a notification text including sensitive information.Configure a text to display when notifications are grouped for mass execution.To delete existing entries and therefore no longer send notifications, choose Remove Selected Entries.Choose Save.
Next Steps
To make the changes you have made to your workflow visible in your SAP Fiori launchpad, you must refresh the cache in transaction /IWNGW/H_CLEAR_CACHE:
Tips about Workflow setup
SAP Business Workflow is complex, so in general, ask a workflow expert in case something doesn’t work.
Just in case you can’t immediately reach an expert, if it “doesn’t work at all”, according to me, the most important activities to check are those two ones:
Workflow Basic Customizing | SAP Help Portal otherwise workflow can’t start at all (transaction SCU3, to be done once per client)Configure Workflow Tasks | SAP Help Portal to classify the standard tasks, otherwise no “agent” receives the workitems/notifications (transaction PFTS > Create classification > General task)
Example for checking the agents:
Transaction SWI1 (display all workflow workitems) > select one > Workflow log:
Agents:
Potential agents:
The message “All users can process this task” (WL320) means that the task is a General Task.
The actual agents are the ones obtained from the intersection of Agents and Potential agents. Here, only Sandra will receive the workitem and a notification.
To classify the task 02000070 as General Task, run the transaction PFTS, display the task, then menu Additional data > Classification > Create:
This blog post describes the setup to receive notifications from workitems sent by SAP Business Workflow in SAP Fiori Launchpad (bell icon):This blog post copies the text from the official documentation Enabling Push Notifications (SAP Business Workflow) | SAP Help Portal. and it’s enriched with a few screenshots taken from the blog post Fiori Launchpad – Notification Configuration – SAP Community. Important prerequisiteYou have enabled the Notification Channel (see: Notification Channel Configuration (Fiori Launchpa… – SAP Community), otherwise you can’t use the notifications in SAP Fiori Launchpad. Activating Your Task Provider for Push Notifications (link to SAP Help Portal)Activate your task provider to enable push notifications in the SAP Fiori style for your workflows in SAP Business Workflow.ContextYou have to activate your task provider once, so that the Provider button in transaction SWF_PUSH_NOTIF1 turns green. Only then can you configure your application to enable push notifications.ProcedureCall transaction SPRO and start the SAP Reference IMG.Search for Notification.Select the entry Notification Channel Provider Enablement.Choose Administration > Notification Provider Settings > Register Notification Providers.Be careful, the entries are sorted by Line number, not by Provider ID.If the provider ID SAP_BUSINESS_WORKFLOW exists, skip this activity:If it doesn’t exist, create it:For Notification Provider ID, enter SAP_BUSINESS_WORKFLOW.For Provider Class, enter CL_SWF_PUSH_NOTIF_PROVIDER.For Description, enter a description.Choose Administration > Notification Provider Settings > Manage Notification Providers.Choose New Entries, select SAP_BUSINESS_WORKFLOW, and activate it.Choose Save.ResultsYour provider button in transaction SWF_PUSH_NOTIF1 is now green. Configuring Your Application for Push Notifications (link to SAP Help Portal)Configure your application to enable push notifications in the SAP Fiori style for your workflows in SAP Business Workflow.PrerequisitesYour provider button in transaction SWF_PUSH_NOTIF1 is green. For more information, see Activating Your Task Provider for Push Notifications.You have WF_Admin authorization.ProcedureCall transaction SWF_PUSH_NOTIF1.Change to edit mode.Choose Create New Entry.Choose the task or the workflow step that you want to create notifications for.For a task, you do not need to maintain Version and Step.For a workflow step, you have to maintain Version with the definition version, and you have to maintain Step.NoteThe definition version is usually 0000. For major changes only (for example, there is a new alternative for a user decision), you can define an entry with a new original version to separate the configuration for the old and new workflow instances. You can create the new version with the Copy button.The text for Object Name is entered automatically.Set the Active flag.NoteTo disable notifications, remove the flag.RecommendationWe recommend that you disable all notifications before transporting.Optional: You can group tasks to be executed at the same time, and send just one push notification for the group. If you want the notifications for a task to be grouped on the notifications UI, set the Groupable flag.Choose Actions.Enter an Action Text.If you have set the Groupable flag, enter an Action Text for Mass Execution.Optional: By default, actions can be executed directly from push notifications. If you want to prevent them from being executable, select the Hidden checkbox.You can configure the style of the button for the actions.Choose Texts.Configure a notification text without exposing sensitive information.Configure a notification text including sensitive information.Configure a text to display when notifications are grouped for mass execution.To delete existing entries and therefore no longer send notifications, choose Remove Selected Entries.Choose Save.Next StepsTo make the changes you have made to your workflow visible in your SAP Fiori launchpad, you must refresh the cache in transaction /IWNGW/H_CLEAR_CACHE:Clear Metadata Cache:This clears all notification metadata, which includes notification type texts and action texts so that the latest values can be fetched from notification provider during callback. The admin can clear the metadata in two ways:Clear Data CacheThis clears the notification properties applied to templates and encrypted secure notification properties so that the latest values can be fetched from notification provider during callback. Tips about Workflow setupSAP Business Workflow is complex, so in general, ask a workflow expert in case something doesn’t work.Just in case you can’t immediately reach an expert, if it “doesn’t work at all”, according to me, the most important activities to check are those two ones:Workflow Basic Customizing | SAP Help Portal otherwise workflow can’t start at all (transaction SCU3, to be done once per client)Configure Workflow Tasks | SAP Help Portal to classify the standard tasks, otherwise no “agent” receives the workitems/notifications (transaction PFTS > Create classification > General task)Example for checking the agents:Transaction SWI1 (display all workflow workitems) > select one > Workflow log:Agents:Potential agents:The message “All users can process this task” (WL320) means that the task is a General Task. The actual agents are the ones obtained from the intersection of Agents and Potential agents. Here, only Sandra will receive the workitem and a notification.To classify the task 02000070 as General Task, run the transaction PFTS, display the task, then menu Additional data > Classification > Create: Read More Technology Blog Posts by Members articles
#SAP
#SAPTechnologyblog