cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can't start list workflow from site workflow

Jump to solution

Hi, I'm trying to start a list workflow from a site workflow using the Call web service workflow action. I get this error result when I run the action - <soap:Fault xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>soapSmiley Frustratederver</faultcode><faultstring>Server was unable to process request. ---&gt; Value does not fall within the expected range.</faultstring><detail /></soap:Fault>

The list workflow does run when I start it manually. Testing the connection to the web service is successful.

I'll attach screen shots of the web service action and the Run Now configuration. I thought maybe the problem was that I do not have a fileUrl to enter - since it doesn't state that's an optional parameter. But I have no idea what to enter there since I'm trying to run the second workflow on a list not a document.

Labels: (1)
0 Kudos
Reply
16 Replies
Workflow Hero

Re: Can't start list workflow from site workflow

Jump to solution

Pat, for a list you need to use the "StartWorkflowOnListItem" web method.  See this document for instructions. Start a Workflow using a Web Service

0 Kudos
Reply
Not applicable

Re: Can't start list workflow from site workflow

Jump to solution

Oh, ok, I had that working but my manager wanted instead for me to create a generic runs-once-a-day site workflow that could run more than one list workflow. Guess that can’t be done. Thanks.

0 Kudos
Reply
Workflow Hero

Re: Can't start list workflow from site workflow

Jump to solution

If you are starting the workflow on a Document Library, then you provide the URL of the document in the FileUrl parameter. If you need to start a workflow on a list item, then use the method StartWorkflowOnListItem instead.

0 Kudos
Reply
Not applicable

Re: Can't start list workflow from site workflow

Jump to solution

OK, thanks, I had that one working but my manager wanted me to change it so I had a generic site workflow that could run once a day and start multiple list workflows. I will have to tell him that cannot be done, I guess.

0 Kudos
Reply
Workflow Hero

Re: Can't start list workflow from site workflow

Jump to solution

Oh, I didn't see Brendan's reply.

But why can't you create a generic site workflow that can start on more than one list? This should be no problem since you can use references on the listname field. This can come from a variable that knows the list name. You can even do this in a loop and have this single action start more than one workflow as the variable changes.

0 Kudos
Reply
Workflow Hero

Re: Can't start list workflow from site workflow

Jump to solution

don't give up just yet, see my earlier reply

0 Kudos
Reply
Not applicable

Re: Can't start list workflow from site workflow

Jump to solution

Because the StartWorkflow web method doesn’t work. I have to use the StartWorkflowOnListItem web method, which means I have to first get all the items from the list that I want to start the workflow on. I think it is a moot point anyway, because I can’t get the list workflow to work on multiple items anyway, only one.

0 Kudos
Reply
Workflow Hero

Re: Can't start list workflow from site workflow

Jump to solution

Yes, the StartWorkflow method is set to only function on Document Libraries. If you provide a FileUrl, it will work.

There is a simple way to use the StartWorkflowOnListItem on all or part of the items in the list.

  • First perform a list query on the list and fetch the ID's of the items and put them in a collection.
  • Perform a ForEach loop on the ID collection
  • have the WebService Call for StartWorkflowOnListItem and fill in the ItemID with the current value variable from the loop (the item id), then provide the list name, provide the workflow name.

Then you can get the list workflow to work on multiple items. If you also want to take this further you can make the workflow and list name as a configurable variable and allow a loop around the foreach. And allow the workflow to go through multiple lists.

0 Kudos
Reply
Not applicable

Re: Can't start list workflow from site workflow

Jump to solution

Yes, this is what I had initially – my manager wanted the site workflow to be completely generic, so it could run the list workflows like they were running from a scheduled task. (He actually wanted to run them from a scheduled task but I have no idea if that can be done so I am trying to get the site workflow to work.)

0 Kudos
Reply