cancel
Showing results for 
Search instead for 
Did you mean: 

activiti engine crashes when calling WS

activiti_user11
Champ in-the-making
Champ in-the-making
Hi, I haven't been able to deploy and run the cxf-example so I have made my own WS based on a simple example I found, and deploy it to a glassfish server in the 8181 port so it won't interfere with the activiti 8080 port.

I have copied all the needed .jars into activiti-explorer and activiti-rest lib folder in web-inf, and I am able to deploy the .bar I have generated in the activiti designer to invoke my WS. I can see the diagram and the bpmn20.xml in activiti-explorer but when I want to navigate to the process definition to start a new instance the engine crashes and it is not able to recover.

the bpmn20.xml has an id and a name, as I've read that not having one makes the engine to crash also. The error is again at vaadin:

INFO: Server startup in 16021 ms
06-oct-2011 15:50:21 org.activiti.explorer.cache.TrieBasedUserCache loadUsers
INFO: Caching users 0 to 25
06-oct-2011 15:52:25 com.vaadin.Application terminalError
GRAVE: Terminal error:
com.vaadin.event.ListenerMethod$MethodException
Cause: java.lang.NullPointerException
        at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
        at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
        at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1193)
        at com.vaadin.ui.Button.fireClick(Button.java:539)
        at com.vaadin.ui.Button.changeVariables(Button.java:206)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunication
Manager.java:1299)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunication
Manager.java:1219)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunication
Manager.java:735)
        at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
        at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
        at com.vaadin.data.util.ObjectProperty.<init>(ObjectProperty.java:57)
        at org.activiti.explorer.ui.process.ProcessDefinitionListQuery.createItem(ProcessDefinitionListQuery.java:65)
        at org.activiti.explorer.ui.process.ProcessDefinitionListQuery.loadItems(ProcessDefinitionListQuery.java:49)
        at org.activiti.explorer.data.LazyLoadingContainer.getItem(LazyLoadingContainer.java:101)
        at org.activiti.explorer.data.LazyLoadingContainer.getContainerProperty(LazyLoadingContainer.java:87)
        at com.vaadin.ui.AbstractSelect.getContainerProperty(AbstractSelect.java:745)
        at com.vaadin.ui.Table.refreshRenderedCells(Table.java:1550)
        at com.vaadin.ui.Table.attach(Table.java:2920)
        at com.vaadin.ui.AbstractComponent.setParent(AbstractComponent.java:570)
        at com.vaadin.ui.AbstractComponentContainer.addComponent(AbstractComponentContainer.java:211)
        at com.vaadin.ui.GridLayout.addComponent(GridLayout.java:223)
        at com.vaadin.ui.GridLayout.addComponent(GridLayout.java:287)
        at org.activiti.explorer.ui.AbstractPage.addSelectComponent(AbstractPage.java:111)
        at org.activiti.explorer.ui.AbstractPage.initUi(AbstractPage.java:56)
        at org.activiti.explorer.ui.process.ProcessDefinitionPage.initUi(ProcessDefinitionPage.java:69)
        at org.activiti.explorer.ui.AbstractPage.attach(AbstractPage.java:43)
        at com.vaadin.ui.AbstractComponent.setParent(AbstractComponent.java:570)
        at com.vaadin.ui.AbstractComponentContainer.addComponent(AbstractComponentContainer.java:211)
        at com.vaadin.ui.CssLayout.addComponent(CssLayout.java:93)
        at org.activiti.explorer.ui.mainlayout.MainLayout.setMainContent(MainLayout.java:58)
        at org.activiti.explorer.ui.MainWindow.switchView(MainWindow.java:79)
        at org.activiti.explorer.DefaultViewManager.switchView(DefaultViewManager.java:272)
        at org.activiti.explorer.DefaultViewManager.showProcessDefinitionPage(DefaultViewManager.java:200)
        at org.activiti.explorer.ui.management.deployment.DeploymentDetailPanel$2.buttonClick(DeploymentDetail
Panel.java:156)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490)
        … 22 more
