Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 836333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:57:53+00:00 2026-05-15T04:57:53+00:00

Let’s have a workflow consisted of Receive activity followed by Delay activity. The Receive

  • 0

Let’s have a workflow consisted of Receive activity followed by Delay activity.
The Receive activity has CanCreateInstance = true
and the query (message) correlation is also provided.
The workflow is hosted in workflow service
and is persisted into the database immediately on idle.

WorkflowService service = new WorkflowService
{
  Name = "MyWorkflow",
  Body = new MyWorkflow(),
  Endpoints =
  {
    new Endpoint
    {
      ServiceContractName = "IMyWorkflow",
      AddressUri = new Uri("http://localhost:1234/MyWorkflow"),
      Binding = new BasicHttpBinding()
    }
  }
};

WorkflowServiceHost host = new WorkflowServiceHost(service);
string conn = "Data Source=...;Initial Catalog=...";
host.DurableInstancingOptions.InstanceStore = new SqlWorkflowInstanceStore(conn);
host.Open();

Now I send the message to the workflow
and the runtime creates the first workflow instance.
The correlation key is included in the message, of course.
The workflow continues with Delay activity
and is saved to the database and unloaded.

Let’s assume the delay is long enough and I’ll send next message
with exactly the same correlation key. What happens?
Both workflows are never woke up from the delay and never finished.

What do I wrong?
Why workflow runtime doesn’t protect me against this?
Is there any way how to rescue both workflow instances?

Thanks for help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T04:57:53+00:00Added an answer on May 15, 2026 at 4:57 am

    If you are using message correlation the key value in the message must match with a single active workflow. If you try to start a second workflow using the same key you will get an exception when trying to start the new instance. Now if you are using just a Receive without a SendReply you are creating a one way messaging scheme and there is no way to send the SOAP fault back to the client. So the client might not be aware of the error. You can still see this if you turn on tracing in your service and inspect the log files. However the easier option is to include a SendReply, even if you don’t have normal response, as this results in a response message that can contain the fault message.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's have an example like below: package xliiv.sandbox; import android.app.Activity; import android.os.Bundle; import android.util.Log;
Let assume we have two activities. A - main activity, that is home launcher
Let's say that I have a rails plugin called wipy on GitHub. It has
Let's say I have two objects, Master and Slave . Slave has a method
Let's say I have two assemblies: BusinessLogic and Web. BusinessLogic has an application setting
Let's say I don't have photoshop, but I want to make pattern files (.pat)
Let's say I have a method in java, which looks up a user in
Let me explain best with an example. Say you have node class that can
Let's say I have a table with a Color column. Color can have various
Let's say that I have a SQLite database that I create in a separate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.