Where to store "state"? RRS feed

  • Question

  • Hi!

    It's been a while since I worked with BizTalk, but now I'm back :)

    I need to save a date of "last run", use it in an orchestration and update it for every run. An alternative is to use a singleton Orchestration, but it will loose it's variable value if someone terminates it. I tried using SetCommonId, as Brian did here:, but didn't understand how. I am under the impression then SetCommonId only creates an relation with an AppId. An other alternative is to use a custom database, but if there is a solution out-of-the-box I rather use that.

    Any suggestions?

    Kind regards

    Friday, September 25, 2020 12:01 PM


All replies

  • No out of the box solution no, custom DB is the way to go.
    • Marked as answer by Martin Bring Tuesday, October 6, 2020 11:30 AM
    Sunday, September 27, 2020 12:16 AM
  • If you can put up with a temporary data-store, then use a static variable in a helper class to store the date.  This though will be cleared when then App Domain unloads (e.g. BizTalk restarts).

    If it needs to be permanent, then things are no different for BizTalk than anything else, it needs to be written somewhere persistent.  If you go the route of a SQL database, be sure to use a separate SQL instance if you're sharing the same box as the BizTalk DBs as there are tweaks BizTalk applies to the instance which are less desirable for your own code.

    If this is helpful or answers your question - please mark accordingly.
    Because I get points for it which gives my life purpose (also, it helps other people find answers quickly)
    Read my articles on: BizTalk | .NET

    Tuesday, October 6, 2020 11:16 AM
  • Thanks for your answers. I went with the custom DB :)

    Tuesday, October 6, 2020 11:33 AM