06-oct-2011 15:52:25 com.vaadin.Application terminalError
GRAVE: Terminal error:
java.lang.NullPointerException
        at com.vaadin.data.util.ObjectProperty.<init>(ObjectProperty.java:57)
        at org.activiti.explorer.ui.process.ProcessDefinitionListQuery.createItem(ProcessDefinitionListQuery.java:65)
        at org.activiti.explorer.ui.process.ProcessDefinitionListQuery.loadItems(ProcessDefinitionListQuery.java:49)
        at org.activiti.explorer.data.LazyLoadingContainer.getItem(LazyLoadingContainer.java:101)
        at org.activiti.explorer.data.LazyLoadingContainer.getContainerProperty(LazyLoadingContainer.java:87)
        at com.vaadin.ui.AbstractSelect.getContainerProperty(AbstractSelect.java:745)
        at com.vaadin.ui.Table.refreshRenderedCells(Table.java:1550)
        at com.vaadin.ui.Table.getVisibleCells(Table.java:2772)
        at com.vaadin.ui.Table.paintContent(Table.java:2349)
        at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
        at com.vaadin.ui.GridLayout.paintContent(GridLayout.java:543)
        at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
        at com.vaadin.ui.CustomComponent.paintContent(CustomComponent.java:133)
        at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
        at com.vaadin.ui.CssLayout.paintContent(CssLayout.java:187)
        at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.writeUidlResponce(AbstractCommunicationManager.java:954)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.paintAfterVariableChanges(AbstractCommunicationManager.java:841)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:767)
        at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
        at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:662)

any suggestions ?
regards, Vero
17 REPLIES 17

activiti_user11
Champ in-the-making
Champ in-the-making
I'm sorry but I've been dealing with this for more than two weeks now and I'm still couldn't get the WS invocation running Smiley Sad I've looked at the examples and build my project the same way but calling an external WS. And there is no ItemDefinition.createInstance in the bpmn20.xml from the cxf-examples, with or without data flow definition. Attached is one of the examples I am trying to follow and my own process.
regards, Vero

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Please provide unit tests. I doubt anyone can/will help working from screenshots of the xml of processdefinitions.

activiti_user11
Champ in-the-making
Champ in-the-making
I'm sorry but there are no unit tests in the examples only the bpmn20.xml files to call the WS. Maybe you can provide me with an example ?
regards, Vero

activiti_user11
Champ in-the-making
Champ in-the-making
Maybe I don't understand how activiti works, I assume that when I deploy a bpmn20.xml that has an invocation to a ws the engine navigates from one activity to another and if I put an input variable in a form and then I assign it as the corresponding parameter to invoke the WS the value should have been copied from one to another. Is this right ?
regards, Vero

code_expert
Champ in-the-making
Champ in-the-making
Hi, I was getting exactly the same exception. But I managed to resolve this.

The culprit was line no 3 in below code.  The name field was not provided in my bpmn20.xml
I modified my process Id and the exception disappeared Smiley Happy Smiley Happy
So happy to see my process on the Activiti explorer.
<process id="ConsumeSpectrumWebservice" name="ConsumeWS">


I think Activiti code needs to be modified to add Null pointer checks


class org.activiti.explorer.ui.process.ProcessDefinitionListQuery

protected ProcessDefinitionListItem createItem(ProcessDefinition processDefinition) {
    ProcessDefinitionListItem item = new ProcessDefinitionListItem();
    item.addItemProperty("id", new ObjectProperty<String>(processDefinition.getId()));
    item.addItemProperty("name", new ObjectProperty<String>(processDefinition.getName()));
    item.addItemProperty("key", new ObjectProperty<String>(processDefinition.getKey()));
    return item;
  }

activiti_user11
Champ in-the-making
Champ in-the-making
hi, the error of the null pointer due to the no name of the process I was able to solve it, it is a ui checking problem, but now, I can deploy the process, I can see the model and I can start a process instance, and there is when I've got this other null pointer error.

This is the code of my bpmn20.xml, can anybody tell me what is wrong ? because I've read the user guide, and several posts about errors when defining and passing process variables from forms to WS, I've tried several ways defining the I/O and now with the simplistic approach, but no one seems to work.

