Decisions about Decisions (Reflective Decisions) - Gnorion/BizVR GitHub Wiki

Reflective Decisions (Decisions about Decisions)

Is it possible to create decision tables that can operate on other decisions and decision tables?

Yes. BizVR provides a comprehensive set of methods and functions that allow you to create, open, copy, modify, validate, save, test, close or delete all of the components of a decision model such as:

  • Workspaces
  • Projects
  • Decisions
  • Rulesets
  • Rules
  • Conditions
  • Actions
  • Data Models
  • Test Cases
  • Functions
  • Methods

image

Traversing the workspace

This is an example of a decision table that can be used to traverse tenant workspaces:

image

Which is equivalent to this code:

for tenant in tenants
    for workspace in tenant.workspaces
        for project in workspace.projects
            for decision in project.decisions
	        for ruleset in decision.rulesets
		    for rule in rulesets.rules
			for condition in rule.conditions
			    for part in conditions.parts
				DO SOMETHING WITH A PART
			    end parts
			    DO SOMETHING WITH A CONDITION
			end
			for action in rule.actions
			    DO SOMETHING WITH AN ACTION
			end
			DO SOMETHING WITH A RULE
		    end rules
		    DO SOMETHING WITH A DECISION
		end rulesets
	    end decisions
	end projects
    end workspaces
end tenants

The following functions and methods are available

This same functionality is also available in BizCod.