.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

OnWorkflowItemChanged fired more than one time for each change

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :SharePoint
I have a state machine workflow that runs without problem in SharePoint 2007. I wanted to have this in SharePoint 2010. I have created the same workflow using Visual Studio 2010, State Machine Workflow for SharePoint 2010 template. It runs ok, except that the OnWorkflowItemChanged is firing more than one time for each change. It is the same funtionality... same definition.  The only difference is the workflow is for SharePoint 2010. I created another state machine workflow, a simple one with two or more states that contain an EventDriven( with OnWorkflowItemChanged) and setState activities. No other activities are defined.  No tasks are created. I have associated this workflow to a Custom List that I created for this test. The workflow starts when an item is created (or manually), then I modify the item from the list and the OnWorkflowItemChanged is firing more than one time. The same situation ... the same problem. I realized that the event is triggered so many times the OnWorkflowItemChanged activity is defined in the workflow. i.e. If the workflow has defined three OnWorkflowItemChanged, the OnWorkflowItemChanged will be fired three times when an item is modified. Anyone have an idea how can I fix this problem? I would appreciate any suggestions to resolve this.  

View Complete Post

More Related Resource Links

SqlDataSource how to change the stored procedures at run time



Is it possible to change the select, insert and update stored procedure of an SqlDataSource at run time. I don't mean to change the definition of the stored procedure, but I mean to change the assignment, i.e. To change the select stored procedure from "selectSP1" to "selectSP2" at run time. Is it possible?



how to change dynamically [Bbrowsable] attribute for a property at design time c#

hi,   how to change dynamically  [Browsable] attribute for a property  at design time c#

Should time date stamp on .Asmx file change when project is rebuilt?

I have a web service project. The web service is named Recalc.asmx and it has a code behind file namedRecalc.asmx.vb Now if I make a change to my web service .vb code and then recompile the project, should my Recalc.asmx filebe updated as well? In windows explorer I see that the time date stamp of my Racalc.asmx.vb file changes to the date of the last change.But the time date stamp of the Recalc.asmx file does not change? Why is that? My original thinking was that I would simply need to copy the Recalc.asmx file to the test server. But the date stillshows it's original creation date of 7/1/2010 and not the date of the last rebuild as I was hoping it would do?

Slow BinaryReader Position Change Time


