Skip to content

Instantly share code, notes, and snippets.

@henryyan
henryyan / gist:1403844
Created November 29, 2011 07:20
获取节点坐标
Execution execution = runtimeService.createExecutionQuery().executionId(processInstanceId).singleResult();//执行实例
Object property = PropertyUtils.getProperty(execution, "activityId");
String activityId = "";
if (property != null) {
activityId = property.toString();
}
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
ProcessDefinitionEntity processDefinition = (ProcessDefinitionEntity) ((RepositoryServiceImpl) repositoryService)
.getDeployedProcessDefinition(processInstance.getProcessDefinitionId());
List<ActivityImpl> activitiList = processDefinition.getActivities();//获得当前任务的所有节点
@henryyan
henryyan / gist:1403857
Created November 29, 2011 07:25
添加红色边框
var pid = $(this).attr('pid');
var imageUrl = ctx + "/activiti/activiti!loadResource.action?resourceType=image&processInstanceId=" + pid;
$.getJSON(ctx + '/activiti/activiti!traceProcess.action?processInstanceId=' + pid, function(info) {
$('<div/>', {
title: '查看流程图(按ESC键可以关闭)',
html: "<img src='" + imageUrl + "' style='position:absolute; left:0px; top:0px;' />"
+ "<div style='position:absolute; border:1px solid red;left:" + (info.x - 1) + "px;top:" + (info.y - 1) + "px;width:" + info.width + "px;height:" + info.height + "px;'></div>"
}).dialog({
modal: true,
resizable: false,
@henryyan
henryyan / gist:1413791
Created December 1, 2011 04:58
gitolite-admin push报错
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 405 bytes, done.
Total 4 (delta 0), reused 0 (delta 0)
remote: ENV GL_RC not set
remote: BEGIN failed--compilation aborted at hooks/update line 20.
remote: error: hook declined to update refs/heads/master
To git@rcgit:repositories/gitolite-admin.git/
! [remote rejected] master -> master (hook declined)
@henryyan
henryyan / gist:1441814
Created December 7, 2011 07:09
gitolite clone问题
testgit@kafeitu-nb:~$ git clone rcgit:testing.git
Cloning into testing...
fatal: 'testing.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
testgit@kafeitu-nb:~$ git clone git@runchain.gicp.net:repositories/testing.git
Cloning into testing...
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 5 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (5/5), done.
@henryyan
henryyan / gist:1441930
Created December 7, 2011 07:59
linux aliases
# common usage aliases
alias ch='chmod 755'
alias offx='xset dpms force off'
alias acs='apt-cache search'
alias agu='sudo apt-get update'
alias agg='sudo apt-get upgrade'
alias agd='sudo apt-get dist-upgrade'
alias agi='sudo apt-get install'
alias agr='sudo apt-get remove'
alias agp='sudo apt-get purge'
@henryyan
henryyan / gist:1442121
Created December 7, 2011 09:19
中盈ERP项目settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/settings/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>/home/henryyan/work/repositories/maven</localRepository>
<mirrors>
<mirror>
<id>nexus_mirror_henryyan</id>
@henryyan
henryyan / gist:1480498
Created December 15, 2011 09:26
Non-resolvable parent POM: Could not find artifact com.runchain.arch:rc-parent:pom:1.4.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 5, column 10
有一个项目的配置文件:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.runchain.arch</groupId>
<artifactId>rc-parent</artifactId>
<version>1.4.0-SNAPSHOT</version>
</parent>
@henryyan
henryyan / gist:1480531
Created December 15, 2011 09:39
maven 日志
┌─(henryyan@kafeitu-nb:pts/1)───────────────────────────────────────────────────────────────────────────────────────────────(~joying-erp)─┐
└─(1:17:38:%)── mvn compile -X ──(Thu,Dec15)─┘
Apache Maven 3.0.3 (r1075438; 2011-03-01 01:31:09+0800)
Maven home: /opt/devtools/maven/apache-maven-3.0.3
Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
Java home: /opt/devtools/jdk/jdk1.6.0_26/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.0.0-14-generic", arch: "amd64", family: "unix"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /opt/devtools/maven/apache-maven-3.0.3/conf/settings.xml
@henryyan
henryyan / gist:1480544
Created December 15, 2011 09:44
私服配置
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/settings/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<profile>
<id>joying-erp</id>
<properties>
<lo4j.file>/home/henryyan/tmp/joying/erp/logs/joying-erp.log.txt</lo4j.file>
<log4j.level>DEBUG</log4j.level>