cancel
Showing results for 
Search instead for 
Did you mean: 

Is there an API for maintaining Decisions in SAP Build Process Automation?

MustafaBensan
Active Contributor
0 Kudos

SAP Build Process Automation currently provides an API to invoke Decisions, which enables a Decision to be consumed from an application, such as a CAP or UI5 application. 

I would like to know if an API is available to maintain Decisions?  The use case is to allow business users to maintain the business rule entries in a Decision Table from a custom Fiori/UI5 app to provide a purpose-built user experience rather than exposing the SAP Build Process Automation Cloud Studio Decision Builder UI directly to business users.

I thought I saw this as an upcoming feature on the SBPA Road Map but its seems to have dropped off.  Any insights would be greatly appreciated. 

Accepted Solutions (0)

Answers (3)

Answers (3)

Archana
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello @MustafaBensan , 

Rule authoring APIs for newly created Decisions in BPA is not yet available. However if you have business rules migrated from WFM to BPA then you can use Legacy APIs for author and manage your rules. We will soon be releasing RuleBuilder SAPUI5 control, using which you can create your own custom application and embed this control to manage your rules. 

Hope that helps,
Archana


MustafaBensan
Active Contributor
0 Kudos

Hi @Archana,

Thanks for your feedback. A couple of questions:

1) The RuleBuilder SAPUI5 control already exists. How will the one you mention be different?

2) Even with the RuleBuilder control, we would still need an API to manage rules, for example to retrieve a list of rules that would be displayed in a List Report for a user to select and then edit in a detail page that contains the RuleBuilder control. Will a rule authoring API for newly created Decisions be made available as well?

Regards,
Mustafa.

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @MustafaBensan,

If you carefully read the blog you linked here from @Archana, you will notice that at the very bottom she states three myths about Workflow Management vs BPA. The 1st myth is that such functionality will run on a completely different runtime - which is simply NOT true. Considering that they both run on the same runtime, whenever you deploy a flow, it creates the BPA decision as a Business Rules project. Thus, you are just using the same runtime as Workflow Management uses. Therefore, the BRM API should also work. In fact, if you go into the BPA documentation, there is a link to Workflow Management when it goes over the BRM monitoring app (MRP):

https://help.sap.com/docs/build-process-automation/sap-build-process-automation/business-rules?local...

And if you click on the 'development' link it takes you to the Workflow Management documentation - which is in accordance with what is said on the blog. In fact, when you open the tile 'Monitor Business Rules' under BPA cockpit, you will see that all decisions you've created on your BPA flow are in fact Business Rules Projects which will behave exactly as they did under the Workflow Management. 

My understanding of the blog is that all SAP did was to simplify the process of creating a decision table and streamline definition of rules and rulesets directly on the flow editor of BPA. And, at the same time, take advantage of a proven business rules engine that was already running on Cloud Foundry.

Therefore, my conclusion is that the Business Rules API should work the same for a BPA.

Hope this helps.

Best regards,
Ivan

MustafaBensan
Active Contributor
0 Kudos

Hi @Ivan-Mirisola,

Thanks so much for the detailed analysis.  This makes things very interesting indeed.  My only concern now is that even if the Rule Authoring API for Cloud Foundry may work technically for maintaining SBPA Decisions, because it is still classified under the old SAP Workflow Management service in the documentation, I wonder if the use of this API with SBPA would be officially supported by SAP?  Do you have a view on this?

Regards,

Mustafa.

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi @MustafaBensan, I don't see any reason why SAP wouldn't support it. This API isn't deprecated at all nor it is stated on the documentation that it belongs to a sunset solution. But if you feel the need to have an official statement from SAP, you ought to get it from SAP Support via a ticket.
Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @MustafaBensan,

If you want to maintain a Business Rule via API on CF, you could achieve it via this:

https://api.sap.com/api/SAP_CF_BusinessRules_Repository/resource/Rules

However, I don't quite understand your question when it it related to Decisions. 

A workflow definition may contain tasks of type decision - which usually will have outcomes like 'yes' or 'no' & 'approve' & 'reject'. IMHO, when you change/update a business rule, this would apply only for new instances of the workflow definition. Which means, it won't really affect the decision that is on an already running instance of the workflow - simply because you flow has already passed by the business rule.

Could you please clarify more your process and where exactly it would make sense to change a business rule?

Best regards,
Ivan

MustafaBensan
Active Contributor
0 Kudos

Hi @Ivan-Mirisola

Thanks for the fast response.  The Rules API you have referenced appears to be for the Business Rules capability associated with the deprecated SAP Workflow Management service.  I am looking for an equivalent API for the successor, which is the Decisions capability in SAP Build Process Automation.

As for the use case for maintaining Decisions, keep in mind that Decisions do not have to be consumed/embedded directly in a workflow.  They can be consumed independently by any custom application that needs a business rule capability, using the Invoke Rule Service API.  For such a use case, it is a common requirement to provide a UI to maintain the business rules like this example, where the structure of the business rule/decision table is not changed but the user is able to change the values of the fields or add new rows when business requirements change.  This way, business users have the ability to configure the business logic of the application, without the need for modifying the coding of the application logic.

More specifically, examples of use cases for maintaining Decisions (Business Rules) via API are as follows:
1)  Embedded Business Rules (Decision Tables) in a SaaS application UI.
2)  Back-end Business Logic for Fiori Extension Applications and Line-of-Business Smart Process Applications as described in Usage Scenarios.

So in the above context, is the API you have suggested also applicable to SAP Build Process Automation Decisions/Business Rules?

Regards,
Mustafa.