Terminate SharePoint Site Workflows with Nintex Workflow Part 1| SharePoint How-To

We’ve all been there. You schedule a Nintex site workflow to run on a schedule. Everything is working fine and leave for the day only to come back and something went terribly wrong with the workflow and now you have 10s if not 100s of errored workflows with the status of “Error Occurred” that built up overnight. You troubleshoot and fix the problem, but you still have the problem of canceling the errored workflows. You now have to go through the not-so-fun process of canceling all these workflows by hand.

I thought there could be a way to write a Nintex site workflow to terminate all of the errored workflows looping through all the workflow instances and invoking a web service to terminate the workflow, but alas, such a web service doesn’t exist. In the pursuit, I did come across several solutions using PowerShell and the SharePoint Object Model, but nothing through Nintex. So, after spending more time than I typically would for such a task, I gave up on the possibility and chalked it up to a limitation in both SharePoint and Nintex.

That was until I came across Scott Brickey’s article Mission Impossible : Remotely terminating a SharePoint Workflow . This article opened my eyes because although Scott offers up another PowerShell solution, he does it in a different manner. Instead of using the SharePoint Object Model like many of the other solutions, he leverages web requests, the underlying markup of the pages, and form post actions to terminate the workflow. Since Nintex does offer the web request capability, I figured I’d give it one more try.

And guess what… it worked this time.

Terminate Workflow Action – Under the Covers

Before going into the Nintex solution, we need to understand how the “Terminate Workflow” action works under the covers.

When you go to the “Site Workflows” link from the “Site Actions” screen, you are taken to the page <Site URL>/_ layouts/15/workflow.aspx. Clicking on one of the workflow links (that have the status of “Error Occurred”) takes you to this URL: <Your Site URL>/_layouts/15/WrkStat.aspx?WorkflowInstanceID={<some GUID>}.

This is the Workflow Instance Page where the link “End this workflow” shows. If we were to terminate this workflow manually, we would click this link. Since we want to execute the same action through automation, we need to look at this link a bit further. If we look at the HTML markup, we see the following code:

You can see that when clicking this link the JavaScript function “__doPostBack(‘ctl00$PlaceHolderMain_HtmlAnchorEnd’,”)” gets executed. At times, you have to dig deep in the core SharePoint libraries to see how some of these internal functions are defined, but luckily in our case, it’s all on this page.

Further up the markup, you can find the definition for our function:

Here, you can see that when the __doPostBack function is executed, it submits the form with ID “aspnetForm”. The 2 parameters passed into this function (eventTarget and eventArgument) are then passed in as form values with similar names. From the snippet above, you can see that eventTarget has a value of ‘ctl00$PlaceHolderMain_HtmlAnchorEnd’ and eventArgument is blank. It is important to realize that these values do not change from workflow instance to workflow instance.

This isn’t where the magic is, though. Luckily for us again, the actual form that gets submitted (aspnetForm) is contained within the same page markup:

There are a number of hidden input fields that this form can accept, but for our purposes, the important ones are: __EVENTTARGET, __EVENTARGUMENT, and __REQUESTDIGEST. The first 2 we already know are passed in through the __doPostBack call. So we need to grab the __REQUESTDIGEST value from the form itself. Unlike the other 2 values, this value is unique to each workflow instance page and will need to be grabbed dynamically.

The last thing to note in the markup is the action for the form itself. You can see that when this form submits, it performs a post action to the URL: ./WrkStat.aspx?WorkflowInstanceID=<encoded Workflow InstanceID>.

From all of this, we know that with the following information, we can successfully terminate this workflow:

  • Form Action Parameter: Workflow Instance ID
  • Form Field: __EVENTTARGET
  • Form Field: __EVENTARGUMENT
  • Form Field: __REQUESTDIGEST

 

In our next post, Terminate SharePoint Site Workflows with Nintex Part 2, we will show how to extract all of these values from the markup and programmatically terminate all errored workflows in a loop… all with just Nintex.

