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 8871823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:05:06+00:00 2026-06-14T18:05:06+00:00

In the past I have developed document workflows using SharePoint Designer and created ‘Global

  • 0

In the past I have developed document workflows using SharePoint Designer and created ‘Global Vairables.’ These are variables that are global across a workflow instance as far as I am aware.

How would I create equivalent global variables in a Visual Studio Workflow project? My first idea was to create a set of fields like this in a module:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Field ID="{2FE15855-3CAB-44A6-AB29-1600204FCA20}" Name="TechRev1"
         MaxLength="255" DisplayName="Technical Reviewer 1" Description=""
         Direction="None" Type="User" Overwrite="TRUE" />
  <Field ID="{517B22A5-1B89-4C24-82BE-3D4FD99645BC}" Name="TechRev2"
         MaxLength="255" DisplayName="Technical Reviewer 2" Description=""
         Direction="None" Type="User" Overwrite="TRUE"/>
<Elements/>

Is this the right approach and how would I access any global variables from an ASPX form?

  • 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-06-14T18:05:07+00:00Added an answer on June 14, 2026 at 6:05 pm

    Having developed my workflow in Visual Studio I have come to conclusion you should use a combination of SharePoint lists and class scoped variables to retain global state in a workflow.

    You should use lists when..

    • Data needs to be accessed across many different classes in a workflow

    You should use class scoped variables when..

    • The data is only needed in one class

    • The data is of a type can be serialised (primitive types, a type marked with [Serializable]). I have one such type in my solution:

      [Serializable]
      public class ReviewerBag {
      public Dictionary Reviewers { get; set; }
      public string Moderator { get; set; }

      public ReviewerBag()
      {
          Reviewers = new Dictionary<string,Reviewer>();
      }
      ...
      

      }

    • If the data is needed between classes in a workflow you can still use variables but beware that each time the variable is declared in a class it will be serialised independently when the workflow becomes idle (e.g. when the workflow waits for a user to complete a task). The variables become out of sync as they are deserialised independently on workflow resume. Moral of the story is use lists to store the data in this scenario!

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

Sidebar

Related Questions

I have developed a workflow for automatically closing appointments that are 28 days past
I've developed Windows Mobile apps in the past and have always found that when
We have a web application which has been developed over the past 7 months.
The simulation tool I have developed over the past couple of years, is written
We have various php projects developed on windows (xampp) that need to be deployed
I have an Out-of-process COM server executable which was developed using Visual Studio 6.0
So in the past I have always developed windows forms client software while inside
From past Year are so, we have developed an application, in which we have
VS 2008 I have developed a device application that runs on windows mobile 5.
We currently have developed an application using WCF. Our clients make connections to different

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.