2

My current live workflow is okay, but i needed to make some changes. So I made those changes, saved them, and went to publish and got an error (common error from copy/paste). So I deleted the changes I made, saved again, and tried to publish. Still received the same error. I closed SPD, cleared the Cache, restarted my computer and still nothing. Is there a way to simply 'Discard" the changes that are "saved" but not yet published? I would like to simply says "Grab the workflow that is currently live and discard everything else."

I've tried:

  • Clear Cache
  • Cut/Re paste Entire WF
  • Check out, Discard Checkout

Any help is greatly appreciated!

1

You probably have a extra Else If branch in your workflow, but it might not show up very easily in the designer.

If you hover over each of your If statements, and the bottom of one of them there if probably an ElseIf block with NO condition and NO actions inside it. Delete this and you are suddenly all OK. It will show as a small block that you can see if you select or hover over it.

How did I discover this? Weeelll

If you have a short workflow it is easy-ish to find.

If not, then you can actually get to the file with the Activity ID 18 in, and do a search through that file.

In SPDesigner go to All Files, Workflows and you will find a workflowname.xoml file

Open this in NOTEPAD and do a find for your activity ID mentioned in the error message above. It will be there as an empty ElseIf block. Now, it is tempting to delete it directly from here, but the safer way is to note where in your workflow it is - what are the things immediately before and after it. Then go back to your workflow in SPDesigner text based editing environment and select and delete the empty block from there.

Save, and publish. Hurray!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.