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
@SpringBootApplication | |
public class MyApp { | |
public static void main(String[] args) { | |
SpringApplication.run(MyApp.class, args); | |
} | |
@Bean | |
public MyConfigurer myConfigurer() { | |
return new MyConfigurer(); |
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
@Test | |
public void testDynamicDeploy() throws Exception { | |
// 1. Build up the model from scratch | |
BpmnModel model = new BpmnModel(); | |
Process process = new Process(); | |
model.addProcess(process); | |
process.setId("my-process"); | |
process.addFlowElement(createStartEvent()); | |
process.addFlowElement(createUserTask("task1", "First task", "fred")); |
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 com.activiti.service.runtime.integration.dto; | |
import java.io.Serializable; | |
import java.util.Set; | |
import org.activiti.engine.TaskService; | |
import org.activiti.engine.delegate.DelegateTask; | |
import org.activiti.engine.task.IdentityLink; | |
import org.activiti.engine.task.IdentityLinkType; | |
import org.springframework.beans.factory.annotation.Autowired; |
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 org.activiti.engine.history.HistoricProcessInstance; | |
import org.activiti.engine.impl.test.PluggableActivitiTestCase; | |
public class QuickTest extends PluggableActivitiTestCase { | |
public void testDeleteReason() { | |
String processDefinitionId = deployOneTaskTestProcess(); | |
String processInstanceId = runtimeService.startProcessInstanceById(processDefinitionId).getId(); | |
assertEquals(1, taskService.createTaskQuery().count()); |
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="UTF-8" ?> | |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
<mapper namespace="org.activiti.engine.impl.persistence.entity.TaskEntity"> | |
<select id="customTaskSelect" parameterType="org.activiti.engine.impl.db.ListQueryParameterObject" resultMap="taskAndVariablesResultMap"> | |
SELECT distinct | |
RES.ID_ as 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
public File getPathForId(BigInteger id) { | |
BigInteger remainder = null; | |
if(id.compareTo(BigInteger.ZERO) < 0) { | |
throw new ContentStorageException("ID cannot be negative"); | |
} | |
Long[] blocks = new Long[iterationDepth]; | |
for(int i=0; i< iterationDepth; i++) { | |
remainder = id.remainder(blockSize); |
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
protected File getFileForId(String id, boolean shouldExist) { | |
BigInteger idValue = null; | |
try { | |
idValue = new BigInteger(id); | |
} catch(NumberFormatException nfe) { | |
throw new ContentStorageException("Illegal ID value, only positive numbers are supported: " + id, nfe); | |
} | |
File path = converter.getPathForId(idValue); | |
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
#!/bin/bash | |
if [[ "$1" == "" ]] ; then | |
echo | |
echo "Missing argument 'project-name'" | |
echo | |
else | |
echo | |
PROJECTNAME=$1 | |
echo "Project : $PROJECTNAME" | |
echo |