This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12"> | |
<omgdi:waypoint x="290" y="300"></omgdi:waypoint> | |
<omgdi:waypoint x="625" y="300"></omgdi:waypoint> | |
<bpmndi:BPMNLabel> | |
<omgdc:Bounds height="11" width="100" x="10" y="0"></omgdc:Bounds> | |
</bpmndi:BPMNLabel> | |
</bpmndi:BPMNEdge> | |
There are two waypoint elements, use the first or second are imprecise, so caculate the middle x and y to positon the label. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.activiti.designer.test.bugs; | |
import java.io.File; | |
import java.io.InputStream; | |
import org.activiti.bpmn.model.BpmnModel; | |
import org.activiti.engine.RepositoryService; | |
import org.activiti.engine.impl.bpmn.diagram.ProcessDiagramGenerator; | |
import org.activiti.engine.repository.ProcessDefinition; | |
import org.activiti.engine.test.ActivitiRule; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[INFO] antlr:antlr:jar:2.7.7:compile | |
[INFO] aopalliance:aopalliance:jar:1.0:compile | |
[INFO] asm:asm:jar:3.3.1:compile | |
[INFO] cglib:cglib:jar:2.2.2:compile | |
[INFO] com.google.code.findbugs:jsr305:jar:1.3.9:compile | |
[INFO] com.google.guava:guava:jar:12.0:compile | |
[INFO] com.h2database:h2:jar:1.3.167:compile | |
[INFO] com.thebuzzmedia:imgscalr-lib:jar:3.1:compile | |
[INFO] commons-beanutils:commons-beanutils:jar:1.8.3:compile | |
[INFO] commons-collections:commons-collections:jar:3.2.1:compile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT | |
INTO act_hi_varinst | |
( | |
ID_, | |
PROC_INST_ID_, | |
EXECUTION_ID_, | |
TASK_ID_, | |
NAME_, | |
VAR_TYPE_, | |
REV_, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="GBK"?> | |
<InsuranceData> | |
<headInfo> | |
<partnerCode>010106</partnerCode> | |
<partnerComCode>010106</partnerComCode> | |
<massage>test</massage> | |
<requestType>01</requestType> | |
<transactionId>01010601010620130225010002</transactionId> | |
</headInfo> | |
<bodyInfo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 更改流程实例的流程定义ID | |
* @param processInstanceId | |
* @param processDefinitionId | |
*/ | |
@Transactional | |
public void changeProcessDefinitionId(String processInstanceId, String processDefinitionId) { | |
long count = repositoryService.createProcessDefinitionQuery().processDefinitionId(processDefinitionId).count(); | |
if (count == 0) { | |
throw new ServiceException("指定的流程定义不存在!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.activiti.designer.test; | |
import static org.junit.Assert.assertEquals; | |
import static org.junit.Assert.assertNotNull; | |
import static org.junit.Assert.assertNull; | |
import java.io.FileInputStream; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void changeProcessDefinitionId(String processInstanceId, String processDefinitionId) { | |
long count = repositoryService.createProcessDefinitionQuery().processDefinitionId(processDefinitionId).count(); | |
if (count == 0) { | |
throw new ServiceException("指定的流程定义不存在!"); | |
} | |
Session session = processInstanceDao.getSession(); | |
session.createSQLQuery("update ACT_RU_EXECUTION set PROC_DEF_ID_ = ? where PROC_INST_ID_ = ?") | |
.setParameter(0, processDefinitionId).setParameter(1, processInstanceId).executeUpdate(); | |
session.createSQLQuery("update ACT_RU_TASK set PROC_DEF_ID_ = ? where PROC_INST_ID_ = ?") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.List; | |
import java.util.Map; | |
import org.activiti.engine.HistoryService; | |
import org.activiti.engine.ManagementService; | |
import org.activiti.engine.RuntimeService; | |
import org.activiti.engine.TaskService; | |
import org.activiti.engine.history.HistoricVariableInstance; | |
import org.activiti.engine.impl.persistence.entity.ExecutionEntity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.HashMap; | |
import java.util.Map; | |
public class InsertActivitiRecordFromHistory { | |
public static void main(String[] args) { | |
long id = 424101; // 当前的ID | |
String pdid = "effectInsurance:10:424004"; // 新的流程定义ID | |
// 流程实例ID |