cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

How to ID the state of a workflow on a list

Jump to solution

Maybe this is an answered question and I'm not looking for it correctly, but I want to understand if there is a method to report out all workflows running on a list, and those that have been suspended and/or terminated, reporting back my list ID.

Labels: (1)
Reply
7 Replies
Workflow Hero

Re: How to ID the state of a workflow on a list

Jump to solution

Hi Curtis,

I had the same question yesterday and I found this : a good link

I hope it helps.

Regards

Reply
Workflow Hero

Re: How to ID the state of a workflow on a list

Jump to solution

Thanks for the information Pierre.  Where you able to use these instructions and make it work?  I'm running into a few issues just at the connecting to SP step.  Not sure if its me or the code.

0 Kudos
Reply
Workflow Hero

Re: How to ID the state of a workflow on a list

Jump to solution

Hi Curtis,

To work with SharePoint Online Management Shell, one should be a SharePoint Online Global Administrator. If you are already global administrator, and still not able to connect, what issues you are running into? Please share error messages if any.

0 Kudos
Reply
Workflow Hero

Re: How to ID the state of a workflow on a list

Jump to solution

Hello Krishna,

I am the a global admin.  I was following the steps suggested above by Pierre and available  Here.  I followed the first three steps but then try to run:

$clientContext = New-Object Microsoft.SharePoint.Client.ClientContext($SiteUrl)

I get this error:

New-Object : A constructor was not found. Cannot find an appropriate constructor for type
Microsoft.SharePoint.Client.ClientContext.
At line:1 char:18
+ ... ntContext = New-Object Microsoft.SharePoint.Client.ClientContext($Sit ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Smiley Happy [New-Object], PSArgumentException
+ FullyQualifiedErrorId : CannotFindAppropriateCtor,Microsoft.PowerShell.Commands.NewObjectCommand

I'm a novice in PowerShell and have no idea where to go from here.

0 Kudos
Reply
Workflow Hero

Re: How to ID the state of a workflow on a list

Jump to solution

Hello Curtis,

I see a same error message got by someone and he himself posted a solution, saying he is passing a null value for site url, link is here, please check if it is useful.

And below is syntax:

$SiteUrl = "https://mysite"

$UserName = "uname"
$SecurePassword = Read-Host -Prompt "Enter password" -AsSecureString 

$ClientContext = New-Object Microsoft.SharePoint.Client.ClientContext($SiteUrl)
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName, $SecurePassword)
$ClientContext.Credentials = $credentials
$ClientContext.ExecuteQuery()

Thanks,

Krishna.

0 Kudos
Reply
Workflow Hero

Re: How to ID the state of a workflow on a list

Jump to solution

Thank you Krishna.  What you provide makes sense.  I will try to muddle through the rest of the directions.   I'm surprised that a WF action or some other configurable solution hasn't been developed to query the list items that have WF's running on them yet.  Seems like this would be handy for a lot of people.

0 Kudos
Reply
Workflow Hero

Re: How to ID the state of a workflow on a list

Jump to solution

I don't see any such action that suites your requirement.

0 Kudos
Reply