One thought on “Terminate SharePoint Site Workflows with Nintex Workflow Part 1| SharePoint How-To”

  1. Brucewap says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Easily customize the behavior of your keyboard with this application that allows you to disable certain keys using custom shortcuts

    Press the “Download Now” button to download Simple Disable Key key crack.
    The whole process will just take a few moments.

    Mirror Link —> Simple Disable Key Crack Patch

    – Version: 9.1
    – Company: 4dots Software
    – Downloads: 3085
    – Download type: safety (no torrent/no viruses)
    – Status file: clean (as of last analysis)
    – File size: undefined
    – Price: free
    – Special requirements: no requirements
    – Home page: 4dots-software.com/simple-disable-key
    – Rating:

    Tags:
    Simple Disable Key license crack
    Simple Disable Key activator
    Simple Disable Key full crack
    Simple Disable Key crack latest
    Simple Disable Key Cracked Latest

    Popular software:
    iMyFone iOS System Recovery serial key
    Simple Disable Key keygen crack patch
    Stereo Tool keygen serial
    CopyTrans Shelbee key crack
    FoneDog Toolkit – Android Data Recovery + Full Crack
    Антиплагиат повышение оригинальности
    Standing Saw – Eiendomsdrift Telemark AS
    EDS Google Books Downloader – download google books free
    17023-NQVHPE-3 – Manifest Housing

  2. Brucewap says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Press the “Download Now” button to download CAD-KAS PDF Editor + Crack Latest.
    The whole process will just take a few moments.

    Mirror Link —> CAD-KAS PDF Editor Crack Patch

    Edit your PDF files by correcting, underlining and highlighting the text, change the order of pages or delete them, as well as encrypt the document

    · Build: 5.5
    · Company: CAD-KAS GbR
    · Downloads: 309
    · Download type: safety (no torrent/no viruses)
    · Status file: clean (as of last analysis)
    · File size: undefined
    · Price: 0
    · Special requirements: no
    · User rating:

    Keywords:
    cad-kas pdf editor crack only, cad-kas pdf editor cracked, cad-kas pdf editor crack, cad-kas pdf editor crack and keygen free download, cad-kas pdf editor keygen free download, cad-kas pdf editor full crack, cad-kas pdf editor keygen free download, cad-kas pdf editor crack hack, cad-kas pdf editor patch, cad-kas pdf editor serial key

    More software:
    ASTER V7 Cracked
    Dimo Video Converter Ultimate Full Version Serial Keys Latest
    Cutting Optimization Pro crack new
    Антиплагиат поможем пройти
    Don’t tell my mom – Miss Daisy Driving
    Download B-17 Gunner: Air War Over Germany keygen serial
    EDS Google Books Downloader – download google books free
    download video from youtu.be
    ОАО “Универсал” | Недвижимость, услуги.
    ГДЗ за 1-11 класс
    Software Cracks Keygens
    How to repair missing or corrupt smartkey.dll

  3. Brucewap says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Press the “Download Now” button to download SparkoCam serial number.
    The whole process will just take a few moments.

    Mirror Link —> SparkoCam crack version

    A professional application that delivers an impressive collection of effects for live webcam streams, with the possibility to use Canon DSLR devices in webcam mode

    · Version: 2.6.5
    · Developer: Sparkosoft
    · Downloads: 1405
    · Download type: safety (no torrent/no viruses)
    · Status file: clean (as of last analysis)
    · File size: undefined
    · Price: free
    · Special requirements: no
    · User rating:

    Tags cloud:
    sparkocam full crack, sparkocam crack only, sparkocam serial code, sparkocam crack version, sparkocam crack latest, sparkocam keygen crack patch, sparkocam license, sparkocam crack patch, sparkocam activator, sparkocam crack serial number

    Popular software:
    Kutools for Outlook license crack
    Droid Transfer keygen crack patch
    Virtual Serial Port Driver Crack Patch
    Антиплагиат помощь студентам
    Блок питания 220V-12V. 1,25 Ампера. | ELEKTROMAG com.ua
    Download The Guild 2: Venice Keygen Serial
    tool for downloading Google books
    download video from facebook
    SPECIALIZATION IN SENSITIVE – Network FOB
    ГДЗ – готовые домашние задания и решебники
    Windows Software Cracks
    How to repair missing or corrupt easyanticheat_x86.dll

  4. Brucewap says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Push the “Download Now” button to download MAXQDA Analytics Pro crack serial number.
    It will just take a few moments.

    Perform qualitative content analysis, use mixed methods to complete your projects with quantitative data and organize information in an efficient manner

    Mirror Link —> MAXQDA Analytics Pro + Crack Latest

    · Build: 2018 18.2
    · Release date: Feb 6th 2019
    · Developer: VERBI Software GmbH
    · Downloads: 8375
    · Download type: safety (no torrent/no viruses)
    · Status: clean (as of last analysis)
    · File size: unknown
    · Price: 0
    · Special requirements: no requirements
    · Systems: Windows 10 64 bit, Windows 10, Windows 8 64 bit, Windows 8, Windows 7 64 bit, Windows 7, Windows Vista 64 bit, Windows Vista, Windows XP 64 bit, Windows XP
    · Rating:

    Tags cloud:
    maxqda analytics pro crack patch, maxqda analytics pro license crack, maxqda analytics pro full crack, maxqda analytics pro serial number, maxqda analytics pro full patched, maxqda analytics pro full crack latest, maxqda analytics pro crack serial number, maxqda analytics pro serial keys x86/x64, maxqda analytics pro and crack, maxqda analytics pro how to ctack

    More software cracks: this way

  5. Brucewap says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Press the “Download Now” button to download Cypheros TS-Doctor crack serial number.
    The process will just take a few seconds.

    Scan, fix and convert a large number of video streams that pass through a receiver, regardless of the recorder format (TS, MTS or M2TS)

    Mirror —> https://downloadcrackserial.com/crack/45966/ts-doctor

    · Version: 2.2.21
    · Crack date: July 8 2019
    · Developer: Frank Siek
    · Downloads: 11751
    · Download type: safety (no torrent/no viruses)
    · Status: clean (as of last analysis)
    · File size: small
    · Price: 0
    · Special requirements: no requirements
    · Supported systems: Win 10 64 bit / Win 10 / Win 8 64 bit / Win 8 / Win 7 64 bit / Win 7 / Win Vista 64 bit / Win Vista
    · Rating:

    Keywords:
    cypheros ts-doctor crack serial number, cypheros ts-doctor crack keygen serial, cypheros ts-doctor crack install, cypheros ts-doctor license crack, cypheros ts-doctor patch, cypheros ts-doctor crack install, cypheros ts-doctor license code, cypheros ts-doctor full crack latest, cypheros ts-doctor crack patch, cypheros ts-doctor license

    Popular software: this way

    Other useful resources:
    Pups and Peaches Guest Blog! | Welcome Baby KC
    Антиплагиат исправить онлайн
    Hello world! – Granero Lounge
    Download Killing Floor: Incursion crack exe
    Merkel und der Praventivpopulismus – Krisen-PR: Der Blog!
    How to Turn On or Off Windows Defender
    Скачать FREE Word Excel password recovery Wizard серийный ключ и кряк
    ГДЗ и решебники для всех классов онлайн
    Repair missing or corrupt dbghelp.dll

  6. Brucewap says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Press the “Download Now” button to download Smarter Battery license.
    The whole process will just take a few seconds.

    Monitor the battery status of your laptop, perform calibration operations and place a small battery gadget on your screen with this user-friendly tool

    Mirror —> Smarter Battery Keygen Crack

    · Version: 5.7
    · Build date: March 15th 2019
    · Company: Microsys Com Ltd
    · Downloads: 24811
    · Download type: safety (no torrent/no viruses)
    · Status: clean (as of last analysis)
    · File size: unknown
    · Price: 0
    · Special requirements: no
    · Systems: Win 10 64 bit / Win 10 / Win 8 64 bit / Win 8 / Win 7 64 bit / Win 7 / Win Vista 64 bit / Win Vista / Win XP
    · Rating:

    Tags:
    smarter battery license code, smarter battery cracked, smarter battery full crack latest, smarter battery update crack, smarter battery crack serial number, smarter battery serial keys x86/x64, smarter battery crack latest version, smarter battery patch, smarter battery + full crack, smarter battery patch

    More keygens: https://crackreactor.org

    Other useful resources:
    Story Board | SamJanea
    Антиплагиат как пройти бесплатно
    Spring – IM Studio
    Download The Operative: No One Lives Forever Cracked Latest
    Hello world! – Mateon
    How to Turn Off Windows Defender Real-time Protection
    Скачать Rylstim Youtube Downloader crack и keygen
    How to repair missing or corrupt wow64.dll
    Sensore cut off cambio per Bafang BBS – EVA

Leave a Reply

Your email address will not be published. Required fields are marked *