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>soaperver</faultcode><faultstring>Server was unable to process request. ---> 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.
Solved! Go 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.
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.
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.
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.
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.
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.
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.
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.)