cancel
Showing results for 
Search instead for 
Did you mean: 

When use Oracle database there is a query bug

chaoyy
Champ in-the-making
Champ in-the-making
I make a HistoricTaskInstance query by HistoryService:

List<HistoricTaskInstance> doneTasks = historyService.createHistoricTaskInstanceQuery()
                   .processInstanceId(processInstanceId)
                   .processUnfinished()
                   .finished()
                   .taskDeleteReason("completed")
                   .orderByHistoricTaskInstanceEndTime()
                   .desc()
                   .list();
When I use InMemory(H2) database, the query is OK, but When I use Oracle10, it will error:"ORA-00918".
I found that, the two query conditions processUnfinished() and orderByHistoricTaskInstanceEndTime()  can not occurs simultaneously.
So I add the table abbreviation prefix for the START and END variable in HistoricTaskInstanceQueryProperty class:

// To avoid the ora-00918 error:
START = new HistoricTaskInstanceQueryProperty("HTI.START_TIME_");
END = new HistoricTaskInstanceQueryProperty("HTI.END_TIME_");

The table abbreviation prefix is found in "db/mapping/entity/HistoricTaskInstance.xml" file.

After that, The query in oracle will be OK.

I hope Activiti developer can solve the bug for oracle database.
8 REPLIES 8

jbarrez
Star Contributor
Star Contributor
That does sounds like a bug, but I don't yet fully understand the solution.

Could you post a unit test that is failing on Oracle?

chaoyy
Champ in-the-making
Champ in-the-making


import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.activiti.engine.HistoryService;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.history.HistoricTaskInstance;
import org.activiti.engine.impl.ProcessEngineImpl;
import org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl;
import org.activiti.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration;
import org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration;
import org.activiti.engine.repository.Deployment;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;


public class Test {

/**
  * @param args
  * @throws Exception
  */
public static void main(String[] args) throws Exception {
//  ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) StandaloneInMemProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration();
  ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) StandaloneProcessEngineConfiguration.createProcessEngineConfigurationFromInputStream(new FileInputStream(new File("C:/oracle.activiti.cfg.xml")));
  ProcessEngineImpl engine = (ProcessEngineImpl) processEngineConfiguration.buildProcessEngine();
  RepositoryService repositoryService = engine.getRepositoryService();
  RuntimeService runtimeService = engine.getRuntimeService();
  TaskService taskService = engine.getTaskService();
  HistoryService historyService = engine.getHistoryService();
 
  Deployment deploy = repositoryService.createDeployment().addClasspathResource("leaveReportProcess.bpmn20.xml").deploy();
  System.out.println(deploy.getId());
 
  Map<String, Object> params = new HashMap<String, Object>();
  params.put("dataModel", new DataModel("chaoyy",2));
  ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("leaveReportProcess",params);
 
  while(true){
   List<Task> tasks = taskService.createTaskQuery().processInstanceId(processInstance.getId()).list();
   if(tasks!=null && tasks.size()>0){
    Task task = tasks.get(0);
    task.setAssignee("820017237");
    System.out.println("Current Task:"+task.getName()+"\t"+task.getTaskDefinitionKey());
    taskService.complete(task.getId());
   
    System.out.println("\tFind the has done task(have the processUnfinished() filter):");
    List<HistoricTaskInstance> doneTasks = historyService.createHistoricTaskInstanceQuery().processInstanceId(processInstance.getId()).finished().processUnfinished().taskDeleteReason("completed").orderByHistoricActivityInstanceStartTime().desc().list();
    for(HistoricTaskInstance done : doneTasks){
     System.out.println("\t\t"+done.getName()+"\t"+done.getTaskDefinitionKey());
    }

    //if you remove the processUnfinished() ,you will get the different results, pls have a try:
    System.out.println("\tFind the has done task(remove the processUnfinished() filter ):");
    doneTasks = historyService.createHistoricTaskInstanceQuery().processInstanceId(processInstance.getId()).finished().taskDeleteReason("completed").orderByHistoricActivityInstanceStartTime().desc().list();
    for(HistoricTaskInstance done : doneTasks){
     System.out.println("\t\t"+done.getName()+"\t"+done.getTaskDefinitionKey());
    }
   
    System.out.println("\t[HELP!]You will find the difference of two results . Why?");
   
    System.out.println("——————————–NEXT————————————-\n\n");    
   }else{
    break;
   }
  }  
}

}

chaoyy
Champ in-the-making
Champ in-the-making
package test;

import java.io.Serializable;

public class DataModel implements Serializable {

public DataModel(String username, int userday) {
  super();
  this.username = username;
  this.userday = userday;
}
/**
  *
  */
private static final long serialVersionUID = -318470367309969076L;
private String username ;
private int userday ;
public String getUsername() {
  return username;
}
public void setUsername(String username) {
  this.username = username;
}
public int getUserday() {
  return userday;
}
public void setUserday(int userday) {
  this.userday = userday;
}
}

chaoyy
Champ in-the-making
Champ in-the-making

<definitions joinwork:updateTime="1339037511027" exporter="Joinwork Process Studio" exporterVersion="3.1.0" targetNamespace="http://www.ygsoft.com/ecp" id="leaveReportProcessDef" name="leaveReportProcess" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:joinwork="http://www.joinwork.net/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn">
  <process id="leaveReportProcess" name="leaveReportProcess" isExecutable="true">
    <laneSet id="LaneSet_1" name="LaneSet_1">
      <lane id="Lane_1" name="业务部门">
        <flowNodeRef>Start_1</flowNodeRef>
        <flowNodeRef>Task_1</flowNodeRef>
        <flowNodeRef>Gateway_1</flowNodeRef>
        <flowNodeRef>Task_2</flowNodeRef>
        <flowNodeRef>Task_3</flowNodeRef>
        <flowNodeRef>Gateway_2</flowNodeRef>
        <flowNodeRef>Gateway_4</flowNodeRef>
      </lane>
      <lane id="Lane_2" name="人力资源部">
        <flowNodeRef>Task_4</flowNodeRef>
        <flowNodeRef>Task_6</flowNodeRef>
        <flowNodeRef>Gateway_5</flowNodeRef>
        <flowNodeRef>Task_7</flowNodeRef>
        <flowNodeRef>Task_8</flowNodeRef>
        <flowNodeRef>Gateway_6</flowNodeRef>
        <flowNodeRef>Gateway_7</flowNodeRef>
        <flowNodeRef>Task_10</flowNodeRef>
        <flowNodeRef>Gateway_8</flowNodeRef>
      </lane>
      <lane id="Lane_3" name="考勤系统">
        <flowNodeRef>Task_5</flowNodeRef>
        <flowNodeRef>Gateway_3</flowNodeRef>
        <flowNodeRef>End_1</flowNodeRef>
        <flowNodeRef>Task_9</flowNodeRef>
      </lane>
    </laneSet>
    <startEvent id="Start_1" name="开始">
      <outgoing>SequenceFlow_1</outgoing>
    </startEvent>
    <userTask id="Task_1" name="填写请假申请单">
      <extensionElements>
        <activiti:taskListener event="create" class="com.ygsoft.ecp.process.engine.runtime.listener.TaskCreateListener"/>
        <activiti:taskListener event="assignment" class="com.ygsoft.ecp.process.engine.runtime.listener.TaskAssignmentListener"/>
        <activiti:taskListener event="complete" class="com.ygsoft.ecp.process.engine.runtime.listener.TaskCompleteListener"/>
      </extensionElements>
      <incoming>SequenceFlow_1</incoming>
      <outgoing>SequenceFlow_2</outgoing>
    </userTask>
    <exclusiveGateway id="Gateway_1" name="假期时长" gatewayDirection="Diverging">
      <incoming>SequenceFlow_2</incoming>
      <outgoing>SequenceFlow_3</outgoing>
      <outgoing>SequenceFlow_4</outgoing>
    </exclusiveGateway>
    <userTask id="Task_2" name="部门经理审批">
      <extensionElements>
        <activiti:taskListener event="create" class="com.ygsoft.ecp.process.engine.runtime.listener.TaskCreateListener"/>
        <activiti:taskListener event="assignment" class="com.ygsoft.ecp.process.engine.runtime.listener.TaskAssignmentListener"/>
        <activiti:taskListener event="complete" class="com.ygsoft.ecp.process.engine.runtime.listener.TaskCompleteListener"/>
      </extensionElements>
      <incoming>SequenceFlow_3</incoming>
      <outgoing>SequenceFlow_5</outgoing>
    </userTask>
    <userTask id="Task_3" name="基层经理审批">
      <extensionElements>
        <activiti:taskListener event="create" class="com.ygsoft.ecp.process.engine.runtime.listener.TaskCreateListener"/>
        <activiti:taskListener event="assignment" class="com.ygsoft.ecp.process.engine.runtime.listener.TaskAssignmentListener"/>
        <activiti:taskListener event="complete" class="com.ygsoft.ecp.process.engine.runtime.listener.TaskCompleteListener"/>
      </extensionElements>
      <incoming>SequenceFlow_4</incoming>
      <outgoing>SequenceFlow_6</outgoing>
    </userTask>
    <parallelGateway id="Gateway_2" name="转备案" gatewayDirection="Diverging">
      <incoming>SequenceFlow_12</incoming>
      <outgoing>SequenceFlow_7</outgoing>
      <outgoing>SequenceFlow_8</outgoing>
    </parallelGateway>
    <userTask id="Task_4" name="人力专员确认">
      <extensionElements>
        <activiti:taskListener event="create" class="com.ygsoft.ecp.process.engine.runtime.listener.TaskCreateListener"/>
        <activiti:taskListener event="assignment" class="com.ygsoft.ecp.process.engine.runtime.listener.TaskAssignmentListener"/>
        <activiti:taskListener event="complete" class="com.ygsoft.ecp.process.engine.runtime.listener.TaskCompleteListener"/>
      </extensionElements>
      <incoming>SequenceFlow_7</incoming>
      <outgoing>SequenceFlow_13</outgoing>
    </userTask>
    <serviceTask id="Task_5" activiti:class="com.ygsoft.ecp.process.engine.runtime.delegate.AutoRecordActivityDelegate" name="自动备案">
      <incoming>SequenceFlow_8</incoming>
      <outgoing>SequenceFlow_10</outgoing>
    </serviceTask>
    <parallelGateway id="Gateway_3" name="合并" gatewayDirection="Converging">
      <incoming>SequenceFlow_10</incoming>
      <incoming>SequenceFlow_9</incoming>
      <outgoing>SequenceFlow_11</outgoing>
    </parallelGateway>
    <endEvent id="End_1" name="结束">
      <incoming>SequenceFlow_11</incoming>
      <incoming>SequenceFlow_20</incoming>
    </endEvent>
    <exclusiveGateway id="Gateway_4" name="合并网关" gatewayDirection="Converging">
      <incoming>SequenceFlow_5</incoming>
      <incoming>SequenceFlow_6</incoming>
      <outgoing>SequenceFlow_12</outgoing>
    </exclusiveGateway>
    <userTask id="Task_6" name="HR主管确认">
      <incoming>SequenceFlow_13</incoming>
      <outgoing>SequenceFlow_14</outgoing>
      <outgoing>SequenceFlow_9</outgoing>
    </userTask>
    <exclusiveGateway id="Gateway_5" name="Gateway" gatewayDirection="Diverging">
      <incoming>SequenceFlow_14</incoming>
      <outgoing>SequenceFlow_16</outgoing>
      <outgoing>SequenceFlow_21</outgoing>
    </exclusiveGateway>
    <userTask id="Task_7" name="向主管1报批">
      <incoming>SequenceFlow_15</incoming>
      <outgoing>SequenceFlow_23</outgoing>
    </userTask>
    <userTask id="Task_8" name="向BOSS报批">
      <incoming>SequenceFlow_16</incoming>
      <outgoing>SequenceFlow_18</outgoing>
    </userTask>
    <exclusiveGateway id="Gateway_6" name="Gateway" gatewayDirection="Converging">
      <incoming>SequenceFlow_18</incoming>
      <incoming>SequenceFlow_25</incoming>
      <outgoing>SequenceFlow_19</outgoing>
    </exclusiveGateway>
    <userTask id="Task_9" name="通知请假人休假">
      <incoming>SequenceFlow_19</incoming>
      <outgoing>SequenceFlow_20</outgoing>
    </userTask>
    <parallelGateway id="Gateway_7" name="Gateway">
      <incoming>SequenceFlow_21</incoming>
      <outgoing>SequenceFlow_15</outgoing>
      <outgoing>SequenceFlow_22</outgoing>
    </parallelGateway>
    <userTask id="Task_10" name="向主管2报批">
      <incoming>SequenceFlow_22</incoming>
      <outgoing>SequenceFlow_24</outgoing>
    </userTask>
    <parallelGateway id="Gateway_8" name="Gateway" gatewayDirection="Converging">
      <incoming>SequenceFlow_23</incoming>
      <incoming>SequenceFlow_24</incoming>
      <outgoing>SequenceFlow_25</outgoing>
    </parallelGateway>
    <sequenceFlow id="SequenceFlow_1" sourceRef="Start_1" targetRef="Task_1"/>
    <sequenceFlow id="SequenceFlow_2" sourceRef="Task_1" targetRef="Gateway_1"/>
    <sequenceFlow id="SequenceFlow_3" sourceRef="Gateway_1" targetRef="Task_2">
      <conditionExpression>${dataModel.userday &gt;= 5}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="SequenceFlow_4" sourceRef="Gateway_1" targetRef="Task_3">
      <conditionExpression>${dataModel.userday &lt; 5}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="SequenceFlow_5" sourceRef="Task_2" targetRef="Gateway_4"/>
    <sequenceFlow id="SequenceFlow_7" sourceRef="Gateway_2" targetRef="Task_4"/>
    <sequenceFlow id="SequenceFlow_10" sourceRef="Task_5" targetRef="Gateway_3"/>
    <sequenceFlow id="SequenceFlow_11" sourceRef="Gateway_3" targetRef="End_1"/>
    <sequenceFlow id="SequenceFlow_8" sourceRef="Gateway_2" targetRef="Task_5"/>
    <sequenceFlow id="SequenceFlow_12" sourceRef="Gateway_4" targetRef="Gateway_2"/>
    <sequenceFlow id="SequenceFlow_6" sourceRef="Task_3" targetRef="Gateway_4"/>
    <sequenceFlow id="SequenceFlow_13" sourceRef="Task_4" targetRef="Task_6"/>
    <sequenceFlow id="SequenceFlow_14" sourceRef="Task_6" targetRef="Gateway_5"/>
    <sequenceFlow id="SequenceFlow_15" sourceRef="Gateway_7" targetRef="Task_7"/>
    <sequenceFlow id="SequenceFlow_16" sourceRef="Gateway_5" targetRef="Task_8">
      <conditionExpression>${dataModel.userday &gt;= 5}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="SequenceFlow_18" sourceRef="Task_8" targetRef="Gateway_6"/>
    <sequenceFlow id="SequenceFlow_19" sourceRef="Gateway_6" targetRef="Task_9"/>
    <sequenceFlow id="SequenceFlow_20" sourceRef="Task_9" targetRef="End_1"/>
    <sequenceFlow id="SequenceFlow_9" sourceRef="Task_6" targetRef="Gateway_3"/>
    <sequenceFlow id="SequenceFlow_21" sourceRef="Gateway_5" targetRef="Gateway_7">
      <conditionExpression>${dataModel.userday &lt; 5}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="SequenceFlow_22" sourceRef="Gateway_7" targetRef="Task_10"/>
    <sequenceFlow id="SequenceFlow_23" sourceRef="Task_7" targetRef="Gateway_8"/>
    <sequenceFlow id="SequenceFlow_24" sourceRef="Task_10" targetRef="Gateway_8"/>
    <sequenceFlow id="SequenceFlow_25" sourceRef="Gateway_8" targetRef="Gateway_6"/>
  </process>
  <bpmndi:BPMNDiagram id="ProcessDiagram_1" name="ProcessDiagram_1">
    <bpmndi:BPMNPlane bpmnElement="leaveReportProcess">
      <bpmndi:BPMNShape bpmnElement="Start_1" id="Shape_1">
        <dc:Bounds height="22" width="22" x="103" y="71"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="Task_1" id="Shape_2">
        <dc:Bounds height="50" width="80" x="173" y="57"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_1" id="Connector_1">
        <di:waypoint x="126" y="82"/>
        <di:waypoint x="172" y="82"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="Gateway_1" id="Shape_4" isMarkerVisible="false">
        <dc:Bounds height="30" width="38" x="294" y="67"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="Task_2" id="Shape_5">
        <dc:Bounds height="50" width="80" x="375" y="12"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="Task_3" id="Shape_6">
        <dc:Bounds height="50" width="80" x="367" y="111"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_2" id="Connector_2">
        <di:waypoint x="254" y="82"/>
        <di:waypoint x="293" y="82"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_3" id="Connector_3">
        <di:waypoint x="313" y="66"/>
        <di:waypoint x="313" y="35"/>
        <di:waypoint x="313" y="35"/>
        <di:waypoint x="313" y="35"/>
        <di:waypoint x="367" y="35"/>
        <di:waypoint x="374" y="35"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_4" id="Connector_4">
        <di:waypoint x="313" y="98"/>
        <di:waypoint x="313" y="136"/>
        <di:waypoint x="366" y="136"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="Gateway_2" id="Shape_7">
        <dc:Bounds height="30" width="38" x="634" y="69"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="Task_4" id="Shape_8">
        <dc:Bounds height="50" width="80" x="485" y="199"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_5" id="Connector_5">
        <di:waypoint x="456" y="35"/>
        <di:waypoint x="506" y="35"/>
        <di:waypoint x="506" y="68"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_7" id="Connector_7">
        <di:waypoint x="653" y="100"/>
        <di:waypoint x="566" y="224"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="Task_5" id="Shape_9">
        <dc:Bounds height="50" width="80" x="711" y="495"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="Lane_1" id="LaneCom_1" isHorizontal="true">
        <dc:Bounds height="167" width="909" x="3" y="0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="Lane_2" id="LaneCom_2" isHorizontal="true">
        <dc:Bounds height="229" width="910" x="3" y="168"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="Lane_3" id="LaneCom_3" isHorizontal="true">
        <dc:Bounds height="179" width="910" x="3" y="397"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="Gateway_3" id="Shape_3">
        <dc:Bounds height="30" width="38" x="488" y="495"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_10" id="Connector_10">
        <di:waypoint x="710" y="510"/>
        <di:waypoint x="527" y="510"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="End_1" id="Shape_10">
        <dc:Bounds height="22" width="22" x="396" y="499"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_11" id="Connector_11">
        <di:waypoint x="487" y="510"/>
        <di:waypoint x="419" y="510"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_8" id="Connector_8">
        <di:waypoint x="673" y="79"/>
        <di:waypoint x="735" y="79"/>
        <di:waypoint x="735" y="494"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="Gateway_4" id="Shape_11" isMarkerVisible="false">
        <dc:Bounds height="30" width="38" x="487" y="69"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds height="15" width="80" x="466" y="101"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_12" id="Connector_12">
        <di:waypoint x="526" y="84"/>
        <di:waypoint x="525" y="84"/>
        <di:waypoint x="633" y="84"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_6" id="Connector_6">
        <di:waypoint x="448" y="136"/>
        <di:waypoint x="506" y="136"/>
        <di:waypoint x="506" y="100"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="Task_6" id="Shape_12">
        <dc:Bounds height="50" width="80" x="499" y="320"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_13" id="Connector_13">
        <di:waypoint x="532" y="250"/>
        <di:waypoint x="532" y="319"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="Gateway_5" id="Shape_13" isMarkerVisible="false">
        <dc:Bounds height="30" width="38" x="434" y="340"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_14" id="Connector_14">
        <di:waypoint x="498" y="355"/>
        <di:waypoint x="473" y="355"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="Task_7" id="Shape_14">
        <dc:Bounds height="50" width="80" x="249" y="178"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_15" id="Connector_15">
        <di:waypoint x="378" y="242"/>
        <di:waypoint x="330" y="203"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="Task_8" id="Shape_15">
        <dc:Bounds height="50" width="80" x="249" y="330"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_16" id="Connector_16">
        <di:waypoint x="433" y="355"/>
        <di:waypoint x="330" y="355"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="Gateway_6" id="Shape_16" isMarkerVisible="false">
        <dc:Bounds height="30" width="38" x="50" y="277"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_18" id="Connector_18">
        <di:waypoint x="248" y="355"/>
        <di:waypoint x="154" y="355"/>
        <di:waypoint x="89" y="292"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="Task_9" id="Shape_17">
        <dc:Bounds height="50" width="80" x="29" y="438"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_19" id="Connector_19">
        <di:waypoint x="69" y="308"/>
        <di:waypoint x="69" y="437"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_20" id="Connector_20">
        <di:waypoint x="69" y="489"/>
        <di:waypoint x="395" y="510"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_9" id="Connector_9">
        <di:waypoint x="512.5" y="371"/>
        <di:waypoint x="512.5" y="494"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="Gateway_7" id="Shape_18">
        <dc:Bounds height="30" width="38" x="379" y="227"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_21" id="Connector_21">
        <di:waypoint x="453" y="339"/>
        <di:waypoint x="418" y="242"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="Task_10" id="Shape_19">
        <dc:Bounds height="50" width="80" x="249" y="257"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_22" id="Connector_22">
        <di:waypoint x="378" y="242"/>
        <di:waypoint x="330" y="282"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="Gateway_8" id="Shape_20">
        <dc:Bounds height="30" width="38" x="135" y="227"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_23" id="Connector_23">
        <di:waypoint x="248" y="203"/>
        <di:waypoint x="174" y="242"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_24" id="Connector_24">
        <di:waypoint x="248" y="282"/>
        <di:waypoint x="174" y="242"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="SequenceFlow_25" id="Connector_25">
        <di:waypoint x="154" y="258"/>
        <di:waypoint x="89" y="292"/>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

chaoyy
Champ in-the-making
Champ in-the-making

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans.xsd">

  <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
 
    <!– <property name="jdbcUrl" value="jdbcSmiley Surprisedracle:thin:@192.168.226.79:1521Smiley Surprisedrcl" /> –>
    <property name="jdbcUrl" value="jdbcSmiley Surprisedracle:thin:@192.168.120.2:1521:VPD" />
    <property name="jdbcDriver" value="oracle.jdbc.driver.OracleDriver" />
    <property name="databaseSchemaUpdate" value="true" />
   
    <!– job executor configurations –>
    <property name="jobExecutorActivate" value="false" />
   
    <!– mail server configurations –>
    <property name="mailServerPort" value="5025" />   
    <property name="history" value="full" />
  </bean>

</beans>

chaoyy
Champ in-the-making
Champ in-the-making
That does sounds like a bug, but I don't yet fully understand the solution.

Could you post a unit test that is failing on Oracle?


The four file has been upload.

Notice:
1,put the oracle.activiti.cfg.xml to C:/ disk;
2,put the leaveReportProcess.bpmn20.xml to your classpath.

chaoyy
Champ in-the-making
Champ in-the-making
That does sounds like a bug, but I don't yet fully understand the solution.

Could you post a unit test that is failing on Oracle?

There is a query error:
There have START_TIME_ and END_TIME_ column in HTI/HPI table, when use the order by on two filter ,it will report ORA-00918 error:
ORA-00918: column ambiguously defined
Cause:         A column name used in a join exists in more than one table and is thus referenced ambiguously. In a join, any column name that occurs in more than one of the tables must be prefixed by its table name when referenced. The column should be referenced as TABLE.COLUMN or TABLE_ALIAS.COLUMN. For example, if tables EMP and DEPT are being joined and both contain the column DEPTNO, then all references to DEPTNO should be prefixed with the table name, as in EMP.DEPTNO or E.DEPTNO.
Action:         Prefix references to column names that exist in multiple tables with either the table name or a table alias and a period (.), as in the examples above.

frederikherema1
Star Contributor
Star Contributor