cancel
Showing results for 
Search instead for 
Did you mean: 

Deploy a process containing service task in Activit Explorer

rajendrarahul
Champ in-the-making
Champ in-the-making
Hi ,
I am new to Activiti. Trying to deploy a process with service task in it. It gets deployed successfully , but while I start the Process , I get a pop up with message 'null' . I placed the Jar in the 'lib' directory of activity explorer.Deployed the .bpmn20.xml file using Kermit user in usual way.My '.bmpn20.xml'  file content is

<?xml version="1.0" encoding="UTF-8"?>
<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"
   targetNamespace="http://www.bpmnwithactiviti.org/daprocess">

    <error id="fileNotAvailableError" errorCode="fileNotAvailableError"/>
   <process id="daprocess" name="DA Process">
      <startEvent id="theStart" name="start"/>
      <sequenceFlow id="flow1" sourceRef="theStart" targetRef="fileWatcherSubProcess" />
        <subProcess id="fileWatcherSubProcess" triggeredByEvent="false" name="fileWatcherSubProcess">
            <startEvent id="catchFile" name="start"/>
            <endEvent id="subProcessEnd"/>
            <sequenceFlow id="afterFile" sourceRef="catchFile" targetRef="fileWatcher"></sequenceFlow>
            <serviceTask id="fileWatcher" name="fileWatcher" activiti:class="com.wellsfargo.daplatform.util.FileWatcher" />
        </subProcess>
        <boundaryEvent id="fileNotAvailableEvent"
                       attachedToRef="fileWatcherSubProcess" activiti:expression="${loadCounterPartyDetailsService.raiseAlert}">
            <errorEventDefinition errorRef="fileNotAvailableError" />
        </boundaryEvent>
        <sequenceFlow id="flowBoundary" sourceRef="fileNotAvailableEvent" targetRef="taskAfterError" />
        <serviceTask id="taskAfterError" name="emailUtil" activiti:class="com.wellsfargo.daplatform.util.EmailUtil"/>

        <sequenceFlow id="flow2" sourceRef="fileWatcherSubProcess"
         targetRef="fileTypeDecision" />
        <exclusiveGateway id="fileTypeDecision"  name="fileTypeDecision"/>
        <sequenceFlow id="flow3" sourceRef="fileTypeDecision" targetRef="parseStatementFiles">
            <conditionExpression xsi:type="tFormalExpression">${twoTuple.element2  == 0}</conditionExpression>
        </sequenceFlow>
        <sequenceFlow id="flow4" sourceRef="fileTypeDecision" targetRef="loadData">
            <conditionExpression xsi:type="tFormalExpression">${twoTuple.element2  == 1}</conditionExpression>
        </sequenceFlow>

        <serviceTask id="parseStatementFiles" name="parseStatementFiles" activiti:class="com.wellsfargo.daplatform.processor.StatementFileParser"/>
        <serviceTask id="loadData" name="loadData" activiti:expression="${loadCounterPartyDetailsService.loadData(1)}"/>
        <sequenceFlow id="flow5" sourceRef="parseStatementFiles"
                      targetRef="ftpFiles" />
        <serviceTask id="ftpFiles" name="ftpFiles" activiti:class="com.wellsfargo.daplatform.util.SendFileThroughFTP"/>
        <sequenceFlow id="flow6" sourceRef="ftpFiles"
                      targetRef="theEnd" />
      <endEvent id="theEnd" />
   </process>
</definitions>
2 REPLIES 2

rajendrarahul
Champ in-the-making
Champ in-the-making
Apologies the content of .bpmn20.xml has not come up properly. Here it is
<?xml version="1.0" encoding="UTF-8"?>
<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"
targetNamespace="http://www.bpmnwithactiviti.org/daprocess">

    <error id="fileNotAvailableError" errorCode="fileNotAvailableError"/>
<process id="daprocess" name="DA Process">
  <startEvent id="theStart" name="start" activiti:initiator="initiator"/>
  <sequenceFlow id="flow1" sourceRef="theStart" targetRef="fileWatcherSubProcess" />
        <subProcess id="fileWatcherSubProcess" triggeredByEvent="false" name="fileWatcherSubProcess">
            <startEvent id="catchFile" name="start"/>
            <endEvent id="subProcessEnd"/>
            <sequenceFlow id="afterFile" sourceRef="catchFile" targetRef="fileWatcher"></sequenceFlow>
            <serviceTask id="fileWatcher" name="fileWatcher" activiti:class="com.wellsfargo.daplatform.util.FileWatcher" />
        </subProcess>
        <boundaryEvent id="fileNotAvailableEvent"
                       attachedToRef="fileWatcherSubProcess" activiti:expression="${loadCounterPartyDetailsService.raiseAlert}">
            <errorEventDefinition errorRef="fileNotAvailableError" />
        </boundaryEvent>
        <sequenceFlow id="flowBoundary" sourceRef="fileNotAvailableEvent" targetRef="taskAfterError" />
        <serviceTask id="taskAfterError" name="emailUtil" activiti:class="com.wellsfargo.daplatform.util.EmailUtil"/>

        <sequenceFlow id="flow2" sourceRef="fileWatcherSubProcess"
   targetRef="fileTypeDecision" />
        <exclusiveGateway id="fileTypeDecision"  name="fileTypeDecision"/>
        <sequenceFlow id="flow3" sourceRef="fileTypeDecision" targetRef="parseStatementFiles">
            <conditionExpression xsi:type="tFormalExpression">${twoTuple.element2  == 0}</conditionExpression>
        </sequenceFlow>
        <sequenceFlow id="flow4" sourceRef="fileTypeDecision" targetRef="loadData">
            <conditionExpression xsi:type="tFormalExpression">${twoTuple.element2  == 1}</conditionExpression>
        </sequenceFlow>

        <serviceTask id="parseStatementFiles" name="parseStatementFiles" activiti:class="com.wellsfargo.daplatform.processor.StatementFileParser"/>
        <serviceTask id="loadData" name="loadData" activiti:expression="${loadCounterPartyDetailsService.loadData(1)}"/>
        <sequenceFlow id="flow5" sourceRef="parseStatementFiles"
                      targetRef="ftpFiles" />
        <serviceTask id="ftpFiles" name="ftpFiles" activiti:class="com.wellsfargo.daplatform.util.SendFileThroughFTP"/>
        <sequenceFlow id="flow6" sourceRef="ftpFiles"
                      targetRef="theEnd" />
  <endEvent id="theEnd" />
</process>
</definitions>

jbarrez
Star Contributor
Star Contributor
Putting the jar on the classpath is normally all you need to do.

There should be a stacktrace in the Tomcat logs. Could you paste that one here?