Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to handle square brackets in correlation handle of Receive activity in windows workflow
    primarykey
    data
    text
    <p>I have a windows workflow that has a Receive activity that correlates on two string variables, x and y, where it's possible that y may be enclosed in square brackets, e.g. "[some data]". When y is enclosed in square brackets, I notice two interesting things:</p> <ol> <li><p>When the workflow is serialized, the reference to y becomes "%[some data]". That is, a percent is inserted before the square bracket.</p></li> <li><p>I am unable to meet the correlation condition. I have tried "[some data]", "%[some data]", "<code>[some data</code>] - but nothing seems to work.</p></li> </ol> <p>Is there some advice on both how to handle the situation where a correlation variable may contain square brackets? Is there anything I can do with my existing workflows so that they can meet the correlation condition?</p> <p><strong>Edit</strong></p> <p>My specific issue, I realize, is with the correlation. I am creating my workflow service programmatically and the Receive activity looks something like:</p> <pre><code>var receiveRequest = new Receive { DisplayName = "Receive", OperationName = "DoIt", CanCreateInstance = true, ServiceContractName = "MyService", SerializerOption = SerializerOption.DataContractSerializer, Content = receiveParameters, CorrelatesOn = new MessageQuerySet { { "x", new XPathMessageQuery("sm:body()/foo:DoIt/foo:x", myNamespaceManager) }, { "y", new XPathMessageQuery("sm:body()/foo:DoIt/foo:y", myNamespaceManager) }, }, CorrelatesWith = actionCorrelationHandle, CorrelationInitializers = { new RequestReplyCorrelationInitializer { CorrelationHandle = requestReplyHandleVariable } } }; </code></pre> <p>The above works fine, unless y contains right square bracket "]".</p> <p>Thanks, Eric</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload