cancel
Showing results for 
Search instead for 
Did you mean: 

I wonder how I can depoly a webservice task in the activiti explorer

alexpiero
Champ in-the-making
Champ in-the-making
Afiter I import the bpmn20.xml of a webservice task in the Activiti Explorer,  I press the deploy button but it turns out :

One of the attributes 'class', 'delegateExpression', 'type', 'operation', or "expression" is mandatory on serviceTask.

How can I solve this problem with the Activiti Explorer?
I would appreciate a lot if anyone can help.
5 REPLIES 5

jbarrez
Star Contributor
Star Contributor
Please post you process xml to see why it goes wrong.

alexpiero
Champ in-the-making
Champ in-the-making
Thanks a lot for your reply.
I just use the test process definition xml in the source code of activiti-master 5.14:

<definitions id="definitions"
  xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
  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"
  expressionLanguage="http://java.sun.com/products/jsp/"
  targetNamespace="org.activiti.engine.test.bpmn.servicetask"
  xmlns:tns="org.activiti.engine.test.bpmn.servicetask"
  xmlns:counter="http://webservice.activiti.org/">

  <import importType="http://schemas.xmlsoap.org/wsdl/"
          location="http://localhost:63081/counter?wsdl"
          namespace="http://webservice.activiti.org/" />  
  <process id="webServiceInvocationWithSimplisticDataFlow">
  <startEvent id="theStart" />
    <sequenceFlow id="flow1" sourceRef="theStart" targetRef="webService" />
    <serviceTask id="webService"
                 name="Web service invocation"
                 implementation="##WebService"
                 operationRef="tnsSmiley TonguerettyPrintCountOperation">
      <dataInputAssociation>
        <sourceRef>PrefixVariable</sourceRef><!– name of an Activiti variable –>
        <targetRef>prefix</targetRef><!– name of an element of the input message –>
      </dataInputAssociation>
      <dataInputAssociation>
        <sourceRef>SuffixVariable</sourceRef><!– name of an Activiti variable –>
        <targetRef>suffix</targetRef><!– name of an element of the input message –>
      </dataInputAssociation>
      <dataOutputAssociation>
       <sourceRef>prettyPrint</sourceRef><!– name of an element of the output message –>
       <targetRef>OutputVariable</targetRef><!– name of an Activiti variable –>
      </dataOutputAssociation>
    </serviceTask>
    <sequenceFlow id="flow2" sourceRef="webService" targetRef="waitState" />
      <receiveTask id="waitState" />
    <sequenceFlow id="flow3" sourceRef="waitState" targetRef="theEnd" />
    <endEvent id="theEnd" />
  </process>
  <itemDefinition id="PrefixVariable" structureRef="string" />
  <itemDefinition id="prefix" structureRef="string" />
  <itemDefinition id="SuffixVariable" structureRef="string" />
  <itemDefinition id="suffix" structureRef="string" />
  <itemDefinition id="prettyPrint" structureRef="string" />
  <itemDefinition id="OutputVariable" structureRef="string" />
  <!– Interface: implementationRef = QName of WSDL Port Type –>
  <interface name="Counter Interface" implementationRef="counter:Counter">
    <!– Operation: implementationRef = QName of WSDL Operation –>
    <operation id="prettyPrintCountOperation" name="prettyPrintCount Operation" implementationRef="counterSmiley TonguerettyPrintCount">
      <inMessageRef>tnsSmiley TonguerettyPrintCountRequestMessage</inMessageRef>
      <outMessageRef>tnsSmiley TonguerettyPrintCountResponseMessage</outMessageRef>
    </operation>
  </interface>
 
  <message id="prettyPrintCountRequestMessage" itemRef="tnsSmiley TonguerettyPrintCountRequestItem" />
  <message id="prettyPrintCountResponseMessage" itemRef="tnsSmiley TonguerettyPrintCountResponseItem" />
 
  <itemDefinition id="prettyPrintCountRequestItem" structureRef="counterSmiley TonguerettyPrintCount" /><!– QName of input element –>
  <itemDefinition id="prettyPrintCountResponseItem" structureRef="counterSmiley TonguerettyPrintCountResponse" /><!– QName of output element –>
  <bpmndi:BPMNDiagram id="BPMNDiagram_webServiceInvocationWithSimplisticDataFlow">
    <bpmndi:BPMNPlane bpmnElement="webServiceInvocationWithSimplisticDataFlow" id="BPMNPlane_webServiceInvocationWithSimplisticDataFlow">
      <bpmndi:BPMNShape bpmnElement="theStart" id="BPMNShape_theStart">
        <omgdc:Bounds height="30.0" width="30.0" x="64.0" y="87.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="webService" id="BPMNShape_webService">
        <omgdc:Bounds height="80.0" width="100.0" x="165.0" y="62.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="waitState" id="BPMNShape_waitState">
        <omgdc:Bounds height="80.0" width="100.0" x="330.0" y="62.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="theEnd" id="BPMNShape_theEnd">
        <omgdc:Bounds height="28.0" width="28.0" x="507.0" y="88.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="430.0" y="102.0"></omgdi:waypoint>
        <omgdi:waypoint x="507.0" y="102.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="265.0" y="102.0"></omgdi:waypoint>
        <omgdi:waypoint x="330.0" y="102.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="94.0" y="102.0"></omgdi:waypoint>
        <omgdi:waypoint x="165.0" y="102.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

Thank you very much!

trademak
Star Contributor
Star Contributor
I can't reproduce this issue. When I deploy this process definition in the Activiti Explorer I get the message that it can't parse the WSDL schema. And that's because the activiti-cxf module is not part of the Activiti Explorer by default. Did you copy the activity-cxf module manually?

Best regards,

alexpiero
Champ in-the-making
Champ in-the-making
Thanks for your reply!
I have added the activiti-cxf.jar to the location of Activiti Explorer: C:\Program Files\Java\apache-tomcat-7.0.39\webapps\activiti-explorer\WEB-INF\lib
Is there anything wrong with my operation?
Would you please add the activiti-cxf.jar manually and try again with my process definition xml?
I'm waiting for your outcome and thank you very much!

fahad1
Champ in-the-making
Champ in-the-making
I am facing the same problem, have you reached to the solution?? If so, please do share the solution