Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
ramonlee5
Explorer
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-instance...


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.
12 Comments
Murali_Shan
Product and Topic Expert
Product and Topic Expert
Thanks for sharing Ramon
Archana
Product and Topic Expert
Product and Topic Expert

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.

Jana_dK
Participant
0 Kudos
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
Archana
Product and Topic Expert
Product and Topic Expert
0 Kudos
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)
NKN
Explorer
0 Kudos
Hi Archana,

 

the 3 dots are not visible anymore in the current version. Can you tell me how to get the id and version in the current versionß

 

Best Regards,

Niklas
SF_Commune
Explorer
0 Kudos
Hello Archana,

 

Thanks for your update and recommendations to go with directly invoke the rule using Decision APIs and get the required output. But, as mentioned by Niklas in earlier comment, I am not able to see the three dots as you mentioned in your snapshot. It looks exactly the same like Ramon Lee in step 5 - Define Decision Table.

 

Please find attached snapshot and advise.


SAP Business Rules - 3 dots to get the Rule ID is not appearing


 

Thanks,

Nanda

 
BorisAndree
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Nanda,

the 3 dots are only visible in the deployed version of a decision as the ID gets generated during deployment. Just checked, still works as described by Archana.

BR

Boris
BorisAndree
Product and Topic Expert
Product and Topic Expert
Hi Niklas,

see my reply to the same question below. The 3 dots are only visible in the deployed version.

BR

Boris
SF_Commune
Explorer
0 Kudos
Hi Boris,

 

Thanks for your reply. I now can be able to see 3 dots. Unfortunately it was not visible immediately after the deployment. It is Good now.

 

Thanks,

Nanda

 
SF_Commune
Explorer
0 Kudos
Hi Boris,

I am able to see the decision ID in 3 dots. However, not able to invoke the decision using API. I am using Decision API - /v2/rule-services and it is not triggering the decision. Which API should be used to invoke the decision through ID?

Thanks,

Nanda
vibha11
Explorer
0 Kudos
Hi Ramon,

I am facing below error in postman

"Expected CSRF token not found". from where can i get this token to provide in postman?

   


Kindly please please me to fix the issue.

 

Thanks & Regards,

Vibha Nayak
vibha11
Explorer
0 Kudos
Hi Archana,

 

I have created the decision table. I have tried to invoke the decision table using postman using url:https://spa-api-gateway-bpi-us-prod.cfapps.us10.hana.ondemand.com/workflow/rest/v1/workflow-instances.Rule service id. i have given same id after deploying decision table

it is not providing me proper output.How do I resolve this error. Please do suggest

Labels in this area