<?xml version="1.0" encoding="UTF-8"?>
<definitions
id="definitions"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:activiti="http://activiti.org/bpmn"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC"
xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI"
typeLanguage="http://www.w3.org/2001/XMLSchema"
targetNamespace="org.activiti.engine.impl.webservice"
xmlns:tns = "org.activiti.engine.impl.webservice"
xmlns:echo = "http://echo/">
 
  <import importType="http://schemas.xmlsoap.org/wsdl/"
          location="http://localhost:8181/pruWS/Echo2Service?wsdl"
          namespace="http://echo/" />
 
  <process id="helloworld" name="helloworld">
    <startEvent id="startevent1" name="Start"></startEvent>
    <userTask id="usertaskInput" name="Get input message" activiti:assignee="kermit">
      <extensionElements>
        <activiti:formProperty id="input" name="Inputmessage" type="string" variable="input" required="true" readable="true" writable="true">
        </activiti:formProperty>
        </extensionElements>
    </userTask>
   
    <serviceTask id="webServiceTask" name="Call WS" implementation="##WebService" operationRef="tns:echoOperation">
        <dataInputAssociation>
        <sourceRef>input</sourceRef><!– name of an Activiti variable –>
        <targetRef>arg0</targetRef><!– name of an element of the input message –>
      </dataInputAssociation>
      <dataOutputAssociation>
       <sourceRef>return</sourceRef><!– name of an element of the output message –>
       <targetRef>output</targetRef><!– name of an Activiti variable –>
      </dataOutputAssociation>
    </serviceTask>
   
    <userTask id="usertask1" name="Show output message" activiti:assignee="kermit">
      <extensionElements>
        <activiti:formProperty id="output" name="Outputmessage" type="string" variable="output" required="false" readable="true" writable="false">
       
        </activiti:formProperty>
      </extensionElements>
    </userTask>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow1" name="" sourceRef="startevent1" targetRef="usertaskInput"></sequenceFlow>
    <sequenceFlow id="flow2" name="" sourceRef="usertaskInput" targetRef="webServiceTask"></sequenceFlow>
    <sequenceFlow id="flow3" name="" sourceRef="webServiceTask" targetRef="usertask1"></sequenceFlow>
    <sequenceFlow id="flow4" name="" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow>
  </process>
 
<itemDefinition id="input" structureRef="string" />
  <itemDefinition id="arg0" structureRef="string" />
  <itemDefinition id="return" structureRef="string" />
  <itemDefinition id="output" structureRef="string" />
 
   <!– Interface: implementationRef = QName of WSDL Port Type –>
  <interface name="Echo Interface" implementationRef = "echo:Echo2" >
    <!– Operation: implementationRef = QName of WSDL Operation –>
    <operation id="echoOperation" name="Echo Operation" implementationRef="echo:echo">
      <inMessageRef>tns:echo</inMessageRef>
      <outMessageRef>tns:echoResponse</outMessageRef>
    </operation>
  </interface>

  <message id="echo" itemRef="tns:echoItemRequest" />
  <message id="echoResponse" itemRef="tns:echoItemResponse" />

<itemDefinition id="echoItemRequest" structureRef="tns:echo" /><!– QName of input element –>
  <itemDefinition id="echoItemResponse" structureRef="tns:ecoResponse" /><!– QName of output element –>
 
 
  <bpmndi:BPMNDiagram id="BPMNDiagram_helloworld">
    <bpmndi:BPMNPlane bpmnElement="helloworld" id="BPMNPlane_helloworld">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="35" width="35" x="50" y="90"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertaskInput" id="BPMNShape_usertaskInput">
        <omgdc:Bounds height="55" width="105" x="130" y="80"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="webServiceTask" id="BPMNShape_webServiceTask">
        <omgdc:Bounds height="55" width="105" x="280" y="80"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
        <omgdc:Bounds height="55" width="105" x="430" y="80"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35" width="35" x="570" y="90"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="85" y="107"></omgdi:waypoint>
        <omgdi:waypoint x="130" y="107"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="235" y="107"></omgdi:waypoint>
        <omgdi:waypoint x="280" y="107"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="385" y="107"></omgdi:waypoint>
        <omgdi:waypoint x="430" y="107"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
        <omgdi:waypoint x="535" y="107"></omgdi:waypoint>
        <omgdi:waypoint x="570" y="107"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

and this is the WSDL:

<?xml version="1.0" encoding="UTF-8"?>
<!– Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.3-hudson-757-SNAPSHOT. –>
<!– Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.3-hudson-757-SNAPSHOT. –>
<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://echo/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://echo/" name="Echo2Service">
<types>
  <xsd:schema>
   <xs:schema xmlns:tns="http://echo/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://echo/">
      <xs:element name="echo" type="tns:echo" />
    <xs:element name="echoResponse" type="tns:echoResponse" />
    <xs:complexType name="echo">
     <xs:sequence>
      <xs:element name="arg0" type="xs:string" minOccurs="0" />
     </xs:sequence>
    </xs:complexType>
    <xs:complexType name="echoResponse">
     <xs:sequence>
      <xs:element name="return" type="xs:string" minOccurs="0" />
     </xs:sequence>
    </xs:complexType>
   </xs:schema>
  </xsd:schema>
</types>

<message name="echo">
  <part name="parameters" element="tns:echo"/>
</message>

