Start a workflow web service call not started


Badge +3

Hi, its my first post so sorry if its not detailed enough!

I followed this post and this post on starting a workflow using a webservice and it worked a treat in testing. Now i've moved it into a large doc library im getting unusual results. 

The first few tries the web service call was just greyed out, but now I can see that the site workflow has ran successfully, looped through and made the webservice calls on each item ID in my item ID variable, but it hasnt actually kicked off the library level workflow on each item...

Ive seen some people mention that the StartWorkflowOnListItem webservice call doesnt work on doc libraries (think thats right), but when i edit the SOAP below and remove the list ID variable for a file ID it runs and initiates the library level workflow fine.

Any ideas as to why this might be?

UPDATE: I re-ran the site workflow with no list-level workflows running and it still produced this result sad.png

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="http://nintex.com">
<soap:Header>
</soap:Header>
<soap:Body>
  <m:StartWorkflowOnListItem>
    <m:itemId>{WorkflowVariable:ListItemIDs}</m:itemId>
    <m:listName>Asset</m:listName>
    <m:workflowName>Move files and leave link</m:workflowName>
    <m:associationData>
    </m:associationData>
  </m:StartWorkflowOnListItem>
</soap:Body>
</soap:Envelope>


7 replies

Userlevel 4
Badge +11

Hi, could you check what's exactly in your variable (maybe using a log just before call web service action), in order to check that a proper ID is passed to the web service..

in addition, the variable is named ListItemIDs, is it because it contains multiple IDs? I think the web service allows only for a single ID at a time..

Badge +3

Hi, thanks for the reply happy.png

Yeah ive got logging on and I can see that my query list action is grabbing all the library item IDs based on my filter and storing them in a collection variable.

Then I have a For Each looping through each ID in the collection variable that stores the result in list item ID, therefore calling the webservice to start the list-level workflow on each ID individually.

Whats weird is that this exact workflow worked on a test library with about 10 files in, now since I'm using a much much larger library (over 700,000 files) I'm experiencing odd results.

Attached the ID outputs from my query list action and a copy of my workflow for reference.Results from query list action that are stored in collection variable

Workflow design

Userlevel 4
Badge +11

Hi, could you post a screenshot of the For Each configuration?

In addition, 700k items in a single document library is a very huge number (and I think it's something that overtakes SharePoint suggested limits for a single document library..), when I've used a For Each or a Loop and I have to do a lot of iteration, I usually put a pause every 200/300 items, depending on the environment and on the actions inside each iteration because I've seen strange behaviour without and often my workflow errored..

Badge +3

Hi Giacomo Gelosi‌,

Sure, no problem heres a screen of the for each config:

For reference my variables are as follows:

  • CollectListItems : collection
  • ListItemIDs: List item ID
  • WebServiceErrors: multiple lines of text

Good point with the pause, that might be an idea...and yeah I know its a really huge number! I was concerned about running the WF against this library based on its volume to begin with - but here we are!

Since my last update I've tried creating a new variable for ListItemID's that is single/multiple lines of text and also using the GUID of the source library rather than the library name, both to no avail sad.png

Userlevel 4
Badge +11

Ok, also the For Each looks fine..could you check your site workflow if it looks completed or it's errored somewhere? In the second case, it may be that putting the pause that I mention could help..

please note that, putting a pause every 300 items, your workflow will have 700k/300 almost 2400 pause, so it will last something like 200h to be able to process every item (if it has to process all of them)..

Badge +3

Yeah I've had a look and the site workflow completes with no errors, all the actions in my workflow go green and i can see what list item ID's have been collected in my log history step...

I should of mentioned before, my query list action narrows down the volume of data we are processing (were only looking at a sample size of about 600 items).

How would you structure the pase action, based on number of items processed?

Thanks

Anthony

Userlevel 4
Badge +11

Hi Anthony,

I would add also a number variable (e.g. vIndex) connected to the index in the For Each action, then, at the end of each iteration I calculate vIndex Mod 200 and store the result in vIndexMod (other number variable) and I check if vIndex is greater than 0 and vIndexMod is equal 0

Giacomo

Reply