azure-service-bus icon indicating copy to clipboard operation
azure-service-bus copied to clipboard

SqlRuleAction is not sufficiently documented

Open SeanFeldman opened this issue 7 years ago • 3 comments

Documentaiton doesn't provide sufficient information about what can be done with rule actions. The only documented functions are newid() and property(). And even these appear in remarks.

It should address questions such as

  • What properties can it modify on what entities
  • How to set values that are not string (datetime, boolean, numeric)

SeanFeldman avatar Apr 05 '18 04:04 SeanFeldman

We have added this to the backlog, and will update this issue when we have more information.

EldertGrootenboer avatar Aug 11 '22 22:08 EldertGrootenboer

Thank you for your feedback. We have brought this item in our current semester, and should be able to provide an update in the coming months.

EldertGrootenboer avatar Oct 13 '23 19:10 EldertGrootenboer

We will update the documentation.

  1. Only properties on a message can be modified. All user properties can be modified. All publicly settable system properties can also be modified, like ReplyTo, CorreationId... But we recommend not altering system properties as part of a rule action. We are not disabling it for backward compatibility reasons.
  2. When setting properties, only numeric, Boolean and string literals are allowed. A string literal in turn will be converted to a type based on the property being modified. If the property being set doesn't already exist, there is no type conversion from string. If the property being modified already exists and its value is one of these types Guid, DateTimeOffset, TimeSpan, Uri, DateTime, then the string literal will be converted to that type and set as the property value. To be more specific, the action tries to convert the string literal to the type of property. If it is successful, the property will be set. Otherwise rule action evaluation throws an exception and the message will be dead-lettered.
  3. Those two are the only functions supported.

yvgopal avatar Nov 22 '23 01:11 yvgopal

The documentation changes are live now, closing this issue.

EldertGrootenboer avatar Apr 26 '24 20:04 EldertGrootenboer