Submitting the action request content in encrypted form
An alternate to registering the data transform is to encrypt the submitted action request content. The developer can write code in a non-auto section or html fragment and include it in the harness
To ensure the action request content is submitted in encrypted form, complete the following procedure:
- Use the rule utility function
pega_rules_utilities.pzEncryptURLActionString
to encrypt the action. This function requires parameters in the following format: pega_rules_utilities.pzEncryptURLActionString(tools, "Thread",pyActivity=activityName¶m1=value1¶m2=value2")For example: pega_rules_utilities.pzEncryptURLActionString(tools, "Thread", pyActivity=pzRunActionWrapper&pzDataTransform=setStockPriceDT")
- Enter a code snippet.
For example: Examples of a specific and a generic code snippet are shown below: - generic code snippet:
pega_rules_utilities.pzEncryptURLActionString(tools, "Thread", "pyActivity=activityName¶m1=value1¶m2=value2")
- specific code snippet:
pega_rules_utilities.pzEncryptURLActionString(tools, "Thread", "pyActivity=pzRunActionWrapper&pzDataTransform=setStockPriceDT")
- generic code snippet:
- Click Save.
Example from @baseclass.SpellCheckerMoreDialog:
var oSafeUrl= SafeURL_createFromURL("<%tools.appendstring(pega_rules_utilities.pzEncryptURLActionString(tools, "Thread", "pyActivity=Data-SpellChecker.Spellcheck"));%>");
var strSpellCheckXML = httpRequestAsynch(oSafeUrl.toURL(), strPost, 50, 100);
Previous topic Registering the action and preventing the security alert Next topic Configuring the custom control by encrypting the URL in JavaScript