Using URL Paths With Rules
  • Updated on 03 Oct 2014
  • 2 minutes to read
  • Print
  • Dark
    Light

Using URL Paths With Rules

  • Print
  • Dark
    Light

Decisions URL's paths system were designed to provide user with powerful navigation control in the System between Folders, Flows, Rules, Pages, Reports, Forms and much more using wide variety of additional options like Security and View.
Rules
There are several options in Decisions to run Rules and Truth Tables using URLs.
First option is to use Rule's or Truth Table's Id.
To get Rule Id we locate Rule's Thumbnail in the Folder where our rule located. From Thumbnail we click Action and select Manage > Get Rule ID
getRuleId.png

Same for the Truth Table except we select Manage > Get Truth Table ID from Thumbnail's Action menu.
getTruthTableId.png

From the resulting pop-up window we copy Id string to the clipboard.
ForRule:
copyRuleId.png

For Truth Table:
copyTruthTableId.png

To run our Rule by Id we need to use RuleId parameter with our base URL like:
http://localhost/decisions/Primary/?RuleId=7ec7403d-57b1-4003-8148-4700ea024bc0
runRuleByIdUrl.png

To run our Truth Table by Id we are using TruthTableId parameter:
http://localhost/decisions/Primary/?TruthTableId=14297558-6910-43ef-8bb5-eccb62b61147
runTruthTableByIdUrl.png

Our Rule and Truth Table run with REST and return us xml formatted output.
Rule's Output:
runRuleByIdResult.png

Truth Table's Output:
runTruthTableByIdResult.png

Another option to run Rule or Truth Table from URL is to use path . For Rules we use RulePath parameter and for Truth Tables we use TruthTablePath parameter with our base url.
For our Rule from previous example URL would be:
http://localhost/decisions/Primary/?RulePath=Flow+Demos%2fTest+Rule
And for Truth Table:
http://localhost/decisions/Primary/?TruthTablePath=Flow+Demos%2fTest+TruthTable
Also for more integration details we can call Rule's or Truth Table's Api using URL. As well, we can do it using Id or Path as first parameter for our URL and Action parameter as second. We need to pass viewapi value to Action parameter.
For instance to call Integration Details page for our Rule from previous example our URL would be:
Using Id - http://localhost/decisions/Primary/?RuleId=7ec7403d-57b1-4003-8148-4700ea024bc0&Action=viewapi
Using Path - http://localhost/decisions/Primary/?RulePath=Flow+Demos%2fTest+Rule&Action=viewapi
viewApiForRule.png

And for our Truth Table:
Using Id - http://localhost/decisions/Primary/?TruthTableId=14297558-6910-43ef-8bb5-eccb62b61147&Action=viewapi
Using Path - http://localhost/decisions/Primary/?TruthTablePath=Flow+Demos%2fTest+TruthTable+&Action=viewapi
viewApiForTruthTable.png{height ="211" width="1058"}
We can also open Rule Designer to edit our Rule orTruth Table using URL. To accomplish it we are using RuleId parameter with Action parameter. We need to pass Edit value to action parameter in the URL.
Example:
For the Rule our Url should look like:
http://decisions/decisions/Primary/SL/#RuleId=a7005b6e-3aac-47d6-99fb-c092322acdb3&Action=Edit
ruleEditLink.png{height ="95" width="793"}

And it opens the Rule Designer :
ruleEditorOpens.png

For the Truth Table our Url should look like:
http://decisions/decisions/Primary/SL/#RuleId=3262575a-17e8-471d-9088-7a15ee06742e&Action=Edit
truthTableEditLink.png

And it opens the Rule Designer :
truthTableEditorOpens.png

Was this article helpful?