I have a list of items that requires to start a list of tasks. I used StartWorkflowOnListItem web service, everything works fine. It creates a flexi task when the workflow is started on an item. But when the tasks are waiting for completion and a new item is added and the workflow is started, tasks are not getting created for the next item. What am i missing? Why is it not creating the task for the next item if the task for the first item is not completed? Any idea?
can post more details on your setup?
where do you start it from? ie. where do you call web service from?
why do you start it through a service? could not it be triggered directly on item creation?
does the workflow really start on new item? have you checked history log?
what does happen with the workflow if it doesn't create a task? does it fail (any error message?)? does it get stuck?
in your workflow settings (of the workflow who creates the task), is the automatic start on creation checked? In this way, every time a new item is created in the list, the workflow will start.
You mentioned StartWorkflowOnListItem webservice, how do you use it? inside a different workflow? how do you get the item IDs parameter?
Hi Marian. I start the workflow manually. I have a list where i start a workflow manually then in that workflow i have a web service call to start workflow that creates the flexi task. I don't get any error but i don't see the task getting created after the first one.
Hi Giacomo. No, I don't have that checked on the workflow that creates the flexi task because i only need to run the workflow when triggered by the StartWorkflowOnListItem webservice inside a different workflow. To get the item ID, i Query list then do a for loop.
If i run a workflow via StartWorkflowOnListItem webservice, can i have more than one instance running at a time on an item? After reading more last night, it looks like this is the problem i am encountering.
You may have to Log To History in your workflow to see how far you are getting and to see what is running. Also, make sure it is getting inside the For Loop.
yes, a workflow can run only one instance on the same item (you can run again the workflow when it's completed), if you need to start again the workflow, then you have also to terminate the previous instance before calling StartWorkflowOnListItem
do you start workflows across sites?
if not, are you aware of start workflow action?
as well, I quite do not understand your setup - you start some list workflow which in turn starts another list workflow (I assume) on the same list and/or item.
apart from complicating things with WS call, why don't you directly start workflow with flexi task?
it looks like you experience following:
WS call waits until the call finished, ie. until workflow finishes.
likely the workflow still runs when your new item is created and you start it once again.
since it is list workflow, it can run just once on a given item so it just silently does nothing.
hopefully 'no error' means you do not get any error in workflow log, not that you do not get any message on the screen, right?