cancel
Showing results for 
Search instead for 
Did you mean: 

Process with WebService Task never ends

dankre
Champ in-the-making
Champ in-the-making
Hi,

during my tests with webservices, I noticed that the started process never ends. If I check what the process is actually doing, it is still at the webservice task. So, after calling the webservice, the task is not completed automatically. Am I doing something wrong?

You can reproduce it with the activiti-cxf-examples. Remove the receiveTask from WebServiceTaskTest.testWebServiceInvocation.bpmn20.xml



  <process id="webServiceInvocation">

    <startEvent id="theStart" />

    <sequenceFlow id="flow1" sourceRef="theStart" targetRef="webService" />

    <serviceTask id="webService"
                 name="Web service invocation"
                 implementation="##WebService"
                 operationRef="tns:incOperation" />

    <sequenceFlow id="flow2" sourceRef="webService" targetRef="theEnd" />

    <endEvent id="theEnd" />

  </process>


Add a check to WebServiceTaskTest.java



    @Deployment
    public void testWebServiceInvocation() throws Exception {
       
       assertEquals(-1, counter.getCount());
       
       ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("webServiceInvocation");
       waitForJobExecutorToProcessAllJobs(10000L, 250L);

       assertTrue(processInstance.isEnded());
       
       assertEquals(0, counter.getCount());
    }


Regards
Daniel
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
Indeed, correct. Thanks for the detailed explanation!

I fixed it on trunk (http://jira.codehaus.org/browse/ACT-731), so it will be in the release of next week.