<message name="echoResponse">
  <part name="parameters" element="tns:echoResponse"/>
</message>

<portType name="Echo2">
  <operation name="echo">
   <input message="tns:echo"/>
   <output message="tns:echoResponse"/>
  </operation>
</portType>

<binding name="Echo2PortBinding" type="tns:Echo2">
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
  <operation name="echo">
   <soapSmiley Surprisedperation soapAction=""/>
   <input>
    <soap:body use="literal"/>
   </input>
   <output>
    <soap:body use="literal"/>
   </output>
  </operation>
</binding>

<service name="Echo2Service">
  <port name="Echo2Port" binding="tns:Echo2PortBinding">
   <soap:address location="http://localhost:8181/pruWS/Echo2Service'/>
  </port>
</service>
</definitions>


and this is the error I get:

12-oct-2011 12:10:44 com.vaadin.Application terminalError
GRAVE: Terminal error:
com.vaadin.event.ListenerMethod$MethodException
Cause: com.vaadin.event.ListenerMethod$MethodException
Cause: java.lang.NullPointerException
        at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
        at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
        at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1193)
        at com.vaadin.ui.Button.fireClick(Button.java:539)
        at com.vaadin.ui.Button.changeVariables(Button.java:206)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVar iableBurst(AbstractCommunicationManager.java:1299)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVar iables(AbstractCommunicationManager.java:1219)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleU idlRequest(AbstractCommunicationManager.java:735)
        at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
        at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:619)
Caused by: com.vaadin.event.ListenerMethod$MethodException
Cause: java.lang.NullPointerException
        at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
        at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
        at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1193)
        at org.activiti.explorer.ui.form.FormPropertiesForm.access$000(FormPropertiesForm.java:45)
        at org.activiti.explorer.ui.form.FormPropertiesForm$1.buttonClick(FormPropertiesForm.java:139)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490)
        … 22 more
Caused by: java.lang.NullPointerException
        at org.activiti.engine.impl.bpmn.data.ItemDefinition.createInstance(ItemDefinition.java:44)
        at org.activiti.engine.impl.bpmn.webservice.MessageDefinition.createInstance(MessageDefinition.java:35)
        at org.activiti.engine.impl.bpmn.behavior.WebServiceActivityBehavior.execute(WebServiceActivityBehavior.java:69)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:40)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyL
istenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:48)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.exe cute(AbstractEventAtomicOperation.java:52)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.exe
cute(AbstractEventAtomicOperation.java:45)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateS cope.execute(AtomicOperationTransitionCreateScope.java:44)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyL
istenerTake.execute(AtomicOperationTransitionNotifyListenerTake.java:61)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroy
Scope.execute(AtomicOperationTransitionDestroyScope.java:111)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyL
istenerEnd.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:36)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.exe
cute(AbstractEventAtomicOperation.java:52)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.exe
cute(AbstractEventAtomicOperation.java:45)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:326)
        at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOu
tgoingBehavior(BpmnActivityBehavior.java:92)
        at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDe
faultOutgoingBehavior(BpmnActivityBehavior.java:49)
        at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44)
        at org.activiti.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.leave(AbstractBpmnActivityBehavior.java:37)
        at org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior.signal(UserTaskActivityBehavior.java:74)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.signal(ExecutionEntity.java:309)
        at org.activiti.engine.impl.persistence.entity.TaskEntity.complete(TaskEntity.java:149)
        at org.activiti.engine.impl.cmd.SubmitTaskFormCmd.execute(SubmitTaskFormCmd.java:74)
        at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
        at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
        at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
        at org.activiti.engine.impl.FormServiceImpl.submitTaskFormData(FormServiceImpl.java:68)
        at org.activiti.explorer.ui.task.TaskDetailPanel$4.handleFormSubmit(TaskDetailPanel.java:306)
        at org.activiti.explorer.ui.form.FormPropertiesEventListener.componentEvent(FormPropertiesEventListener.java:39)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490)
        … 31 more

thanks.
regards, Vero

activiti_user11
Champ in-the-making
Champ in-the-making
Hi, I've managed to get the WS calling work, but I am not able to display the WS response. This is the new code for my activiti process, can anybody tell me if I am missing something ?

the  WS response variable is assigned to the output process variable and I want to display the output variable value.

I have not found in the examples a user task showing a response variable, only accesing objects created but I do not want to create any objects to hold the variables values but to access them directly in the process execution.

