Skip to Content
Technical Articles
Author's profile photo Ramon Lee

SAP Build Process Automation with Business Rules Workaround

With the ongoing evolution of Business Rule Management, this service offering has gone through multiple cycles of transformation, to what we know the latest that this is now embedded as part of the SAP Build Process Automation (SPA).

This recent update of Business Rules Management, has certainly created frustration and challenges not able to create new business rules project but only to import.

As a result of the above limitation, we have a workaround which embeds the business rules as an object within a SAP Build Process.

  1. Create a dummy process within the lobby with API trigger;
  2. Define input for this dummy process;
  3. And Create a Decision within this process;
  4. Invoke the dummy workflow process, which inherently invoke the decision rule, by sending in the required inputs
  5. Finally, invoke the workflow instance context, to get the results of the decision table

How-To

 

  1. Artefacts

 

2. Define Business Rule

 

       3. Configure Process Inputs

       4. Add a Decision into a process step (from processInput “investmentValue” we want to determine the approver)

       5. Define Decision Table

      6.Release and Deploy

7. Invoke dummy process from Postman

      8. Get workflow instance context from Postman

https://spa-api-gateway-bpi-ap-prod.cfapps.ap10.hana.ondemand.com/workflow/rest/v1/workflow-instances/4cbf25cc-0b18-11ee-ab25-eeee0a99721f/context

Hope the above workaround for Business Rule management finds you well, in your future undertakings with your projects. Hopefully SAP will have a further updates if there are new approach of using Business Rule Management, without embedding as part of the business process.

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Murali Shanmugham
      Murali Shanmugham

      Thanks for sharing Ramon

      Author's profile photo Archana Shukla
      Archana Shukla

      Hello Ramon,

      Thanks for publishing the blog. Manage Rule Projects application is not recommended for creating business rules or Decisions in SAP Build Process Automation. Instead we have Decision activity which is new artefact to model and manage decision in low-code/no-code environment.

      Additionally, you do not need to create a process to access the Decision. Here are the steps that can be used to build, deploy and consume decision in SAP Build Process Automation:

      • Create business project
      • Cancel the process creation wizard
      • Directly create Data types and then Decisions inside the project
      • Release and Deploy the project
      • In the deployed version, you can get the details of the ruleServiceID and Version which can be used to invoke the decision.
      • You can invoke the Decision using the API. All you need to give is RuleServiceID - and runtime will automatically pick the latest deployed version. 
        • Going forward we are going to release API triggers for Decision, where you can get these informed from the deployed trigger and can control the lifecycle of the triggers. 

      It is not recommend way for standalone business rules use cases. Also there are two calls (a) one to start the process and (b) other to get the process context which is not needed. Instead, you can directly invoke the rule using Decision APIs and get the needed output as in the past.

      Please try the suggested option and let me know.

      Author's profile photo Jana De Klerk
      Jana De Klerk

      Hey Archana Shukla,

       

      Is there a timeframe in which we can expect the API that triggers a decision without the version details? We urgently need this for a go-live within a few weeks. Otherwise we're forced to stay in the Business Rules, which is not the recommended way.

       

      KR,

      Jana

      Author's profile photo Archana Shukla
      Archana Shukla

      Hello Jana,

      You can now invoke a decision without the need to mention the version information and it will always invoke the latest version. Follow my steps above to deploy the decision, and then use APIs to consume them ( all you need to give in RuleServiceID - NO VERSION REQUIRED)