cancel
Showing results for 
Search instead for 
Did you mean: 

Table Output of Rule 1 as input for Rule 2?

stephan_wasser17
Discoverer
0 Kudos

Hi,

I tried to use the output table of a rule (i.e. hit policy is 'All matches') as an input for the next rule, but failed. Is this because it is simply not possible to pass a table from one rule to another or what am I doing wrong?

Here is my setup:

1 ruleset with the follwoing 3 rules:

Rule 1 (First Match) with output structure ("OS1")

Rule 2 (All Matches) with input structure "OS1" and output table ("OT1")

Rule 3 (All Matches) with input table "OT1" and output table ("OT2" = output table of the rule service)

I "see" that rule 2 returns what I expect, but the output of rule 3 is always empty, which is not what I expect due to the outcome of rule 2.

Thanks for any hints,

Stephan

Accepted Solutions (0)

Answers (1)

Answers (1)

Archana
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Stephan,

Table in business rules works differently than strucutres. Firstly I hope you are using table functions to define the rules, secondly have 2 tables say temp_OT1 where you collect output from first table and then temp_OT2 in on which you write rules. Please read my blog on tables to understand more about tables.

stephan_wasser17
Discoverer
0 Kudos

Hi Achanda,

Reading the blog you referred to I come to the conclusion that there is no way to consume the output table of rule 1 as input for rule 2 while the decision table of rule 2 operates on its input-structure, i.e. the table-type of output 1.

But why is it possible to do so for rules where the input is a DB-Table?

Example:

Let us say that
- the input for the rule service is database table T1 with table-type S1 and
- the only rule of the service operates on the attributes of S1.

This rule will be executed for every line in T1 and there is no need to use any table functions.
Then what you are saying is that this cannot be achieved for a table that is the output of a rule, right?

Thanks

Stephan