Skip to Content
Author's profile photo Former Member

ByDesign 1508 Release: How to create Workflow Rule to send email and notifications

Introduction  : Based on the standard business process, SAP has defined  and delivered the creation of task (like (notification, approval task, escalation) ) under different circumstances   For example, if the authorization of the business user is changed, then user will get a notification informing that the authorizations are changed. If the user has subscribed for email then email would also be sent.

Apart from standard tasks, there can be some customer specific scenarios, wherein customers may want to define notifications or email to be sent based on their own conditions / criteria.

This requirement is now delivered as a new feature called “Workflow Rules”.

“Workflow Rules” can be defined by the key user at the customer end using

    Application User Management (Work center)->Workflow Rules (Work center view)

Workflow Rules contain the following steps:

  1. Events when they should be triggered,
  2. Condition which must be met for the rule to be executed
  3. The operation that needs to be performed by the rule

Currently supported operations by the workflow rules are:

  • Sending Email
  • Sending Notification
  • Field Update –Business object Field values  can be changed using this option
  • Action execution – Business object action can be configured using this option

Problem Description : As per current implementation of our Purchase Order approval scenario, on submit (or Order) of purchase order, based on the approval process definition for purchase order, approval task will be created and assigned to the responsible. But once the purchase order is approved then there is no standard notification sent to the creator of the purchase order, informing that it is approved and the user can proceed further. Due to this there may be a delay in the further business processes.

Solution : Using the newly released feature of 1508 – Workflow Rules, key user can create a new rule based on the status change of Purchase Order. Based
on this a task/email (as configured in the rule) will be generated and sent to the person.

Solution in detail : 

1.  Navigate to the workcenter view to create a new Workflow Rule

From Application and User Management Workcenter, Navigate to Workflow Rules

/wp-content/uploads/2015/07/1_756351.png

This will display all the workflow rules maintained in the system

/wp-content/uploads/2015/07/2_756353.png

To achieve the above scenario, a new rule has to be created for this notification.

2. Click on “New” to create a new Workflow Rule

/wp-content/uploads/2015/07/3_756354.png

Customer has to choose the particular business object for which the notification has to be triggered.

Timing :  Timing has two options:

On Create only – Rule will be evaluated only on creation of the Business Object (very first save).

On Every Save –  Rule will be evaluated on every save of the Business Object ( only when the condition is met)

3.  Click on “Next” to create Conditions for the Workflow Rule

Workflow condition editor is same like Approval Process condition editor. To add a new condition, click on “Add Group”.Conditions within the group will be considered as “AND” in the condition expression.

/wp-content/uploads/2015/07/4_756355.png

For the Purchase order approved notification solution, maintain the condition as follows

/wp-content/uploads/2015/07/5_756362.png

4. Click on “Next” to create action type for the Workflow Rule

In Actions, customer has to define the rule type whether he needs notification or email for the business process.

Based on the rule type, relevant data needs to be maintained.

    /wp-content/uploads/2015/07/6_756363.png

Notification Workflow rule:

  For notification rule type, customer can provide details as when the notification task should expire or cancelled.

Also in Notification based rule type, only four place holders allowed in the subject

/wp-content/uploads/2015/07/7_756364.png

Email workflow rule type:

In case of e-mail notification, there is no restriction for the place holders, but it is recommended to keep them as minimal for performance reasons

Template file which should be used for the email body needs to be uploaded in HTML format. The template can contain placeholders, which will be     expanded to actual value when the email is sent .

/wp-content/uploads/2015/07/8_756368.png

.

Sample Template for Email:

/wp-content/uploads/2015/07/9_756369.png

5. Add Recipient determination to determine the responsible

The recipient determination needs to be maintained for both the rule types.

Recipient determination can be SAP delivered determinations or else customer can specify the direct recipient.

/wp-content/uploads/2015/07/10_756370.png

6. Click on “Next” to review the Workflow details
In Review, all the details of the rule are shown for review. Once all the details are confirmed, then the rule can be activated by using
“Activate” button. Then finish the workflow rule definition by clicking on the “Finish” button.

Newly created workflow rule can be seen in the workflow rules list OWL

/wp-content/uploads/2015/07/11_756375.png

Customer can edit / delete the workflow rule during the business. Activated workflow rules can be deactivated by using the action
“Deactivate”

Lets see the Workflow Rule in action:

7. Approve a purchase order which is sent for approval.

As per the defined workflow rule, once the purchase order is approved, the creator of purchase order will get a notification.

/wp-content/uploads/2015/07/12_756376.png

Apart from email and notifications, Field update and action executions are also possible with work flow rules if the underlying business object has
enabled them.

Field Update: User can modify the attribute value of the business object instance using field update.Fields which are marked as editable in the workflow of
business object are displayed in here.

If the rule condition is met for the object instance then the field value will be updated as given in the workflow rule.

/wp-content/uploads/2015/07/13_756386.png

Field Action:  Business object actions can be exposed for workflow rules.

If the workflow condition is met, then the action will be called for the business object instance.

/wp-content/uploads/2015/07/14_1_756387.png

Summary: Apart from standard tasks, there can be some customer specific scenarios, wherein customers may want to define notifications or email
to be sent based on their own conditions.

This will be achieved with Workflow Rule. Along with the other notifications, workflow notification will also be sent to the User.

Prerequisites:

  • Workflow Rules can be created only for business object that has been enabled by SAP .
  • If there is a need to enhance existing workflow rule or need new workflow rule, then raise this as requirement using the known
    channels to request new features.

Assigned Tags

      12 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Harsh Shrotriya
      Harsh Shrotriya

      Useful feature and well explained!

      Author's profile photo Former Member
      Former Member

      Great blog.

      Author's profile photo Stefan Mett (Admin Account)
      Stefan Mett (Admin Account)

      Thank you!

      Author's profile photo Former Member
      Former Member

      Useful feature.....

      Author's profile photo Eduardo Penafiel
      Eduardo Penafiel

      FYI,

      If you get an error message while updloading the HTML about MIME type not allowed you need to folow this steps:

      1) Go to WC Business Configuration > Implementation Projects

      2) Open Activity List

      3) Select Fine-Tune phase

      4) Open the activity Allowed MIME Types for Document Upload

      5) Select the MIME type and allowed it.

      6) Save and exit.

      Hope this helps anyone.

      Author's profile photo Ashish Sharma
      Ashish Sharma

      Cool , I am facing the same issue.

      Thanks for the solutions.

      Thanks Eduardo.

      Author's profile photo Former Member
      Former Member

      Does anyone know when other Business Objects will be available? i.e. Service Contracts, Projects, etc.

      Thank you in advance for your feedback.

      BJ

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Corresponding Application team has to create the workflow view of business object for these BO's. Workflow rules framework is ready.

      whenever application team gets requirement from customer they will create the Meta object and expose the fields.

      thanks ,

      Sumithra

      Author's profile photo Jacques-Antoine Ollier
      Jacques-Antoine Ollier

      Very useful information.

      Thank you very much.

      Best regards.

      Jacques-Antoine Ollier

      Author's profile photo Former Member
      Former Member

      Thanks for your useful  information, but I have a question that when I choose the Rule Type as Action, I want to have more options in the <Select Action> drop down list, where can I add it ?

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      You can contact the corresponding application.They will expose the actions for workflow .

      Author's profile photo SAMUELE BARZAGHI
      SAMUELE BARZAGHI

      Hello,

      For which Business Object do you have the Rule Type "Action"? On ByDesign we don't have any Business Object with this kind of Rule Type.

      Instead on C4C we have some, for instance Business Object "Company", nothing on ByDesign.

      Thanks