Technical Articles
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).
As a result of the above limitation, we have a workaround which embeds the business rules as an object within a SAP Build Process.
- Create a dummy process within the lobby with API trigger;
- Define input for this dummy process;
- And Create a Decision within this process;
- Invoke the dummy workflow process, which inherently invoke the decision rule, by sending in the required inputs
- Finally, invoke the workflow instance context, to get the results of the decision table
How-To
- Artefacts
2. Define Business Rule
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.
Thanks for sharing Ramon
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:
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.
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
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)