<?xml version="1.0" encoding="UTF-8"?>
<definitions
id="definitions"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:activiti="http://activiti.org/bpmn"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC"
xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI"
typeLanguage="http://www.w3.org/2001/XMLSchema"
targetNamespace="org.activiti.engine.impl.webservice"
xmlns:tns = "org.activiti.engine.impl.webservice"
xmlns:echo = "http://echo/">
  <!–xmlns:tns = "org.activiti.enginge.impl.webservice"–>
  <!–  targetNamespace="org.activiti.enginge.impl.webservice" –>
 
  <import importType="http://schemas.xmlsoap.org/wsdl/"
          location="http://localhost:8181/pruWS/Echo2Service?wsdl"
          namespace="http://echo/" />
 
  <message id="echo" itemRef="tns:echoItemRequest" />
  <message id="echoResponse" itemRef="tns:echoItemResponse" />

  <itemDefinition id="echoItemRequest" structureRef="echo:echo" />
  <itemDefinition id="echoItemResponse" structureRef="echo:echoResponse" />

  <!– Interface: implementationRef = QName of WSDL Port Type –>
  <interface name="Echo Interface" implementationRef = "echo:Echo2" >
    <!– Operation: implementationRef = QName of WSDL Operation –>
    <operation id="echoOperation" name="Echo Operation" implementationRef="echo:echo">
      <inMessageRef>tns:echo</inMessageRef>
      <outMessageRef>tns:echoResponse</outMessageRef>
    </operation>
  </interface>

<itemDefinition id="input" structureRef="string" />
  <itemDefinition id="arg0" structureRef="string" />
  <itemDefinition id="return" structureRef="string" />
  <itemDefinition id="output" structureRef="string" />

  <process id="helloworld" name="helloworld">
    <startEvent id="startevent1" name="Start"></startEvent>
    <userTask id="usertaskInput" name="Get input message" activiti:assignee="kermit">
      <extensionElements>
        <activiti:formProperty id="input" name="Input message" required="true" type="string"></activiti:formProperty>
      </extensionElements>
    </userTask>
    <serviceTask id="webServiceTask" name="Call WS" implementation="##WebService" operationRef="tns:echoOperation">

           <!– The BPMN 2.0 Meta Model requires an Input/Output Specification –>
            <ioSpecification>
                <dataInput itemSubjectRef="tns:echoItemRequest" id="dataInputOfServiceTask" />
                <dataOutput itemSubjectRef="tns:echoItemResponse" id="dataOutputOfServiceTask" />
                <inputSet>
                    <dataInputRefs>dataInputOfServiceTask</dataInputRefs>
                </inputSet>
                <outputSet>
                 <dataOutputRefs>dataOutputOfServiceTask</dataOutputRefs>
                </outputSet>
            </ioSpecification>
            <dataInputAssociation>
                <sourceRef>input</sourceRef>
                <targetRef>arg0</targetRef>
            </dataInputAssociation>
            <dataOutputAssociation>
                <sourceRef>return</sourceRef>
             <targetRef>output</targetRef>
            </dataOutputAssociation>
  </serviceTask>

  <!– Interface: implementationRef = QName of WSDL Port Type –>

    <userTask id="usertask1" name="Show output message" activiti:assignee="kermit">
   <documentation>
        Response received from WS copied to output: ${output} yes or no ?
      </documentation>
      <extensionElements>
     <activiti:formProperty id="output" name="Output message" type ="string" expression="${output}" writable="false"></activiti:formProperty>
      </extensionElements>
    </userTask>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow1" name="" sourceRef="startevent1" targetRef="usertaskInput"></sequenceFlow>
    <sequenceFlow id="flow2" name="" sourceRef="usertaskInput" targetRef="webServiceTask"></sequenceFlow>
    <sequenceFlow id="flow3" name="" sourceRef="webServiceTask" targetRef="usertask1"></sequenceFlow>
    <sequenceFlow id="flow4" name="" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow>
  </process>
</definitions>

thank you,
regards, Vero

ct1
Champ in-the-making
Champ in-the-making
I had a similar problem.  The fix I found was unbelievably simple, but it may not work for you.  Here is what I found.

The web service I was calling did not ruturn the variable named "return", instead it returned the variable named "_return". 

Changing the "<itemDefinition id="return" structureRef="string" />
                to "<itemDefinition id="_return" structureRef="string" />

the changing the "<dataOutputAssociation>
                         <sourceRef>return</sourceRef>"
                    to "<dataOutputAssociation>
                         <sourceRef>_return</sourceRef>"

fixed the problem I had.  Maybe it would be worth a try for you.

Thank you.