cancel
Showing results for 
Search instead for 
Did you mean: 

Business Rules - Vocabulary Rules unavailable as source in Text Rules

former_member837082
Discoverer
0 Kudos

Hello All,

The context is Business Rules in Cloud Foundry, designing Text Rules with Expression Language 2.0.

I'm trying to model a text rule which will execute a decision rule in a loop and record them in a temporary variable. Something like the one below -

ForEach OrderItem in OrderItems:
Append( resultTable, <decision table that will operate on "OrderItem" and return resultTableLine> )

According to the documentation (Functions | SAP Help Portal), the "source" parameter for the append / update functions support rules - as long as the type matches. However, the value help for the vocabulary list never shows any of the expressions (decision tables / rules) even though the result of the mentioned rules suits the target. I have tried this several times with the simplest of setups. In no case does the vocabulary list offer the rules as a source. The rules themselves are of course valid and active.

This is not specific to text rules. I have worked in BRFPlus before in NetWeaver, and I would consider as fundamental, the ability to feed the result of a decision table to another decision table. Of course, I can mitigate this to an extent using orchestration/priority - but not in the scenario above, which executes a function in a loop.

I'm not sure where the problem is. Does Expression Language 2.0 actually support using rules as sources? Or, is the documentation misleading and states something that may only come in the future?

It would be great if someone could answer this. I'm trying to do a feasibility check and this feature is something I consider a basic necessity. Thanks!

Best Regards,

Arun Prakash

Accepted Solutions (1)

Accepted Solutions (1)

Archana
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Arun,

Yes you can use decision table or text rule as vocabulary rule. To be able to see such vocabulary rule in value help, you have to add that explicitly in Ruleset as "included rule". You can follow my blog for more information

Regards,

Archana

former_member837082
Discoverer
0 Kudos

Hi Archana,

Thanks a lot! I didn't realize that you have to declare the ruleset and rule service upfront in order to get this working. My mistake was believing that all objects within a package would be available for reuse in local rules. I have got it working now.

Best Regards,

Arun Prakash

Answers (0)