Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
LiveSite REST call to execute rule
paulsundar
Hi,
I am trying to execute a simple rule authored in the TeamSite. This rule is defined to execute an action(to show some documents belong to a particular category/content type) when a "state" input parameter is supplied(i.e., condition is define to check if the visitor's state equals to a particular value).
I would like to execute this rule from the debug panel(using REST call)
My question here, how do I supply the input parameter value ?
When I try to Get the values which are required in the input params(with "Get rule Values only" button), I get the following.
<values>
- <Value Source="InputModel" Operator="InputModel">
<Path>Session/UserProfile/State</Path>
- <Bean Object="context">
<Path>session.userProfile.state</Path>
</Bean>
</Value>
</values>
When I submit the rule with the State value as
<request>
<rules-to-execute>
<Rule>currentState.rule</Rule>
</rules-to-execute>
<input><State>NJ</State></input>
</request>
, in the response I see XPath not found,
<EventVisitor>
- <Event Level="1">
- <![CDATA[ XPath not found in input model: Session/UserProfile/State
]]>
</Event>
</EventVisitor>
along with some other information.
How do I pass the value "Session/UserProfile/State" or should I configure anywhere to expect only "State" instead of "Session/UserProfile/State"?
Appreciate your help in advance
Find more posts tagged with
Comments
tec_iwov
I think if you use the rule client jar you don't have to build all the internal data.
check with support.
paulsundar
Thanks for the reply,
Basically I want to execute the rules which are independent of the user date from the session of the TeamSite or LiveSite.
I want to supply all the data which is required for the rule as input values while executing the query. I think by default all the condition statements that we have use the internal data.
If I want to write a condition which takes only the input values that I supply as part of the rule name to the ruleengine using LSCS REST query, should I write a new CUSTOM VERBALIZATION and add it so that I can use that while creating a condition ?
please share your thoughts