RulePhrase Data output format to third party application Question
Hello Decisions,
I'm using Rulephrases and I've got an issue. When I set up a rule, I'd like to output the data to my third part application as JSON, however the output is sent out in the incorrect order, the output is sorted by the rulephrase ID rather than the order in which they are evaluated. Is there anything I can use to accomplish this so that I wouldn't have to go inside of the rules every time I want to see what's being evaluated, as well as sending the output through in the correct order/format?
Comments
-
Hey there, thanks for using the Decisions Community Forum!
You can utilize the 'Open Rule For Editing' and 'Get Step Display Data' steps to achieve these results!. You can send the output of this information as JSON and feed it into your third party application. in the output there will be a few step types, which are as follows:
Step type 0 = The Phrase in the rule
Step type 1 = 'AND' Grouping
Step type 2 = 'Either/Or' Grouping
Here's a screenshot showing the Rule:
Here's the output of this rule in JSON format:
[
{
"ParentId":"",
"Id":"Root",
"StepType":1
},
{
"ParentId":"Root",
"Id":"Statement1",
"StepType":0,
"Anchor":"[Age]",
"Verb":"GreaterThan",
"Value":18
},
{
"ParentId":"Root",
"Id":"EitherOrGroup",
"StepType":2
},
{
"ParentId":"EitherOrGroup"
"Id":"Either"
"StepType":1
},
{
"ParentId":"EitherOrGroup",
"Id":"Or",
"StepType":1
},
{
"ParentId":"Either",
"Id":"Statement2",
"StepType":0,
"Anchor":"[Name]",
"Verb":"Equals",
"Value":"Bob"
},
{
"ParentId":"Or",
"Id":"Statement3",
"StepType":0,
"Anchor":"[Name]",
"Verb":"Equals",
"Value":"Bill"
}
]
We hope this helps!
Regards,
Levi | Decisions Support
Howdy, Stranger!
Categories
- 4.1K All Categories
- 57 General
- 11 Training
- 200 Installation / Setup
- 1.1K Flows
- 106 Rules
- 259 Administration
- 212 Portal
- 487 General Q & A
- 690 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 51 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 177 Pages
- 5 Process Mining
- New Features
- 176 Datastructures
- 68 Repository
- 214 Integrations
- 28 Multi-Tenant
- 27 SDK
- 76 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 66 Lunch And Learn Questions