Hello, I have a question about basically a laggy position change time with a large file (actually, in this case I'm using a 20GB or so disk drive).  Basically what I'm doing is writing my own class that uses the CreateFile function to read raw data from a local disk drive, and then have an extract file class that allows me to seek to blocks (the file system is FAT) that the file occupies, then read the data, piece it together, etc.  I noticed though, that when extracting an 800KB file, it took about 10 seconds to do the process, and the main cause was that changing my reader's position took anywhere from 250 milliseconds to one complete second.

The short version: When extracting a file using my own classes, it took way longer than it should have, and the cause is changing the IO's position.


The code is exactly as you'd probably imagine:

for (int i = 0; i < f.BlocksOccupied.Length - 1; i++)
          br.BaseStream.Position = m.GetBlockOffset(f.BlocksOccupied[i], f.PartInfo);
So what I am asking is if there is any way to speed up the process of moving my posit

Change value of particular cell in Grid view at run time.



I need to know that how i can edit the particular cell value in grid view at run time just by clicking it(value) then it shows text box and after enter any value, it then save in database.

Waiting for response.

Thanks in advance.

DBType change from compile time to run time. I am not using a view, it is against the oracle db I do


The OLE DB provider "OraOLEDB.Oracle" for linked server "SOMESERVER" supplied inconsistent metadata for a column. The column "ACTIONITEMID" (compile-time ordinal 1) of object ""SOMESERVER_Action"."AI_ACTIONITEM"" was reported to have a "DBTYPE" of 130 at compile time and 131 at run time.

SSRS 2008 Time min change to hour


Hi there

I've got a problem in my report.


I have 2 colums "Expense" "Entity"


Expense has an issue 300 and entity min.

what i'd like is, that it change to 5 hours.

but it should issue min if expense is below an hour.


Any ideas?

One who can read, have a clear advantage!

Scripting a change to Backup time



I have a backup plan defined in SQL Server that runs every night at 8PM. However sometimes I need to change this time to 5PM to allow a reboot of the server due to Windows updates. Some other tasks get rescheduled as well. I want to script this time change so that I do not need to manually change the backup time.

Is there a command line tool that will let me change the configuration of SQL Server? and specifically let me reschedule the time of the backup?

The scripts are written in Ruby not C#, this is fine as long as there is a command line tool.



.we each have more potential than we might ever presume to guess. (Blog: http://dsmyth.blogspot.com/)

SSAS Time Dimension (academic years, quarters) change over time


Apologies if I don't state teh question properly or am overlooking obvious answers - just started working with SSAS and barely beginner level.

I'm working on a cube to show student enrollments in different subject areas over time - for this purpose I'm only concerned about academic years and semesters.  In the underlying dimension table I have data like

1 2006          SUMMER  SUMMER 2006
2 2006          FALL  FALL 2006
3 2006          SPRING  SPRING 2007 (note that spring 2007 is part of the 2006 academic year)
4 2007          SUMMER  SUMMER 2007
5 2007          FALL  FALL 2007
6 2007          SPRING  SPRING 2008
and so on

I've set up a simple hierarchy with only two levels - ACAD YEAR->DESCR

For the cube I have one measure: 'Enrollments' which shows the sum of students who have enrolled

What I'd like to be able to do is show the f

error redoing dashboards: dwd:design-time-name tag or AttributeID change?


hi all,
I have a user who designed some dashboards in Sharepoint 2010/PPS who apparently cannot use the previously created dashboards without dropping and re-adding a recently modified dimension.   This dimension apparently has the same Name and ID properties as the older version however I now see   dwd:design-time-name  tags wrapping around all objects in the newly created AS Database.  Not sure what is going on and how to mitigate these changes.   Furthermore, for *some* attributes of those dimensions, I see that the AttributeID property has changed from one version to another.

any pointers are much appreciated,



how to change infopath form time (function now())

my infopath form has a default time now() for the field. my sp2010 server has correct time and time zone, for example 4:11pm EST now, but when open the form in sp2010 web browser form, it shows 1:11pm. any idea how to fix it?
however, if I do preview, it shows correct ime 4:11pm

Workflow - Change List Permissions - Time Issues


I have a workflow which starts automatically on a submitted Expense Report InfoPath form. The default permissions on the Expense Report library is 'Contribute' for all users. The workflow then removes those permissions from the submitted Expense Report, and gives the Creator, Users Manager, and an Accounts Payable User 'Full Control' over the item.

My problem is that it takes approximately 5-10 seconds from the point the form is submitted, the workflow is started, and the permissions to change. I realize it's not a huge window of time, but it is enough time for anyone looking in that folder, to notice someone else's Expense Report and click on it.

I tried creating an 'Incoming Expense Reports' library, with a workflow on it that would change the permissions, and then copy the item to the Expense Report library, but the permissions were not copied over to the new item.

Does anyone have any suggestion on how I can reduce the time it takes to change permissions to 1-2 seconds, or any alternative way of solving this?

Round off time to the nearest minute

How would you round this up to the nearest minute? There isn't a built in function to do this so you have to use a little bit of maths to get there. There are 60 seconds in a minute. We already have 38 seconds on the clock. So we need to add on 60 - 38 = 22 more seconds.

Performance Tests: Precise Run Time Measurements with System.Diagnostics.Stopwatch

Everybody who does performance optimization stumbles sooner or later over the Stopwatch class in the System.Diagnostics namespace. And everybody has noticed that the measurements of the same function on the same computer can differ 25% -30% in run time. This article shows how single threaded test programs must be designed to get an accuracy of 0.1% - 0.2% out of the Stopwatch class. With this accuracy, algorithms can be tested and compared.

Date and Time Functions in SQLSERVER

Date and time functions allow you to manipulate columns and variables with DATETIME and SMALLDATETIME data types.

1 DATEPART Function
2 DATENAME Function
3 DAY, MONTH, and YEAR Functions
5 DATEADD Functions
6 DATEDIFF Function
7 More SQL Server Functions

Data Types - Date and Time in SqlServer

Date and time values can be stored with either the DATETIME or SMALLDATETIME data type. The difference between the two is that SMALLDATETIME supports a smaller range of dates and does not give the same level of precision when accounting for time. The DATETIME data type can hold values from January 1st of 1753 to December 31st of 9999. The time is stored to the 1 three hundredths of a second and each value takes up 8 bytes of storage. The SMALLDATETIME data type can hold values between January 1st 1900 and June 6th of 2079. The time is tracked to the minute and each value takes up 4 bytes of storage. The majority of business applications can live happily with SMALLDATETIME, however, if you are in an environment where each second matters or you need to make estimates to the distant future (or past) then you have to resort to DATETIME. If you fail to specify the time when inserting a value into a DATETIME or SMALLDATETIME column, a default of midnight is used. If you fail to specify the date portion the default of January 1, 1900 is used.

How to programmatically add controls to Windows forms at run time by using Visual C#

Create a Windows Forms Application
Start Visual Studio .NET or Visual Studio 2005 or a later version, and create a new Visual C# Windows Application project named WinControls. Form1 is added to the project by default.
Double-click Form1 to create and view the Form1_Load event procedure.
Add private instance variables to the Form1 class to work with common Windows controls. The Form1 class starts as follows:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend