提交 342020f9 编写于 作者: Skyeye云's avatar Skyeye云

集成activiti第一步

上级 3ef8b775
...@@ -4833,4 +4833,163 @@ Caused by: java.lang.IllegalStateException: org.springframework.boot.context.emb ...@@ -4833,4 +4833,163 @@ Caused by: java.lang.IllegalStateException: org.springframework.boot.context.emb
[skyeye-promote][INFO] [2018-12-07 12:42:10] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/planprojectflow006 [skyeye-promote][INFO] [2018-12-07 12:42:10] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/planprojectflow006
[skyeye-promote][INFO] [2018-12-07 12:42:14] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/planprojectflow006 [skyeye-promote][INFO] [2018-12-07 12:42:14] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/planprojectflow006
[skyeye-promote][INFO] [2018-12-07 12:43:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取 [skyeye-promote][INFO] [2018-12-07 12:43:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 12:43:22] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login002
[skyeye-promote][INFO] [2018-12-07 12:43:23] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/planproject001
[skyeye-promote][INFO] [2018-12-07 12:43:30] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login002
[skyeye-promote][INFO] [2018-12-07 12:43:30] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login004
[skyeye-promote][INFO] [2018-12-07 12:43:31] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login005
[skyeye-promote][INFO] [2018-12-07 12:43:34] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login002
[skyeye-promote][INFO] [2018-12-07 12:43:35] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/planproject001
[skyeye-promote][INFO] [2018-12-07 12:43:57] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login002
[skyeye-promote][INFO] [2018-12-07 12:43:58] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login004
[skyeye-promote][INFO] [2018-12-07 12:43:59] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login005
[skyeye-promote][INFO] [2018-12-07 12:44:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 12:44:10] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login002
[skyeye-promote][INFO] [2018-12-07 12:44:11] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/planproject001
[skyeye-promote][INFO] [2018-12-07 12:44:14] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login002
[skyeye-promote][INFO] [2018-12-07 12:44:15] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/planprojectflow001
[skyeye-promote][INFO] [2018-12-07 12:45:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 12:46:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 12:47:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 12:48:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 12:49:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 12:50:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 12:51:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 12:52:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 12:53:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 12:54:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 12:55:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 12:56:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 12:57:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 12:58:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 12:59:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:00:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:01:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:02:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:03:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:04:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:05:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:06:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:07:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:08:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:09:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:10:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:11:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:12:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:13:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:14:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:15:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:16:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:17:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:18:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:19:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:20:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:21:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:22:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:23:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:24:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:25:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:26:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:27:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:28:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:29:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:30:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:30:18] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login002
[skyeye-promote][INFO] [2018-12-07 13:30:19] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login004
[skyeye-promote][INFO] [2018-12-07 13:30:20] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login005
[skyeye-promote][INFO] [2018-12-07 13:30:23] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login002
[skyeye-promote][INFO] [2018-12-07 13:30:24] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/planproject001
[skyeye-promote][INFO] [2018-12-07 13:31:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:32:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:33:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:34:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:35:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:36:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:37:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:38:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:39:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:39:14] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login002
[skyeye-promote][INFO] [2018-12-07 13:39:15] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/rmxcx001
[skyeye-promote][INFO] [2018-12-07 13:39:20] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login002
[skyeye-promote][INFO] [2018-12-07 13:39:21] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/common001
[skyeye-promote][INFO] [2018-12-07 13:39:22] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/rmxcx008
[skyeye-promote][INFO] [2018-12-07 13:39:31] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login002
[skyeye-promote][INFO] [2018-12-07 13:39:32] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/common001
[skyeye-promote][INFO] [2018-12-07 13:39:32] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/rmxcx015
[skyeye-promote][INFO] [2018-12-07 13:39:36] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login002
[skyeye-promote][INFO] [2018-12-07 13:39:37] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/rmproperty006
[skyeye-promote][INFO] [2018-12-07 13:39:37] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/rmxcx039
[skyeye-promote][INFO] [2018-12-07 13:39:40] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login002
[skyeye-promote][INFO] [2018-12-07 13:39:41] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/rmxcx020
[skyeye-promote][INFO] [2018-12-07 13:40:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:40:00] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login002
[skyeye-promote][INFO] [2018-12-07 13:40:01] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/rmproperty001
[skyeye-promote][INFO] [2018-12-07 13:40:01] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/dsform006
[skyeye-promote][INFO] [2018-12-07 13:40:08] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login002
[skyeye-promote][INFO] [2018-12-07 13:40:09] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/rmpropertyvalue001
[skyeye-promote][INFO] [2018-12-07 13:40:09] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/rmproperty006
[skyeye-promote][INFO] [2018-12-07 13:40:46] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login002
[skyeye-promote][INFO] [2018-12-07 13:40:47] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login004
[skyeye-promote][INFO] [2018-12-07 13:40:47] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login005
[skyeye-promote][INFO] [2018-12-07 13:40:54] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login002
[skyeye-promote][INFO] [2018-12-07 13:40:54] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login004
[skyeye-promote][INFO] [2018-12-07 13:40:55] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login005
[skyeye-promote][INFO] [2018-12-07 13:40:57] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login002
[skyeye-promote][INFO] [2018-12-07 13:40:58] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login004
[skyeye-promote][INFO] [2018-12-07 13:40:59] com.skyeye.common.filter.SessionFilter.doFilter(116) | 请求链接/login005
[skyeye-promote][INFO] [2018-12-07 13:41:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:42:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:43:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:44:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:45:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:46:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:47:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:48:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:49:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:50:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:51:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:52:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:53:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:54:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:55:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:56:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:57:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:58:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 13:59:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:00:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:01:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:02:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:03:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:04:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:05:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:06:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:07:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:08:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:09:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:10:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:11:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:12:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:13:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:14:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:15:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:16:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:17:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:18:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:19:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:20:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:21:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:22:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:23:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:24:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:25:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:26:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:27:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:28:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:29:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:30:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:31:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:32:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:33:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:34:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
[skyeye-promote][INFO] [2018-12-07 14:35:00] com.skyeye.start.thread.MonitorThread.queryComMation(49) | 读取
\ No newline at end of file
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<aliyun.java.sdk.dysmsapi.version>1.1.0</aliyun.java.sdk.dysmsapi.version> <aliyun.java.sdk.dysmsapi.version>1.1.0</aliyun.java.sdk.dysmsapi.version>
<commons-lang3.version>3.3.2</commons-lang3.version> <commons-lang3.version>3.3.2</commons-lang3.version>
<poi.version>3.14</poi.version> <poi.version>3.14</poi.version>
<activiti.version>5.22.0</activiti.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
...@@ -48,6 +49,70 @@ ...@@ -48,6 +49,70 @@
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> </dependency>
<!-- activiti工作流 -->
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter-basic</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter-actuator</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-rest</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-codec</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-css</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-svg-dom</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-svggen</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-explorer</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>dcharts-widget</artifactId>
<version>0.10.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/dcharts-widget-0.10.0.jar</systemPath>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-diagram-rest</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-simple-workflow</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring</artifactId>
<version>${activiti.version}</version>
</dependency>
<!-- webSocket --> <!-- webSocket -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
...@@ -252,6 +317,16 @@ ...@@ -252,6 +317,16 @@
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<configuration> <configuration>
<fork>true</fork> <fork>true</fork>
<webResources>
<resource>
<directory>${basedir}/lib</directory>
<targetPath>WEB-INF/lib</targetPath>
<filtering>false</filtering>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
</webResources>
</configuration> </configuration>
<dependencies> <dependencies>
<dependency> <dependency>
......
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.skyeye.activity.main;
import java.io.InputStream;
import org.activiti.engine.ActivitiException;
import org.apache.commons.io.IOUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
/**
* @author Tijs Rademakers
*/
@RestController
@RequestMapping(value = "/service")
public class StencilsetRestResource {
@RequestMapping(value="/editor/stencilset", method = RequestMethod.GET, produces = "application/json;charset=utf-8")
public @ResponseBody String getStencilset() {
InputStream stencilsetStream = this.getClass().getClassLoader().getResourceAsStream("stencilset.json");
try {
return IOUtils.toString(stencilsetStream, "utf-8");
} catch (Exception e) {
throw new ActivitiException("Error while loading stencil set", e);
}
}
}
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.skyeye.activity.model;
import org.activiti.editor.constants.ModelDataJsonConstants;
import org.activiti.engine.ActivitiException;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.repository.Model;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
/**
* @author Tijs Rademakers
*/
@RestController
@RequestMapping(value = "/service")
public class ModelEditorJsonRestResource implements ModelDataJsonConstants {
protected static final Logger LOGGER = LoggerFactory.getLogger(ModelEditorJsonRestResource.class);
@Autowired
private RepositoryService repositoryService;
@Autowired
private ObjectMapper objectMapper;
@RequestMapping(value="/model/{modelId}/json", method = RequestMethod.GET, produces = "application/json")
public ObjectNode getEditorJson(@PathVariable String modelId) {
ObjectNode modelNode = null;
Model model = repositoryService.getModel(modelId);
if (model != null) {
try {
if (StringUtils.isNotEmpty(model.getMetaInfo())) {
modelNode = (ObjectNode) objectMapper.readTree(model.getMetaInfo());
} else {
modelNode = objectMapper.createObjectNode();
modelNode.put(MODEL_NAME, model.getName());
}
modelNode.put(MODEL_ID, model.getId());
ObjectNode editorJsonNode = (ObjectNode) objectMapper.readTree(
new String(repositoryService.getModelEditorSource(model.getId()), "utf-8"));
modelNode.put("model", editorJsonNode);
} catch (Exception e) {
LOGGER.error("Error creating model JSON", e);
throw new ActivitiException("Error creating model JSON", e);
}
}
return modelNode;
}
}
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.skyeye.activity.model;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import org.activiti.editor.constants.ModelDataJsonConstants;
import org.activiti.engine.ActivitiException;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.repository.Model;
import org.apache.batik.transcoder.TranscoderInput;
import org.apache.batik.transcoder.TranscoderOutput;
import org.apache.batik.transcoder.image.PNGTranscoder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
/**
* @author Tijs Rademakers
*/
@RestController
@RequestMapping(value = "/service")
public class ModelSaveRestResource implements ModelDataJsonConstants {
protected static final Logger LOGGER = LoggerFactory.getLogger(ModelSaveRestResource.class);
@Autowired
private RepositoryService repositoryService;
@Autowired
private ObjectMapper objectMapper;
@RequestMapping(value="/model/{modelId}/save", method = RequestMethod.PUT)
@ResponseStatus(value = HttpStatus.OK)
public void saveModel(@PathVariable String modelId, @RequestBody MultiValueMap<String, String> values) {
try {
Model model = repositoryService.getModel(modelId);
ObjectNode modelJson = (ObjectNode) objectMapper.readTree(model.getMetaInfo());
modelJson.put(MODEL_NAME, values.getFirst("name"));
modelJson.put(MODEL_DESCRIPTION, values.getFirst("description"));
model.setMetaInfo(modelJson.toString());
model.setName(values.getFirst("name"));
repositoryService.saveModel(model);
repositoryService.addModelEditorSource(model.getId(), values.getFirst("json_xml").getBytes("utf-8"));
InputStream svgStream = new ByteArrayInputStream(values.getFirst("svg_xml").getBytes("utf-8"));
TranscoderInput input = new TranscoderInput(svgStream);
PNGTranscoder transcoder = new PNGTranscoder();
// Setup output
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
TranscoderOutput output = new TranscoderOutput(outStream);
// Do the transformation
transcoder.transcode(input, output);
final byte[] result = outStream.toByteArray();
repositoryService.addModelEditorSourceExtra(model.getId(), result);
outStream.close();
} catch (Exception e) {
LOGGER.error("Error saving model", e);
throw new ActivitiException("Error saving model", e);
}
}
}
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
<script src="js/jstools.js" type="text/javascript" charset="utf-8"></script>
<script src="js/raphael.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery/jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery/jquery.progressbar.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery/jquery.asyncqueue.js" type="text/javascript" charset="utf-8"></script>
<script src="js/Color.js" type="text/javascript" charset="utf-8"></script>
<script src="js/Polyline.js" type="text/javascript" charset="utf-8"></script>
<script src="js/ActivityImpl.js" type="text/javascript" charset="utf-8"></script>
<script src="js/ActivitiRest.js" type="text/javascript" charset="utf-8"></script>
<script src="js/LineBreakMeasurer.js" type="text/javascript" charset="utf-8"></script>
<script src="js/ProcessDiagramGenerator.js" type="text/javascript" charset="utf-8"></script>
<script src="js/ProcessDiagramCanvas.js" type="text/javascript" charset="utf-8"></script>
<style type="text/css" media="screen">
</style>
</head>
<body>
<div class="wrapper">
<div id="pb1"></div>
<div id="overlayBox" >
<div id="diagramBreadCrumbs" class="diagramBreadCrumbs" onmousedown="return false" onselectstart="return false"></div>
<div id="diagramHolder" class="diagramHolder"></div>
<div class="diagram-info" id="diagramInfo"></div>
</div>
</div>
<script language='javascript'>
var DiagramGenerator = {};
var pb1;
$(document).ready(function(){
var query_string = {};
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
query_string[pair[0]] = pair[1];
}
var processDefinitionId = query_string["processDefinitionId"];
var processInstanceId = query_string["processInstanceId"];
console.log("Initialize progress bar");
pb1 = new $.ProgressBar({
boundingBox: '#pb1',
label: 'Progressbar!',
on: {
complete: function() {
console.log("Progress Bar COMPLETE");
this.set('label', 'complete!');
if (processInstanceId) {
ProcessDiagramGenerator.drawHighLights(processInstanceId);
}
},
valueChange: function(e) {
this.set('label', e.newVal + '%');
}
},
value: 0
});
console.log("Progress bar inited");
ProcessDiagramGenerator.options = {
diagramBreadCrumbsId: "diagramBreadCrumbs",
diagramHolderId: "diagramHolder",
diagramInfoId: "diagramInfo",
on: {
click: function(canvas, element, contextObject){
var mouseEvent = this;
console.log("[CLICK] mouseEvent: %o, canvas: %o, clicked element: %o, contextObject: %o", mouseEvent, canvas, element, contextObject);
if (contextObject.getProperty("type") == "callActivity") {
var processDefinitonKey = contextObject.getProperty("processDefinitonKey");
var processDefinitons = contextObject.getProperty("processDefinitons");
var processDefiniton = processDefinitons[0];
console.log("Load callActivity '" + processDefiniton.processDefinitionKey + "', contextObject: ", contextObject);
// Load processDefinition
ProcessDiagramGenerator.drawDiagram(processDefiniton.processDefinitionId);
}
},
rightClick: function(canvas, element, contextObject){
var mouseEvent = this;
console.log("[RIGHTCLICK] mouseEvent: %o, canvas: %o, clicked element: %o, contextObject: %o", mouseEvent, canvas, element, contextObject);
},
over: function(canvas, element, contextObject){
var mouseEvent = this;
//console.log("[OVER] mouseEvent: %o, canvas: %o, clicked element: %o, contextObject: %o", mouseEvent, canvas, element, contextObject);
// TODO: show tooltip-window with contextObject info
ProcessDiagramGenerator.showActivityInfo(contextObject);
},
out: function(canvas, element, contextObject){
var mouseEvent = this;
//console.log("[OUT] mouseEvent: %o, canvas: %o, clicked element: %o, contextObject: %o", mouseEvent, canvas, element, contextObject);
ProcessDiagramGenerator.hideInfo();
}
}
};
var baseUrl = window.document.location.protocol + "//" + window.document.location.host + "/";
var shortenedUrl = window.document.location.href.replace(baseUrl, "");
baseUrl = baseUrl + shortenedUrl.substring(0, shortenedUrl.indexOf("/"));
ActivitiRest.options = {
processInstanceHighLightsUrl: baseUrl + "/service/process-instance/{processInstanceId}/highlights?callback=?",
processDefinitionUrl: baseUrl + "/service/process-definition/{processDefinitionId}/diagram-layout?callback=?",
processDefinitionByKeyUrl: baseUrl + "/service/process-definition/{processDefinitionKey}/diagram-layout?callback=?"
};
if (processDefinitionId) {
ProcessDiagramGenerator.drawDiagram(processDefinitionId);
} else {
alert("processDefinitionId parameter is required");
}
});
</script>
</body>
</html>
var ActivitiRest = {
options: {},
getProcessDefinitionByKey: function(processDefinitionKey, callback) {
var url = Lang.sub(this.options.processDefinitionByKeyUrl, {processDefinitionKey: processDefinitionKey});
$.ajax({
url: url,
dataType: 'jsonp',
cache: false,
async: true,
success: function(data, textStatus) {
var processDefinition = data;
if (!processDefinition) {
console.error("Process definition '" + processDefinitionKey + "' not found");
} else {
callback.apply({processDefinitionId: processDefinition.id});
}
}
}).done(function(data, textStatus) {
console.log("ajax done");
}).fail(function(jqXHR, textStatus, error){
console.error('Get diagram layout['+processDefinitionKey+'] failure: ', textStatus, 'error: ', error, jqXHR);
});
},
getProcessDefinition: function(processDefinitionId, callback) {
var url = Lang.sub(this.options.processDefinitionUrl, {processDefinitionId: processDefinitionId});
$.ajax({
url: url,
dataType: 'jsonp',
cache: false,
async: true,
success: function(data, textStatus) {
var processDefinitionDiagramLayout = data;
if (!processDefinitionDiagramLayout) {
console.error("Process definition diagram layout '" + processDefinitionId + "' not found");
return;
} else {
callback.apply({processDefinitionDiagramLayout: processDefinitionDiagramLayout});
}
}
}).done(function(data, textStatus) {
console.log("ajax done");
}).fail(function(jqXHR, textStatus, error){
console.log('Get diagram layout['+processDefinitionId+'] failure: ', textStatus, jqXHR);
});
},
getHighLights: function(processInstanceId, callback) {
var url = Lang.sub(this.options.processInstanceHighLightsUrl, {processInstanceId: processInstanceId});
$.ajax({
url: url,
dataType: 'jsonp',
cache: false,
async: true,
success: function(data, textStatus) {
console.log("ajax returned data");
var highLights = data;
if (!highLights) {
console.log("highLights not found");
return;
} else {
callback.apply({highLights: highLights});
}
}
}).done(function(data, textStatus) {
console.log("ajax done");
}).fail(function(jqXHR, textStatus, error){
console.log('Get HighLights['+processInstanceId+'] failure: ', textStatus, jqXHR);
});
}
};
\ No newline at end of file
/** * * @author Tom Baeyens * @author (Javascript) Dmitry Farafonov */ var ActivityImpl = function(activityJson){ this.outgoingTransitions = []; this.outgoingTransitions = []; this.incomingTransitions = []; this.activityBehavior = null; this.parent = null; this.isScope = false; this.isAsync = false; this.isExclusive = false; this.x = -1; this.y = -1; this.width = -1; this.height = -1; this.properties = {}; //console.log("activityJson: ", activityJson); if (activityJson != undefined) { this.setId(activityJson.activityId); for (var propertyName in activityJson.properties) { this.setProperty(propertyName, activityJson.properties[propertyName]); } //this.setProperty("name", activityJson.activityName); //this.setProperty("type", activityJson.activityType); this.setX(activityJson.x); this.setY(activityJson.y); this.setWidth(activityJson.width); this.setHeight(activityJson.height); if (activityJson.multiInstance) this.setProperty("multiInstance", activityJson.multiInstance); if (activityJson.collapsed) { this.setProperty("collapsed", activityJson.collapsed); } if (activityJson.isInterrupting != undefined) this.setProperty("isInterrupting", activityJson.isInterrupting); } }; ActivityImpl.prototype = { outgoingTransitions: [], outgoingTransitions: [], incomingTransitions: [], activityBehavior: null, parent: null, isScope: false, isAsync: false, isExclusive: false, id: null, properties: {}, // Graphical information x: -1, y: -1, width: -1, height: -1, setId: function(id){ this.id = id; }, getId: function(){ return this.id; }, setProperty: function(name, value){ this.properties[name] = value; }, getProperty: function(name){ return this.properties[name]; }, createOutgoingTransition: function(transitionId){ }, toString: function(id) { return "Activity("+id+")"; }, getParentActivity: function(){ /* if (parent instanceof ActivityImpl) { 79 return (ActivityImpl) parent; 80 } 81 return null; */ return this.parent; }, // restricted setters /////////////////////////////////////////////////////// setOutgoingTransitions: function(outgoingTransitions){ this.outgoingTransitions = outgoingTransitions; }, setParent: function(parent){ this.parent = parent; }, setIncomingTransitions: function(incomingTransitions){ this.incomingTransitions = incomingTransitions; }, // getters and setters ////////////////////////////////////////////////////// getOutgoingTransitions: function(){ return this.outgoingTransitions; }, getActivityBehavior: function(){ return this.activityBehavior; }, setActivityBehavior: function(activityBehavior){ this.activityBehavior = activityBehavior; }, getParent: function(){ return this.parent; }, getIncomingTransitions: function(){ return this.incomingTransitions; }, isScope: function(){ return this.isScope; }, setScope: function(isScope){ this.isScope = isScope; }, getX: function(){ return this.x; }, setX: function(x){ this.x = x; }, getY: function(){ return this.y; }, setY: function(y){ this.y = y; }, getWidth: function(){ return this.width; }, setWidth: function(width){ this.width = width; }, getHeight: function(){ return this.height; }, setHeight: function(height){ this.height = height; }, isAsync: function() { return this.isAsync; }, setAsync: function(isAsync) { this.isAsync = isAsync; }, isExclusive: function() { return this.isExclusive; }, setExclusive: function(isExclusive) { this.isExclusive = isExclusive; }, vvoid: function(){} };
\ No newline at end of file
/**
* Word wrapping
*
* @author (Javascript) Dmitry Farafonov
*/
var AttributedStringIterator = function(text){
//this.text = this.rtrim(this.ltrim(text));
text = text.replace(/(\s)+/, " ");
this.text = this.rtrim(text);
/*
if (beginIndex < 0 || beginIndex > endIndex || endIndex > length()) {
throw new IllegalArgumentException("Invalid substring range");
}
*/
this.beginIndex = 0;
this.endIndex = this.text.length;
this.currentIndex = this.beginIndex;
//console.group("[AttributedStringIterator]");
var i = 0;
var string = this.text;
var fullPos = 0;
//console.log("string: \"" + string + "\", length: " + string.length);
this.startWordOffsets = [];
this.startWordOffsets.push(fullPos);
// TODO: remove i 1000
while (i<1000) {
var pos = string.search(/[ \t\n\f-\.\,]/);
if (pos == -1)
break;
// whitespace start
fullPos += pos;
string = string.substr(pos);
////console.log("fullPos: " + fullPos + ", pos: " + pos + ", string: ", string);
// remove whitespaces
var pos = string.search(/[^ \t\n\f-\.\,]/);
if (pos == -1)
break;
// whitespace end
fullPos += pos;
string = string.substr(pos);
////console.log("fullPos: " + fullPos);
this.startWordOffsets.push(fullPos);
i++;
}
//console.log("startWordOffsets: ", this.startWordOffsets);
//console.groupEnd();
};
AttributedStringIterator.prototype = {
getEndIndex: function(pos){
if (typeof(pos) == "undefined")
return this.endIndex;
var string = this.text.substr(pos, this.endIndex - pos);
var posEndOfLine = string.search(/[\n]/);
if (posEndOfLine == -1)
return this.endIndex;
else
return pos + posEndOfLine;
},
getBeginIndex: function(){
return this.beginIndex;
},
isWhitespace: function(pos){
var str = this.text[pos];
var whitespaceChars = " \t\n\f";
return (whitespaceChars.indexOf(str) != -1);
},
isNewLine: function(pos){
var str = this.text[pos];
var whitespaceChars = "\n";
return (whitespaceChars.indexOf(str) != -1);
},
preceding: function(pos){
//console.group("[AttributedStringIterator.preceding]");
for(var i in this.startWordOffsets) {
var startWordOffset = this.startWordOffsets[i];
if (pos < startWordOffset && i>0) {
//console.log("startWordOffset: " + this.startWordOffsets[i-1]);
//console.groupEnd();
return this.startWordOffsets[i-1];
}
}
//console.log("pos: " + pos);
//console.groupEnd();
return this.startWordOffsets[i];
},
following: function(pos){
//console.group("[AttributedStringIterator.following]");
for(var i in this.startWordOffsets) {
var startWordOffset = this.startWordOffsets[i];
if (pos < startWordOffset && i>0) {
//console.log("startWordOffset: " + this.startWordOffsets[i]);
//console.groupEnd();
return this.startWordOffsets[i];
}
}
//console.log("pos: " + pos);
//console.groupEnd();
return this.startWordOffsets[i];
},
ltrim: function(str){
var patt2=/^\s+/g;
return str.replace(patt2, "");
},
rtrim: function(str){
var patt2=/\s+$/g;
return str.replace(patt2, "");
},
getLayout: function(start, limit){
return this.text.substr(start, limit - start);
},
getCharAtPos: function(pos) {
return this.text[pos];
}
};
var LineBreakMeasurer = function(paper, x, y, text, fontAttrs){
this.paper = paper;
this.text = new AttributedStringIterator(text);
this.fontAttrs = fontAttrs;
if (this.text.getEndIndex() - this.text.getBeginIndex() < 1) {
throw {message: "Text must contain at least one character.", code: "IllegalArgumentException"};
}
//this.measurer = new TextMeasurer(paper, this.text, this.fontAttrs);
this.limit = this.text.getEndIndex();
this.pos = this.start = this.text.getBeginIndex();
this.rafaelTextObject = this.paper.text(x, y, this.text.text).attr(fontAttrs).attr("text-anchor", "start");
this.svgTextObject = this.rafaelTextObject[0];
};
LineBreakMeasurer.prototype = {
nextOffset: function(wrappingWidth, offsetLimit, requireNextWord) {
//console.group("[nextOffset]");
var nextOffset = this.pos;
if (this.pos < this.limit) {
if (offsetLimit <= this.pos) {
throw {message: "offsetLimit must be after current position", code: "IllegalArgumentException"};
}
var charAtMaxAdvance = this.getLineBreakIndex(this.pos, wrappingWidth);
//charAtMaxAdvance --;
//console.log("charAtMaxAdvance:", charAtMaxAdvance, ", [" + this.text.getCharAtPos(charAtMaxAdvance) + "]");
if (charAtMaxAdvance == this.limit) {
nextOffset = this.limit;
//console.log("charAtMaxAdvance == this.limit");
} else if (this.text.isNewLine(charAtMaxAdvance)) {
//console.log("isNewLine");
nextOffset = charAtMaxAdvance+1;
} else if (this.text.isWhitespace(charAtMaxAdvance)) {
// TODO: find next noSpaceChar
//return nextOffset;
nextOffset = this.text.following(charAtMaxAdvance);
} else {
// Break is in a word; back up to previous break.
/*
var testPos = charAtMaxAdvance + 1;
if (testPos == this.limit) {
console.error("hbz...");
} else {
nextOffset = this.text.preceding(charAtMaxAdvance);
}
*/
nextOffset = this.text.preceding(charAtMaxAdvance);
if (nextOffset <= this.pos) {
nextOffset = Math.max(this.pos+1, charAtMaxAdvance);
}
}
}
if (nextOffset > offsetLimit) {
nextOffset = offsetLimit;
}
//console.log("nextOffset: " + nextOffset);
//console.groupEnd();
return nextOffset;
},
nextLayout: function(wrappingWidth) {
//console.groupCollapsed("[nextLayout]");
if (this.pos < this.limit) {
var requireNextWord = false;
var layoutLimit = this.nextOffset(wrappingWidth, this.limit, requireNextWord);
//console.log("layoutLimit:", layoutLimit);
if (layoutLimit == this.pos) {
//console.groupEnd();
return null;
}
var result = this.text.getLayout(this.pos, layoutLimit);
//console.log("layout: \"" + result + "\"");
// remove end of line
//var posEndOfLine = this.text.getEndIndex(this.pos);
//if (posEndOfLine < result.length)
// result = result.substr(0, posEndOfLine);
this.pos = layoutLimit;
//console.groupEnd();
return result;
} else {
//console.groupEnd();
return null;
}
},
getLineBreakIndex: function(pos, wrappingWidth) {
//console.group("[getLineBreakIndex]");
//console.log("pos:"+pos + ", text: \""+ this.text.text.replace(/\n/g, "_").substr(pos, 1) + "\"");
var bb = this.rafaelTextObject.getBBox();
var charNum = -1;
try {
var svgPoint = this.svgTextObject.getStartPositionOfChar(pos);
//var dot = this.paper.ellipse(svgPoint.x, svgPoint.y, 1, 1).attr({"stroke-width": 0, fill: Color.blue});
svgPoint.x = svgPoint.x + wrappingWidth;
//svgPoint.y = bb.y;
//console.log("svgPoint:", svgPoint);
//var dot = this.paper.ellipse(svgPoint.x, svgPoint.y, 1, 1).attr({"stroke-width": 0, fill: Color.red});
charNum = this.svgTextObject.getCharNumAtPosition(svgPoint);
} catch (e){
console.warn("getStartPositionOfChar error, pos:" + pos);
/*
var testPos = pos + 1;
if (testPos < this.limit) {
return testPos
}
*/
}
//console.log("charNum:", charNum);
if (charNum == -1) {
//console.groupEnd();
return this.text.getEndIndex(pos);
} else {
// When case there is new line between pos and charnum then use this new line
var newLineIndex = this.text.getEndIndex(pos);
if (newLineIndex < charNum ) {
console.log("newLineIndex <= charNum, newLineIndex:"+newLineIndex+", charNum:"+charNum, "\"" + this.text.text.substr(newLineIndex+1).replace(/\n/g, "?") + "\"");
//console.groupEnd();
return newLineIndex;
}
//var charAtMaxAdvance = this.text.text.substring(charNum, charNum + 1);
var charAtMaxAdvance = this.text.getCharAtPos(charNum);
//console.log("!!charAtMaxAdvance: " + charAtMaxAdvance);
//console.groupEnd();
return charNum;
}
},
getPosition: function() {
return this.pos;
}
};
\ No newline at end of file
/**
* Class to generate polyline
*
* @author Dmitry Farafonov
*/
var ANCHOR_TYPE= {
main: "main",
middle: "middle",
first: "first",
last: "last"
};
function Anchor(uuid, type, x, y) {
this.uuid = uuid;
this.x = x
this.y = y
this.type = (type == ANCHOR_TYPE.middle) ? ANCHOR_TYPE.middle : ANCHOR_TYPE.main;
};
Anchor.prototype = {
uuid: null,
x: 0,
y: 0,
type: ANCHOR_TYPE.main,
isFirst: false,
isLast: false,
ndex: 0,
typeIndex: 0
};
function Polyline(uuid, points, strokeWidth) {
/* Array on coordinates:
* points: [{x: 410, y: 110}, 1
* {x: 570, y: 110}, 1 2
* {x: 620, y: 240}, 2 3
* {x: 750, y: 270}, 3 4
* {x: 650, y: 370}]; 4
*/
this.points = points;
/*
* path for graph
* [["M", x1, y1], ["L", x2, y2], ["C", ax, ay, bx, by, x3, y3], ["L", x3, y3]]
*/
this.path = [];
this.anchors = [];
if (strokeWidth) this.strokeWidth = strokeWidth;
this.closePath = false;
this.init();
};
Polyline.prototype = {
id: null,
points: [],
path: [],
anchors: [],
strokeWidth: 1,
radius: 15,
showDetails: false,
element: null,
isDefaultConditionAvailable: false,
closePath: false,
init: function(points){
var linesCount = this.getLinesCount();
if (linesCount < 1)
return;
this.normalizeCoordinates();
// create anchors
this.pushAnchor(ANCHOR_TYPE.first, this.getLine(0).x1, this.getLine(0).y1);
for(var i = 1; i < linesCount; i++){
var line1 = this.getLine(i-1),
line2 = this.getLine(i);
//this.pushAnchor(ANCHOR_TYPE.middle, line1.x1 + line1.x2-line1.x1, line1.y1 + line1.y2-line1.y1);
this.pushAnchor(ANCHOR_TYPE.main, line1.x2, line1.y2);
//this.pushAnchor(ANCHOR_TYPE.middle, line2.x1 + line2.x2-line2.x1, line2.y1 + line2.y2-line2.y1);
}
this.pushAnchor(ANCHOR_TYPE.last, this.getLine(linesCount-1).x2, this.getLine(linesCount-1).y2);
this.rebuildPath();
},
normalizeCoordinates: function(){
for(var i=0; i < this.points.length; i++){
this.points[i].x = parseFloat(this.points[i].x);
this.points[i].y = parseFloat(this.points[i].y);
}
},
getLinesCount: function(){
return this.points.length-1;
},
_getLine: function(i){
return {x1: this.points[i].x, y1: this.points[i].y, x2: this.points[i+1].x, y2: this.points[i+1].y};
},
getLine: function(i){
var line = this._getLine(i);
line.angle = this.getLineAngle(i) ;
return line;
},
getLineAngle: function(i){
var line = this._getLine(i);
return Math.atan2(line.y2 - line.y1, line.x2 - line.x1);
},
getLineLengthX: function(i){
var line = this.getLine(i);
return (line.x2 - line.x1);
},
getLineLengthY: function(i){
var line = this.getLine(i);
return (line.y2 - line.y1);
},
getLineLength: function(i){
var line = this.getLine(i);
return Math.sqrt(Math.pow(this.getLineLengthX(i), 2) + Math.pow(this.getLineLengthY(i), 2));
},
getAnchors: function(){
//
// ????
return this.anchors;
},
getAnchorsCount: function(type){
if (!type)
return this.anchors.length;
else {
var count = 0;
for(var i=0; i < this.getAnchorsCount(); i++){
var anchor = this.anchors[i];
if (anchor.getType() == type) {
count++;
}
}
return count;
}
},
pushAnchor: function(type, x, y, index){
if (type == ANCHOR_TYPE.first) {
index = 0;
typeIndex = 0;
} else if (type == ANCHOR_TYPE.last) {
index = this.getAnchorsCount();
typeIndex = 0;
} else if (!index) {
index = this.anchors.length;
} else {
// anchors, , index
//var anchor = this.getAnchor()
for(var i=0; i < this.getAnchorsCount(); i++){
var anchor = this.anchors[i];
if (anchor.index > index) {
anchor.index++;
anchor.typeIndex++;
}
}
}
var anchor = new Anchor(this.id, ANCHOR_TYPE.main, x, y, index, typeIndex);
this.anchors.push(anchor);
},
getAnchor: function(position){
return this.anchors[position];
},
getAnchorByType: function(type, position){
if (type == ANCHOR_TYPE.first)
return this.anchors[0];
if (type == ANCHOR_TYPE.last)
return this.anchors[this.getAnchorsCount()-1];
for(var i=0; i < this.getAnchorsCount(); i++){
var anchor = this.anchors[i];
if (anchor.type == type) {
if( position == anchor.position)
return anchor;
}
}
return null;
},
addNewPoint: function(position, x, y){
//
for(var i = 0; i < this.getLinesCount(); i++){
var line = this.getLine(i);
if (x > line.x1 && x < line.x2 && y > line.y1 && y < line.y2) {
this.points.splice(i+1,0,{x: x, y: y});
break;
}
}
this.rebuildPath();
},
rebuildPath: function(){
var path = [];
for(var i = 0; i < this.getAnchorsCount(); i++){
var anchor = this.getAnchor(i);
var pathType = ""
if (i==0)
pathType = "M";
else
pathType = "L";
// TODO: save previous points and calculate new path just if points are updated, and then save currents values as previous
var targetX = anchor.x, targetY = anchor.y;
if (i>0 && i < this.getAnchorsCount()-1) {
// get new x,y
var cx = anchor.x, cy = anchor.y;
// pivot point of prev line
var AO = this.getLineLength(i-1);
if (AO < this.radius) {
AO = this.radius;
}
this.isDefaultConditionAvailable = (this.isDefaultConditionAvailable || (i == 1 && AO > 10));
//console.log("isDefaultConditionAvailable", this.isDefaultConditionAvailable);
var ED = this.getLineLengthY(i-1) * this.radius / AO;
var OD = this.getLineLengthX(i-1) * this.radius / AO;
targetX = anchor.x - OD;
targetY = anchor.y - ED;
if (AO < 2*this.radius && i>1) {
targetX = anchor.x - this.getLineLengthX(i-1)/2;
targetY = anchor.y - this.getLineLengthY(i-1)/2;;
}
// pivot point of next line
var AO = this.getLineLength(i);
if (AO < this.radius) {
AO = this.radius;
}
var ED = this.getLineLengthY(i) * this.radius / AO;
var OD = this.getLineLengthX(i) * this.radius / AO;
var nextSrcX = anchor.x + OD;
var nextSrcY = anchor.y + ED;
if (AO < 2*this.radius && i<this.getAnchorsCount()-2) {
nextSrcX = anchor.x + this.getLineLengthX(i)/2;
nextSrcY = anchor.y + this.getLineLengthY(i)/2;;
}
var dx0 = (cx - targetX) / 3,
dy0 = (cy - targetY) / 3,
ax = cx - dx0,
ay = cy - dy0,
dx1 = (cx - nextSrcX) / 3,
dy1 = (cy - nextSrcY) / 3,
bx = cx - dx1,
by = cy - dy1,
zx=nextSrcX, zy=nextSrcY;
if (this.showDetails) {
var c = ProcessDiagramCanvas.g.path("M"+targetX+","+targetY+"L"+ax+","+ay).attr({stroke: Color.get(255, 153, 51), "stroke-dasharray": "- "});
var c = ProcessDiagramCanvas.g.path("M"+nextSrcX+","+nextSrcY+"L"+bx+","+by).attr({stroke: Color.get(255, 153, 51), "stroke-dasharray": "- "});
var c = ProcessDiagramCanvas.g.ellipse(ax, ay, 2, 2).attr({stroke: Color.SlateGrey});
var c = ProcessDiagramCanvas.g.ellipse(bx, by, 2, 2).attr({stroke: Color.SlateGrey});
var c = ProcessDiagramCanvas.g.ellipse(cx, cy, this.radius, this.radius).attr({stroke: Color.Gainsboro});
var c = ProcessDiagramCanvas.g.ellipse(targetX, targetY, 2, 2).attr({fill: Color.red});
var c = ProcessDiagramCanvas.g.ellipse(nextSrcX, nextSrcY, 2, 2).attr({fill: Color.red});
}
} else if (i==1 && this.getAnchorsCount() == 2){
var AO = this.getLineLength(i-1);
if (AO < this.radius) {
AO = this.radius;
}
this.isDefaultConditionAvailable = (this.isDefaultConditionAvailable || (i == 1 && AO > 10));
//console.log("-- isDefaultConditionAvailable", this.isDefaultConditionAvailable);
}
// anti smoothing
if (this.strokeWidth%2 == 1) {
targetX += 0.5;
targetY += 0.5;
}
path.push([pathType, targetX, targetY]);
if (i>0 && i < this.getAnchorsCount()-1) {
path.push(["C", ax, ay, bx, by, zx, zy]);
}
}
if (this.closePath) {
console.log("closePath:", this.closePath);
path.push(["Z"]);
}
this.path = path;
},
transform: function(transformation){
this.element.transform(transformation);
},
attr: function(attrs){
//console.log("attrs: " +attrs, "", this.element);
// TODO: foreach and set each
this.element.attr(attrs);
}
};
function Polygone(points, strokeWidth) {
/* Array on coordinates:
* points: [{x: 410, y: 110}, 1
* {x: 570, y: 110}, 1 2
* {x: 620, y: 240}, 2 3
* {x: 750, y: 270}, 3 4
* {x: 650, y: 370}]; 4
*/
this.points = points;
/*
* path for graph
* [["M", x1, y1], ["L", x2, y2], ["C", ax, ay, bx, by, x3, y3], ["L", x3, y3]]
*/
this.path = [];
this.anchors = [];
if (strokeWidth) this.strokeWidth = strokeWidth;
this.closePath = true;
this.init();
};
/*
* Poligone is inherited from Poliline: draws closedPath of polyline
*/
var Foo = function () { };
Foo.prototype = Polyline.prototype;
Polygone.prototype = new Foo();
Polygone.prototype.rebuildPath = function(){
var path = [];
//console.log("Polygone rebuildPath");
for(var i = 0; i < this.getAnchorsCount(); i++){
var anchor = this.getAnchor(i);
var pathType = ""
if (i==0)
pathType = "M";
else
pathType = "L";
var targetX = anchor.x, targetY = anchor.y;
// anti smoothing
if (this.strokeWidth%2 == 1) {
targetX += 0.5;
targetY += 0.5;
}
path.push([pathType, targetX, targetY]);
}
if (this.closePath)
path.push(["Z"]);
this.path = path;
};
/*
Polygone.prototype.transform = function(transformation){
this.element.transform(transformation);
};
*/
\ No newline at end of file
/*
* This file is part of the jquery plugin "asyncQueue".
*
* (c) Sebastien Roch <roch.sebastien@gmail.com>
* @author (parallel) Dmitry Farafonov
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
(function($){
$.AsyncQueue = function() {
var that = this,
queue = [],
completeFunc,
failureFunc,
paused = false,
lastCallbackData,
_run,
_complete,
inQueue = 0,
defaultTimeOut = 10;
_run = function() {
var f = queue.shift();
if (f) {
inQueue++;
setTimeout(function(){
f.fn.apply(that, [that]);
if (!f.isParallel)
if (paused === false) {
_run();
}
inQueue --;
if (inQueue == 0 && queue.length == 0)
_complete();
}, f.timeOut);
if (f.isParallel)
if (paused === false) {
_run();
}
}
};
_complete = function(){
if (completeFunc)
completeFunc.apply(that, [that]);
};
this.onComplete = function(func) {
completeFunc = func;
};
this.onFailure = function(func) {
failureFunc = func;
};
this.add = function(func) {
// TODO: add callback for queue[i] complete
var obj = arguments[0];
if (obj && Object.prototype.toString.call(obj) === "[object Array]") {
var fn = arguments[1];
var timeOut = (typeof(arguments[2]) != "undefined")? arguments[2] : defaultTimeOut;
if (typeof(fn) == "function") {
for(var i = 0; i < obj.length; i++) {
var f = function(objx){
queue.push({isParallel: true, fn: function(){fn.apply(that, [that, objx]);}, timeOut: timeOut});
}(obj[i])
}
}
} else {
var fn = arguments[0];
var timeOut = (typeof(arguments[1]) != "undefined")? arguments[2] : defaultTimeOut;
queue.push({isParallel: false, fn: func, timeOut: timeOut});
}
return this;
};
this.addParallel = function(func, timeOut) {
// TODO: add callback for queue[i] complete
queue.push({isParallel: true, fn: func, timeOut: timeOut});
return this;
};
this.storeData = function(dataObject) {
lastCallbackData = dataObject;
return this;
};
this.lastCallbackData = function () {
return lastCallbackData;
};
this.run = function() {
paused = false;
_run();
};
this.pause = function () {
paused = true;
return this;
};
this.failure = function() {
paused = true;
if (failureFunc) {
var args = [that];
for(i = 0; i < arguments.length; i++) {
args.push(arguments[i]);
}
failureFunc.apply(that, args);
}
};
this.size = function(){
return queue.length;
};
return this;
}
})(jQuery);
/*
* @ Dmitry Farafonov
*/
(function($){
$.ProgressBar = function(options) {
this.element = $(options.boundingBox);
if (options.on && options.on.complete){
this.onComplete = options.on.complete;
}
if (options.on && options.on.valueChange){
this.onValueChange = options.on.valueChange;
}
this._create();
if (options.label)
this.set("label", options.label);
if (options.value)
this.value(options.value);
if (options.max)
this.set("max", options.max);
};
$.ProgressBar.prototype = {
options: {
value: 0,
max: 100
},
min: 0,
_create: function() {
this.element
.addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
.attr({
role: "progressbar",
"aria-valuemin": this.min,
"aria-valuemax": this.options.max,
"aria-valuenow": this._value()
});
this.valueDiv = $( "<div class='ui-progressbar-label'></div>" )
.appendTo( this.element );
this.valueDiv = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" )
.appendTo( this.element );
this.oldValue = this._value();
this._refreshValue();
},
_destroy: function() {
this.element
.removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
.removeAttr( "role" )
.removeAttr( "aria-valuemin" )
.removeAttr( "aria-valuemax" )
.removeAttr( "aria-valuenow" );
this.valueDiv.remove();
},
value: function( newValue ) {
if ( newValue === undefined ) {
return this._value();
}
this._setOption( "value", newValue );
return this;
},
_setOption: function( key, value ) {
if ( key === "value" ) {
//var oldVal = this.options.value;
this.options.value = value;
this._refreshValue();
if (this.onValueChange)
this.onValueChange.apply(this, [{oldVal: this.oldValue, newVal: value}]);
if ( this._value() === this.options.max ) {
//this._trigger( "complete" );
if (this.onComplete)
this.onComplete.apply(this);
}
} else if (key === "label") {
$(this.element).find(".ui-progressbar-label").html(value);
} else if (key === "max") {
this.options.max = value;
}
//this._super( key, value );
},
_value: function() {
var val = this.options.value;
// normalize invalid value
if ( typeof val !== "number" ) {
val = 0;
}
return Math.min( this.options.max, Math.max( this.min, val ) );
},
_percentage: function() {
return 100 * this._value() / this.options.max;
},
_refreshValue: function() {
var value = this.value(),
percentage = this._percentage();
if ( this.oldValue !== value ) {
this.oldValue = value;
//this._trigger( "change" );
}
this.valueDiv
.toggle( value > this.min )
.toggleClass( "ui-corner-right", value === this.options.max )
.width( percentage.toFixed(0) + "%" );
this.element.attr( "aria-valuenow", value );
//$(this.element).find(".ui-progressbar-label").html(value + "%");
},
set: function(key, value){
this._setOption(key, value);
}
};
})( jQuery );
\ No newline at end of file
if (typeof(console) == "undefined") {
var console = {
info: function(){},
warn: function(){},
error: function(){},
log: function(){},
time: function(){},
timeEnd: function(){}
};
}
if(!Array.isArray) {
Array.isArray = function (vArg) {
return Object.prototype.toString.call(vArg) === "[object Array]";
};
}
if (!Object.isSVGElement) {
Object.isSVGElement = function(vArg) {
var str = Object.prototype.toString.call(vArg);
return (str.indexOf("[object SVG") == 0);
};
}
 window.onload = function () {
var paper = Raphael("holder");
//var curve = paper.ellipse(100, 100, 1, 1).attr({"stroke-width": 0, fill: Color.red});
var text = "Betty Botter bought some butter but, she said, the butter's bitter. If I put it in my batter, it will make my batter bitter. But a bit of better butter will make my batter better. So, she bought a bit of butter, better than her bitter butter, and she put it in her batter, and the batter was not bitter. It was better Betty Botter bought a bit better butter.";
var font = {font: "11px Arial", "font-style":"italic", opacity: 1, "fill": LABEL_COLOR, stroke: LABEL_COLOR, "stroke-width":.3};
var font = {font: "11px Arial", opacity: 1, "fill": LABEL_COLOR};
var boxWidth = 100
var AttributedStringIterator = function(text){
//this.text = this.rtrim(this.ltrim(text));
text = text.replace(/(\s)+/, " ");
this.text = this.rtrim(text);
/*
if (beginIndex < 0 || beginIndex > endIndex || endIndex > length()) {
throw new IllegalArgumentException("Invalid substring range");
}
*/
this.beginIndex = 0;
this.endIndex = this.text.length;
this.currentIndex = this.beginIndex;
//console.group("[AttributedStringIterator]");
var i = 0;
var string = this.text;
var fullPos = 0;
//console.log("string: \"" + string + "\", length: " + string.length);
this.startWordOffsets = [];
this.startWordOffsets.push(fullPos);
// TODO: remove i 1000
while (i<1000) {
var pos = string.search(/[ \t\n\f-\.\,]/);
if (pos == -1)
break;
// whitespace start
fullPos += pos;
string = string.substr(pos);
////console.log("fullPos: " + fullPos + ", pos: " + pos + ", string: ", string);
// remove whitespaces
var pos = string.search(/[^ \t\n\f-\.\,]/);
if (pos == -1)
break;
// whitespace end
fullPos += pos;
string = string.substr(pos);
////console.log("fullPos: " + fullPos);
this.startWordOffsets.push(fullPos);
i++;
}
//console.log("startWordOffsets: ", this.startWordOffsets);
//console.groupEnd();
};
AttributedStringIterator.prototype = {
getEndIndex: function(pos){
if (typeof(pos) == "undefined")
return this.endIndex;
var string = this.text.substr(pos, this.endIndex - pos);
var posEndOfLine = string.search(/[\n]/);
if (posEndOfLine == -1)
return this.endIndex;
else
return pos + posEndOfLine;
},
getBeginIndex: function(){
return this.beginIndex;
},
isWhitespace: function(pos){
var str = this.text[pos];
var whitespaceChars = " \t\n\f";
return (whitespaceChars.indexOf(str) != -1);
},
isNewLine: function(pos){
var str = this.text[pos];
var whitespaceChars = "\n";
return (whitespaceChars.indexOf(str) != -1);
},
preceding: function(pos){
//console.group("[AttributedStringIterator.preceding]");
for(var i in this.startWordOffsets) {
var startWordOffset = this.startWordOffsets[i];
if (pos < startWordOffset && i>0) {
//console.log("startWordOffset: " + this.startWordOffsets[i-1]);
//console.groupEnd();
return this.startWordOffsets[i-1];
}
}
//console.log("pos: " + pos);
//console.groupEnd();
return this.startWordOffsets[i];
},
following: function(pos){
//console.group("[AttributedStringIterator.following]");
for(var i in this.startWordOffsets) {
var startWordOffset = this.startWordOffsets[i];
if (pos < startWordOffset && i>0) {
//console.log("startWordOffset: " + this.startWordOffsets[i]);
//console.groupEnd();
return this.startWordOffsets[i];
}
}
//console.log("pos: " + pos);
//console.groupEnd();
return this.startWordOffsets[i];
},
ltrim: function(str){
var patt2=/^\s+/g;
return str.replace(patt2, "");
},
rtrim: function(str){
var patt2=/\s+$/g;
return str.replace(patt2, "");
},
getLayout: function(start, limit){
return this.text.substr(start, limit - start);
},
getCharAtPos: function(pos) {
return this.text[pos];
}
};
/*
var TextMeasurer = function(paper, text, fontAttrs){
this.text = text;
this.paper = paper;
this.fontAttrs = fontAttrs;
this.fStart = this.text.getBeginIndex();
};
TextMeasurer.prototype = {
getLineBreakIndex: function(start, maxAdvance){
var localStart = start - this.fStart;
},
getLayout: function(){
}
}
*/
var LineBreakMeasurer = function(paper, text, fontAttrs){
this.paper = paper;
this.text = new AttributedStringIterator(text);
this.fontAttrs = fontAttrs;
if (this.text.getEndIndex() - this.text.getBeginIndex() < 1) {
throw {message: "Text must contain at least one character.", code: "IllegalArgumentException"};
}
//this.measurer = new TextMeasurer(paper, this.text, this.fontAttrs);
this.limit = this.text.getEndIndex();
this.pos = this.start = this.text.getBeginIndex();
this.rafaelTextObject = this.paper.text(100, 100, this.text.text).attr(fontAttrs).attr("text-anchor", "start");
this.svgTextObject = this.rafaelTextObject[0];
};
LineBreakMeasurer.prototype = {
nextOffset: function(wrappingWidth, offsetLimit, requireNextWord) {
//console.group("[nextOffset]");
var nextOffset = this.pos;
if (this.pos < this.limit) {
if (offsetLimit <= this.pos) {
throw {message: "offsetLimit must be after current position", code: "IllegalArgumentException"};
}
var charAtMaxAdvance = this.getLineBreakIndex(this.pos, wrappingWidth);
//charAtMaxAdvance --;
//console.log("charAtMaxAdvance:", charAtMaxAdvance, ", [" + this.text.getCharAtPos(charAtMaxAdvance) + "]");
if (charAtMaxAdvance == this.limit) {
nextOffset = this.limit;
//console.log("charAtMaxAdvance == this.limit");
} else if (this.text.isNewLine(charAtMaxAdvance)) {
console.log("isNewLine");
nextOffset = charAtMaxAdvance+1;
} else if (this.text.isWhitespace(charAtMaxAdvance)) {
// TODO: find next noSpaceChar
//return nextOffset;
nextOffset = this.text.following(charAtMaxAdvance);
} else {
// Break is in a word; back up to previous break.
/*
var testPos = charAtMaxAdvance + 1;
if (testPos == this.limit) {
console.error("hbz...");
} else {
nextOffset = this.text.preceding(charAtMaxAdvance);
}
*/
nextOffset = this.text.preceding(charAtMaxAdvance);
if (nextOffset <= this.pos) {
nextOffset = Math.max(this.pos+1, charAtMaxAdvance);
}
}
}
if (nextOffset > offsetLimit) {
nextOffset = offsetLimit;
}
//console.log("nextOffset: " + nextOffset);
//console.groupEnd();
return nextOffset;
},
nextLayout: function(wrappingWidth) {
//console.groupCollapsed("[nextLayout]");
if (this.pos < this.limit) {
var requireNextWord = false;
var layoutLimit = this.nextOffset(wrappingWidth, this.limit, requireNextWord);
//console.log("layoutLimit:", layoutLimit);
if (layoutLimit == this.pos) {
//console.groupEnd();
return null;
}
var result = this.text.getLayout(this.pos, layoutLimit);
//console.log("layout: \"" + result + "\"");
// remove end of line
//var posEndOfLine = this.text.getEndIndex(this.pos);
//if (posEndOfLine < result.length)
// result = result.substr(0, posEndOfLine);
this.pos = layoutLimit;
//console.groupEnd();
return result;
} else {
//console.groupEnd();
return null;
}
},
getLineBreakIndex: function(pos, wrappingWidth) {
//console.group("[getLineBreakIndex]");
//console.log("pos:"+pos + ", text: \""+ this.text.text.replace(/\n/g, "_").substr(pos, 1) + "\"");
var bb = this.rafaelTextObject.getBBox();
var charNum = -1;
try {
var svgPoint = this.svgTextObject.getStartPositionOfChar(pos);
//var dot = this.paper.ellipse(svgPoint.x, svgPoint.y, 1, 1).attr({"stroke-width": 0, fill: Color.blue});
svgPoint.x = svgPoint.x + wrappingWidth;
//svgPoint.y = bb.y;
//console.log("svgPoint:", svgPoint);
//var dot = this.paper.ellipse(svgPoint.x, svgPoint.y, 1, 1).attr({"stroke-width": 0, fill: Color.red});
charNum = this.svgTextObject.getCharNumAtPosition(svgPoint);
} catch (e){
console.warn("getStartPositionOfChar error, pos:" + pos);
/*
var testPos = pos + 1;
if (testPos < this.limit) {
return testPos
}
*/
}
//console.log("charNum:", charNum);
if (charNum == -1) {
//console.groupEnd();
return this.text.getEndIndex(pos);
} else {
// When case there is new line between pos and charnum then use this new line
var newLineIndex = this.text.getEndIndex(pos);
if (newLineIndex < charNum ) {
console.log("newLineIndex <= charNum, newLineIndex:"+newLineIndex+", charNum:"+charNum, "\"" + this.text.text.substr(newLineIndex+1).replace(/\n/g, "") + "\"");
//console.groupEnd();
return newLineIndex;
}
//var charAtMaxAdvance = this.text.text.substring(charNum, charNum + 1);
var charAtMaxAdvance = this.text.getCharAtPos(charNum);
//console.log("!!charAtMaxAdvance: " + charAtMaxAdvance);
//console.groupEnd();
return charNum;
}
},
getPosition: function() {
return this.pos;
}
};
// ******
function drawMultilineText(text, x, y, boxWidth, boxHeight, options) {
var TEXT_PADDING = 3;
var width = boxWidth - (2 * TEXT_PADDING);
if (boxHeight)
var height = boxHeight - (2 * TEXT_PADDING);
var layouts = [];
var measurer = new LineBreakMeasurer(paper, text, font);
var lineHeight = measurer.rafaelTextObject.getBBox().height;
console.log("text: ", text.replace(/\n/g, ""));
if (height) {
var availableLinesCount = parseInt(height/lineHeight);
console.log("availableLinesCount: " + availableLinesCount);
}
var i = 1;
while (measurer.getPosition() < measurer.text.getEndIndex()) {
var layout = measurer.nextLayout(width);
//console.log("LAYOUT: " + layout + ", getPosition: " + measurer.getPosition());
if (layout != null) {
if (!availableLinesCount || i < availableLinesCount) {
layouts.push(layout);
} else {
layouts.push(fitTextToWidth(layout + "...", boxWidth));
break;
}
}
i++;
};
console.log(layouts);
measurer.rafaelTextObject.attr({"text": layouts.join("\n")});
//measurer.rafaelTextObject.attr({"text-anchor": "end"});
//measurer.rafaelTextObject.attr({"text-anchor": "middle"});
if (options)
measurer.rafaelTextObject.attr({"text-anchor": options["text-anchor"]});
var bb = measurer.rafaelTextObject.getBBox();
//measurer.rafaelTextObject.attr({"x": x + boxWidth/2});
if (options["vertical-align"] == "top")
measurer.rafaelTextObject.attr({"y": y + bb.height/2 + TEXT_PADDING});
else
measurer.rafaelTextObject.attr({"y": y + height/2});
//var bb = measurer.rafaelTextObject.getBBox();
if (measurer.rafaelTextObject.attr("text-anchor") == "middle" )
measurer.rafaelTextObject.attr("x", x + boxWidth/2 + TEXT_PADDING/2);
else if (measurer.rafaelTextObject.attr("text-anchor") == "end" )
measurer.rafaelTextObject.attr("x", x + boxWidth + TEXT_PADDING/2);
else
measurer.rafaelTextObject.attr("x", x + boxWidth/2 - bb.width/2 + TEXT_PADDING/2);
var boxStyle = {stroke: Color.LightSteelBlue2, "stroke-width": 1.0, "stroke-dasharray": "- "};
/*
var box = paper.rect(x+.0 + boxWidth/2 - bb.width/2+ TEXT_PADDING/2, y + .5 + boxHeight/2 - bb.height/2, width, height).attr(boxStyle);
box.attr("height", bb.height);
*/
//var box = paper.rect(bb.x - .5 + bb.width/2 + TEXT_PADDING, bb.y + bb.height/2, bb.width, bb.height).attr(boxStyle);
var textAreaCX = x + boxWidth/2;
var textAreaCY = y + height/2;
var dotLeftTop = paper.ellipse(x, y, 3, 3).attr({"stroke-width": 0, fill: Color.LightSteelBlue, stroke: "none"});
var dotCenter = paper.ellipse(textAreaCX, textAreaCY, 3, 3).attr({fill: Color.LightSteelBlue2, stroke: "none"});
/*
// real bbox
var bb = measurer.rafaelTextObject.getBBox();
var rect = paper.rect(bb.x+.5, bb.y + .5, bb.width, bb.height).attr({"stroke-width": 1});
*/
var boxStyle = {stroke: Color.LightSteelBlue2, "stroke-width": 1.0, "stroke-dasharray": "- "};
var rect = paper.rect(x+.5, y + .5, boxWidth, boxHeight).attr(boxStyle);
}
/*
for (var i=0; i<1; i++) {
var t = text;
//var t = "Высококвалифицирова";
var text = paper.text(300, 100, t).attr(font).attr("text-anchor", "start");
var bbText = text.getBBox();
paper.rect(300+.5, 100 + .5, bbText.width, bbText.height).attr({"stroke-width": 1});
console.log("t: ", t.replace(/\n/g, "↵"));
while (measurer.getPosition() < measurer.text.getEndIndex()) {
var layout = measurer.nextLayout(width);
//console.log("LAYOUT: " + layout + ", getPosition: " + measurer.getPosition());
if (layout != null)
layouts.push(layout);
};
measurer.rafaelTextObject.attr("text", layouts.join("\n"));
var bb = measurer.rafaelTextObject.getBBox();
var rect = paper.rect(bb.x+.5, bb.y + .5, bb.width, bb.height).attr({"stroke-width": 1});
lay.push(layouts);
console.log(layouts);
}
*/
var fitTextToWidth = function(original, width) {
var text = original;
// TODO: move attr on parameters
var attr = {font: "11px Arial", opacity: 0};
// remove length for "..."
var dots = paper.text(0, 0, "...").attr(attr).hide();
var dotsBB = dots.getBBox();
var maxWidth = width - dotsBB.width;
var textElement = paper.text(0, 0, text).attr(attr).hide();
var bb = textElement.getBBox();
// it's a little bit incorrect with "..."
while (bb.width > maxWidth && text.length > 0) {
text = text.substring(0, text.length - 1);
textElement.attr({"text": text});
bb = textElement.getBBox();
}
// remove element from paper
textElement.remove();
if (text != original) {
text = text + "...";
}
return text;
}
var x=100, y=90, height=20;
var options = {"text-anchor": "middle", "boxHeight": 150, "vertical-align": "top"};
var options = {"boxHeight": 150, "vertical-align": "top"};
drawMultilineText(text, x, y, 150, 100, options);
};
\ No newline at end of file
body { background: #fafafa; color: #708090; /* font: 300 100.1% "Helvetica Neue", Helvetica, "Arial Unicode MS", Arial, sans-serif; */ font-family: Verdana, sans-serif, Arial; font-size: 10px;}.wrapper{ height: 100%; position: relative; width: 100%;}/* #holder { height: 480px; width: 640px; b_ackground: #F8F8FF; -moz-border-radius: 10px; -webkit-border-radius: 10px; -webkit-box-shadow: 0 1px 3px #666; background: #DDD url(./images/bg.png); /* background: #DDD url(./images/checker-bg.png); * / b_order:0px solid #dedede; } */div.diagramHolder { float:left; }div.diagram{ border:1px solid #dedede; margin: 5px; padding: 5px; background: #FFF;}div.diagram.hidden{ display:none;}svg { background: #DDD url(./images/bg.png);} div.diagram-info { float:left; position: relative; padding: 5px;} /* Breadcrumbs */ #diagramBreadCrumbs { margin-left: 2px; margin-right: 2px; margin-top: 10px;}#diagramBreadCrumbs ul { list-style: none; background-color: white; border: 1px solid #DEDEDE; border-color: #C0C2C5; margin: 0; margin-bottom: 10px; margin-left: 0; -webkit-padding-start: 0px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;}#diagramBreadCrumbs li { /*text-decoration: underline;*/ display: inline-block; vertical-align: middle; padding-left: .75em; padding-right: 0; cursor: pointer;}#diagramBreadCrumbs li.selected { color: #9370DB; color: #4876FF; color: #4F94CD; font-weight: bold;}#diagramBreadCrumbs li span { background: url(images/breadcrumbs.png) no-repeat 100% 50%; display: block; padding: .5em 15px .5em 0;} /* Progress bar */ .ui-progressbar { height: 25px; /*height:2em; text-align: left; overflow: hidden; */ background: white; border: 1px solid #949DAD; margin: 2px; overflow: hidden; padding: 1px; position: relative; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;}.ui-progressbar .ui-progressbar-value { m_argin: -1px; height:100%; background: #D4E4FF; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;}.ui-widget-header a { color: #222222/*{fcHeader}*/; } .ui-progressbar .ui-progressbar-label{ position: absolute; margin-top: 7px; border:0px solid red; width: 100%; text-align: center;}
\ No newline at end of file
/*
* Activiti Modeler component part of the Activiti project
* Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
'use strict';
var ACTIVITI = ACTIVITI || {};
ACTIVITI.CONFIG = {
'contextRoot' : '/activiti-explorer/service',
};
/*
* Activiti Modeler component part of the Activiti project
* Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* Condition expression
*/
var KisBpmConditionExpressionCtrl = [ '$scope', '$modal', function($scope, $modal) {
// Config for the modal window
var opts = {
template: 'editor-app/configuration/properties/condition-expression-popup.html?version=' + Date.now(),
scope: $scope
};
// Open the dialog
$modal(opts);
}];
var KisBpmConditionExpressionPopupCtrl = [ '$scope', '$translate', '$http', function($scope, $translate, $http) {
// Put json representing condition on scope
if ($scope.property.value !== undefined && $scope.property.value !== null) {
$scope.conditionExpression = {value: $scope.property.value};
} else {
$scope.conditionExpression = {value: ''};
}
$scope.save = function() {
$scope.property.value = $scope.conditionExpression.value;
$scope.updatePropertyInModel($scope.property);
$scope.close();
};
// Close button handler
$scope.close = function() {
$scope.property.mode = 'read';
$scope.$hide();
};
}];
\ No newline at end of file
/*
* Activiti Modeler component part of the Activiti project
* Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
<span ng-if="property.value.assignment.assignee">{{'PROPERTY.ASSIGNMENT.ASSIGNEE_DISPLAY' | translate:property.value.assignment }} </span>
<span ng-if="property.value.assignment.candidateUsers.length > 0">{{'PROPERTY.ASSIGNMENT.CANDIDATE_USERS_DISPLAY' | translate:property.value.assignment.candidateUsers}} </span>
<span ng-if="property.value.assignment.candidateGroups.length > 0">{{'PROPERTY.ASSIGNMENT.CANDIDATE_GROUPS_DISPLAY' | translate:property.value.assignment.candidateGroups}} </span>
<span ng-if="!property.value.assignment.assignee && (!property.value.assignment.candidateUsers || property.value.assignment.candidateUsers.length == 0) && (!property.value.assignment.candidateGroups || property.value.assignment.candidateGroups.length == 0)" translate>PROPERTY.ASSIGNMENT.EMPTY</span>
\ No newline at end of file
<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog -->
<span ng-controller="KisBpmAssignmentCtrl">
</span>
\ No newline at end of file
<div ng-controller="KisBpmBooleanPropertyCtrl">
<input type="checkbox" ng-model="property.value" ng-change="changeValue()"/>
</div>
\ No newline at end of file
<span ng-if="property.value">{{property.value|limitTo:20}}</span>
<span ng-if="!property.value">{{'PROPERTY.SEQUENCEFLOW.CONDITION.NO-CONDITION-DISPLAY' | translate}}</span>
\ No newline at end of file
<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog -->
<span ng-controller="KisBpmConditionExpressionCtrl">
</span>
\ No newline at end of file
<span ng-if="!property.noValue">{{property.value|limitTo:20}}</span>
<span ng-if="!property.noValue && property.value != null && property.value.length > 20">...</span>
<span ng-if="property.noValue" translate>PROPERTY.EMPTY</span>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册