How to exclude the constraint execution in the webservice call.
book
Article ID: KB0077007
calendar_today
Updated On:
Description
Sometimes there is a scenario where the user does not want to execute the constraint while invoking the webservice i.e ADD RECORD, MODIFY RECORD and so on.
To demonstrate the steps, consider below example:
Constraint:
<constraint>
<name>Hide_Attribute</name>
<description>Hide</description>
<usefor>
<var>Attribute1</var>
<var>Attribute2</var>
</usefor>
<action>
<access mode="hide"><var/></access>
</action>
</constraint>
Now, this constraint hides the attributes on GUI.
When the user tries to modify the same attribute using Modify Record webservice, it throws an error as "Insufficient access permission for attribute 'Attribute1' of repository 'XXXX'".
Issue/Introduction
How to exclude the constraint execution in the webservice call.
Environment
Product: TIBCO MASTER DATA MANAGEMENT
Version: 9.1.0 or higher
OS: Windows/Linux
Resolution
To resolve this or to exclude the execution of constraint while invoking webservice use the below condition in the constraint.
========
<condition>
<defined>
<var>USER_ACTION</var>
</defined>
</condition>
========
In the MDM, we have USER_ACTION session variable which defines the Save Button- SAVE, Save/process button - SAVE_PROCESS and so on.
When a rulebase is invoked from the webservice, then USER_ACTION is null whereas USER_ACTION is defined when viewing/editing records from GUI.
So, in the webservice, the condition will become false and it will not execute the constraint.
Attached the SOAP REQUEST and RESPONSE with condition and w/o condition from SOAP UI editor.
Attachments
How to exclude the constraint execution in the webservice call.
get_app
How to exclude the constraint execution in the webservice call.
get_app
Feedback
thumb_up
Yes
thumb_down
No