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

Starting a workflow with workflow.asmx service

I have a requirement where i have to run a workflow 'daily' at specific instance of time. I am consuming workflow.asmx webservice (using call a webservice action) to achieve my aim. with the following soap request:

<?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:AddWorkflowSchedule>

      <m:fileUrl></m:fileUrl>

      <m:workflowName>{Common:WorkflowTitle}</m:workflowName>

      <m:startDataXml></m:startDataXml>

      <m:schedule>

        <m:MaximumRepeats>0</m:MaximumRepeats>

        <m:WorkdaysOnly>false</m:WorkdaysOnly>

        <m:RepeatInterval>

          <m:Type>Daily</m:Type>

          <m:CountBetweenIntervals>1</m:CountBetweenIntervals>

        </m:RepeatInterval>

        <m:EndOn>NoLimit</m:EndOn>

        <mSmiley FrustratedtartTime>2014-09-23T14:00:00</mSmiley FrustratedtartTime>

        <m:EndTime>0001-01-01T00:00:00</m:EndTime>

      </m:schedule>

      <m:updateIfExists>true</m:updateIfExists>

    </m:AddWorkflowSchedule>

  </soap:Body>

</soap:Envelope>

upon running the action i receive the following response:

<soap:Fault xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>soapSmiley Frustratederver</faultcode><faultstring>Server was unable to process request. ---&gt; Cannot find workflow '00000000-0000-0000-0000-000000000000'.</faultstring><detail /></soap:Fault>

P.S: it is a list workflow.

Please guide if i am missing something.

Labels: (1)
0 Kudos
Reply
13 Replies
Automation Master
Automation Master

Re: Starting a workflow with workflow.asmx service

One option is to use a site workflow that is scheduled to your specs, and in it use the Start Workflow action. You could also call the workflow web service, but because it is being called from a scheduled workflow you wouldn't have to specify the schedule in the webservice call.

Reply
Not applicable

Re: Starting a workflow with workflow.asmx service

I am trying to do the same thing as Mr. Murad but the error I get is  <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

Is it necessary to fill in the fileUrl in the Web Service Input section? Because I do not have a file. I am just trying to get a site workflow to start a list workflow every day, using the StartWorkflow web method in workflow.asmx web service. So I have a workflowName to enter, but no fileUrl.

0 Kudos
Reply
Automation Master
Automation Master

Re: Starting a workflow with workflow.asmx service

No, i do not believe you need the fileurl property. Please see Start a Workflow using a Web Service for more information and a walkthrough to use the web method. Let us know if this doesn't help.

0 Kudos
Reply
Not applicable

Re: Starting a workflow with workflow.asmx service

Thanks, I had already found that and it did not help – that is why I asked for help here.

0 Kudos
Reply
Automation Master
Automation Master

Re: Starting a workflow with workflow.asmx service

Ok, it's good to know what you have already tried. Maybe start another post with some more information about your case? Could you post a screen shot of your web service call so we can see your configuration?

0 Kudos
Reply
Not applicable

Re: Starting a workflow with workflow.asmx service

OK, here it is - https://community.nintex.com/message/4437#4437

0 Kudos
Reply
Automation Master
Automation Master

Re: Starting a workflow with workflow.asmx service

Muhammad, could you reiterate what you need the workflow schedule to do? Do you need to schedule a site workflow once, or many workflows many times? Or can a site workflow that is scheduled start other workflows?

0 Kudos
Reply
Not applicable

Re: Starting a workflow with workflow.asmx service

I am not Muhammad, my name is Pat. I wanted to schedule a site workflow to run one time each day. When it ran, it was supposed to start a list workflow that would run through all items in a list, check to see if the items were more than 6 months old, and send a reminder email to the initiator if they were more than 6 months old. I cannot get the StartWorkflow web method to start the list workflow; only the StartWorkflowOnListItem web method works.

0 Kudos
Reply
Automation Master
Automation Master

Re: Starting a workflow with workflow.asmx service

If you are starting the workflow on a Document Library, then you provide the URL of the document in the FileUrl parameter. (I was thinking of a list item start and was confused about the FileURL. It is definitely needed for doc lib workflows.) If you need to start a workflow on a list item, then use the method StartWorkflowOnListItem instead.

Reply