Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
开发团队
Flowable Engine
提交
abbb944e
F
Flowable Engine
项目概览
开发团队
/
Flowable Engine
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Flowable Engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
abbb944e
编写于
11月 22, 2012
作者:
J
Joram Barrez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ACT-1458: added activation of process definitions to Explorer
上级
06e88beb
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
497 addition
and
75 deletion
+497
-75
modules/activiti-engine/src/main/java/org/activiti/engine/runtime/Job.java
...engine/src/main/java/org/activiti/engine/runtime/Job.java
+5
-0
modules/activiti-explorer/src/main/java/org/activiti/explorer/Constants.java
...plorer/src/main/java/org/activiti/explorer/Constants.java
+5
-0
modules/activiti-explorer/src/main/java/org/activiti/explorer/DefaultViewManager.java
...c/main/java/org/activiti/explorer/DefaultViewManager.java
+4
-3
modules/activiti-explorer/src/main/java/org/activiti/explorer/ExplorerApp.java
...orer/src/main/java/org/activiti/explorer/ExplorerApp.java
+9
-0
modules/activiti-explorer/src/main/java/org/activiti/explorer/Messages.java
...xplorer/src/main/java/org/activiti/explorer/Messages.java
+8
-0
modules/activiti-explorer/src/main/java/org/activiti/explorer/ViewManager.java
...orer/src/main/java/org/activiti/explorer/ViewManager.java
+1
-1
modules/activiti-explorer/src/main/java/org/activiti/explorer/navigation/SuspendedProcessDefinitionNavigator.java
...lorer/navigation/SuspendedProcessDefinitionNavigator.java
+40
-0
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/mainlayout/ExplorerLayout.java
...a/org/activiti/explorer/ui/mainlayout/ExplorerLayout.java
+4
-1
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/management/job/JobDetailPanel.java
...g/activiti/explorer/ui/management/job/JobDetailPanel.java
+41
-14
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/management/processdefinition/ActiveProcessDefinitionDetailPanel.java
...processdefinition/ActiveProcessDefinitionDetailPanel.java
+3
-1
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/management/processdefinition/ActiveProcessDefinitionListQuery.java
...t/processdefinition/ActiveProcessDefinitionListQuery.java
+2
-39
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/management/processdefinition/ChangeProcessSuspensionStatePopupWindow.java
...ssdefinition/ChangeProcessSuspensionStatePopupWindow.java
+29
-16
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/management/processdefinition/ProcessDefinitionListItem.java
...nagement/processdefinition/ProcessDefinitionListItem.java
+56
-0
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/management/processdefinition/SuspendedProcessDefinitionDetailPanel.java
...cessdefinition/SuspendedProcessDefinitionDetailPanel.java
+56
-0
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/management/processdefinition/SuspendedProcessDefinitionListQuery.java
...rocessdefinition/SuspendedProcessDefinitionListQuery.java
+66
-0
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/management/processdefinition/SuspendedProcessDefinitionPage.java
...ent/processdefinition/SuspendedProcessDefinitionPage.java
+97
-0
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/process/AbstractProcessDefinitionDetailPanel.java
...orer/ui/process/AbstractProcessDefinitionDetailPanel.java
+3
-0
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/process/ProcessDefinitionInfoComponent.java
...i/explorer/ui/process/ProcessDefinitionInfoComponent.java
+52
-0
modules/activiti-explorer/src/main/resources/messages.properties
.../activiti-explorer/src/main/resources/messages.properties
+8
-0
modules/activiti-webapp-explorer2/src/main/webapp/VAADIN/themes/activiti/styles.css
...plorer2/src/main/webapp/VAADIN/themes/activiti/styles.css
+8
-0
未找到文件。
modules/activiti-engine/src/main/java/org/activiti/engine/runtime/Job.java
浏览文件 @
abbb944e
...
...
@@ -45,6 +45,11 @@ public interface Job {
*/
String
getExecutionId
();
/**
* Returns the specific process definition on which the job was created
*/
String
getProcessDefinitionId
();
/**
* Returns the number of retries this job has left.
* Whenever the jobexecutor fails to execute the job, this value is decremented.
...
...
modules/activiti-explorer/src/main/java/org/activiti/explorer/Constants.java
浏览文件 @
abbb944e
...
...
@@ -12,6 +12,8 @@
*/
package
org.activiti.explorer
;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.Collections
;
...
...
@@ -36,6 +38,9 @@ public class Constants {
public
static
final
String
DEFAULT_DATE_FORMAT
=
"dd-MM-yyyy"
;
public
static
final
String
DEFAULT_TIME_FORMAT
=
"dd-MM-yyyy hh:mm:ss"
;
public
static
final
DateFormat
DEFAULT_DATE_FORMATTER
=
new
SimpleDateFormat
(
DEFAULT_DATE_FORMAT
);
public
static
final
DateFormat
DEFAULT_TIME_FORMATTER
=
new
SimpleDateFormat
(
DEFAULT_TIME_FORMAT
);
// Default diagram image extension, when name cannot be deducted from resource name
public
static
final
String
DEFAULT_DIAGRAM_IMAGE_EXTENSION
=
"png"
;
...
...
modules/activiti-explorer/src/main/java/org/activiti/explorer/DefaultViewManager.java
浏览文件 @
abbb944e
...
...
@@ -35,6 +35,7 @@ import org.activiti.explorer.ui.management.identity.GroupPage;
import
org.activiti.explorer.ui.management.identity.UserPage
;
import
org.activiti.explorer.ui.management.job.JobPage
;
import
org.activiti.explorer.ui.management.processdefinition.ActiveProcessDefinitionPage
;
import
org.activiti.explorer.ui.management.processdefinition.SuspendedProcessDefinitionPage
;
import
org.activiti.explorer.ui.process.MyProcessInstancesPage
;
import
org.activiti.explorer.ui.process.ProcessDefinitionPage
;
import
org.activiti.explorer.ui.process.ProcessMenuBar
;
...
...
@@ -246,11 +247,11 @@ public class DefaultViewManager implements ViewManager {
}
public
void
showSuspendedProcessDefinitionsPage
()
{
// TODO
switchView
(
new
SuspendedProcessDefinitionPage
(),
ViewManager
.
MAIN_NAVIGATION_MANAGE
,
ManagementMenuBar
.
ENTRY_SUSPENDED_PROCESS_DEFINITIONS
);
}
public
void
showSuspendedProcessDefinitionsPage
(
String
processDefinition
s
Id
)
{
// TODO
public
void
showSuspendedProcessDefinitionsPage
(
String
processDefinitionId
)
{
switchView
(
new
SuspendedProcessDefinitionPage
(
processDefinitionId
),
ViewManager
.
MAIN_NAVIGATION_MANAGE
,
ManagementMenuBar
.
ENTRY_SUSPENDED_PROCESS_DEFINITIONS
);
}
public
void
showJobPage
()
{
...
...
modules/activiti-explorer/src/main/java/org/activiti/explorer/ExplorerApp.java
浏览文件 @
abbb944e
...
...
@@ -216,6 +216,15 @@ public class ExplorerApp extends Application implements HttpServletRequestListen
}
}
// Error handling ---------------------------------------------------------------------------------
@Override
public
void
terminalError
(
com
.
vaadin
.
terminal
.
Terminal
.
ErrorEvent
event
)
{
super
.
terminalError
(
event
);
notificationManager
.
showErrorNotification
(
Messages
.
UNCAUGHT_EXCEPTION
,
event
.
getThrowable
().
getCause
().
getMessage
());
}
// URL Handling ---------------------------------------------------------------------------------
public
void
setCurrentUriFragment
(
UriFragment
fragment
)
{
...
...
modules/activiti-explorer/src/main/java/org/activiti/explorer/Messages.java
浏览文件 @
abbb944e
...
...
@@ -28,6 +28,7 @@ public interface Messages {
static
final
String
BUTTON_OK
=
"button.ok"
;
static
final
String
BUTTON_CREATE
=
"button.create"
;
static
final
String
BUTTON_CANCEL
=
"button.cancel"
;
static
final
String
UNCAUGHT_EXCEPTION
=
"uncaught.exception"
;
// Navigation
static
final
String
NAVIGATION_ERROR_NOT_INVOLVED_TITLE
=
"navigation.error.not.involved.title"
;
...
...
@@ -193,6 +194,9 @@ public interface Messages {
static
final
String
PROCESS_DEPLOY_TIME
=
"process.deploy.time"
;
static
final
String
PROCESS_HEADER_DIAGRAM
=
"process.header.diagram"
;
static
final
String
PROCESS_NO_DIAGRAM
=
"process.no.diagram"
;
static
final
String
PROCESS_HEADER_SUSPENSION_STATE
=
"process.header.suspension.state"
;
static
final
String
PROCESS_SCHEDULED_SUSPEND
=
"process.scheduled.suspend"
;
static
final
String
PROCESS_SCHEDULED_ACTIVATE
=
"process.scheduled.activate"
;
static
final
String
PROCESS_START
=
"process.start"
;
static
final
String
PROCESS_EDIT
=
"process.edit"
;
static
final
String
PROCESS_COPY
=
"process.copy"
;
...
...
@@ -201,6 +205,8 @@ public interface Messages {
static
final
String
PROCESS_DEPLOY
=
"process.deploy"
;
static
final
String
PROCESS_ACTIVATE
=
"process.activate"
;
static
final
String
PROCESS_ACTIVATE_POPUP
=
"process.activate.popup"
;
static
final
String
PROCESS_ACTIVATE_POPUP_TIME_DESCRIPTION
=
"process.activate.popup.time.description"
;
static
final
String
PROCESS_ACTIVATE_POPUP_INCLUDE_PROCESS_INSTANCES_DESCRIPTION
=
"process.activate.popup.process.instances.description"
;
static
final
String
PROCESS_SUSPEND
=
"process.suspend"
;
static
final
String
PROCESS_SUSPEND_POPUP
=
"process.suspend.popup"
;
static
final
String
PROCESS_SUSPEND_POPUP_TIME_DESCRIPTION
=
"process.suspend.popup.time.description"
;
...
...
@@ -264,6 +270,8 @@ public interface Messages {
static
final
String
JOB_NO_DUEDATE
=
"job.no.dudedate"
;
static
final
String
JOB_ERROR
=
"job.error"
;
static
final
String
JOB_NOT_EXECUTED
=
"job.not.executed"
;
static
final
String
JOB_SUSPEND_PROCESSDEFINITION
=
"job.suspend.processdefinition"
;
static
final
String
JOB_ACTIVATE_PROCESSDEFINITION
=
"job.activate.processdefinition"
;
// Deployment page
static
final
String
DEPLOYMENT_DELETE
=
"deployment.delete"
;
...
...
modules/activiti-explorer/src/main/java/org/activiti/explorer/ViewManager.java
浏览文件 @
abbb944e
...
...
@@ -95,7 +95,7 @@ public interface ViewManager {
void
showSuspendedProcessDefinitionsPage
();
void
showSuspendedProcessDefinitionsPage
(
String
processDefinition
s
Id
);
void
showSuspendedProcessDefinitionsPage
(
String
processDefinitionId
);
void
showJobPage
();
...
...
modules/activiti-explorer/src/main/java/org/activiti/explorer/navigation/SuspendedProcessDefinitionNavigator.java
0 → 100644
浏览文件 @
abbb944e
/* 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
org.activiti.explorer.navigation
;
import
org.activiti.explorer.ExplorerApp
;
/**
* @author Joram Barrez
*/
public
class
SuspendedProcessDefinitionNavigator
extends
ManagementNavigator
{
public
static
final
String
SUSPENDED_PROC_DEF_URI_PART
=
"suspendedProcessDefinition"
;
public
String
getTrigger
()
{
return
SUSPENDED_PROC_DEF_URI_PART
;
}
public
void
handleManagementNavigation
(
UriFragment
uriFragment
)
{
String
processDefinitionId
=
uriFragment
.
getUriPart
(
1
);
if
(
processDefinitionId
!=
null
)
{
ExplorerApp
.
get
().
getViewManager
().
showActiveProcessDefinitionsPage
(
processDefinitionId
);
}
else
{
ExplorerApp
.
get
().
getViewManager
().
showActiveProcessDefinitionsPage
();
}
}
}
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/mainlayout/ExplorerLayout.java
浏览文件 @
abbb944e
...
...
@@ -72,7 +72,6 @@ public interface ExplorerLayout {
static
final
String
STYLE_ADD
=
"add"
;
static
final
String
STYLE_NO_LINE
=
"no-line"
;
static
final
String
STYLE_APPLICATION_LOGO
=
"logo"
;
static
final
String
STYLE_WORKFLOW_CONSOLE_LOGO
=
"workflow-console-logo"
;
static
final
String
STYLE_MAIN_MENU_BUTTON
=
"main-menu-button"
;
...
...
@@ -129,6 +128,10 @@ public interface ExplorerLayout {
static
final
String
STYLE_JOB_EXCEPTION_MESSAGE
=
"job-exception-message"
;
static
final
String
STYLE_JOB_EXCEPTION_TRACE
=
"job-exception-trace"
;
static
final
String
STYLE_JOB_HEADER_DUE_DATE
=
"job-duedate"
;
// Process definitions page
static
final
String
STYLE_PROCESS_DEFINITION_SUSPEND_CHOICE
=
"process-definition-suspend-choice"
;
// Related content
static
final
String
STYLE_RELATED_CONTENT_LIST
=
"related-content-list"
;
...
...
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/management/job/JobDetailPanel.java
浏览文件 @
abbb944e
...
...
@@ -15,6 +15,9 @@ package org.activiti.explorer.ui.management.job;
import
org.activiti.engine.ActivitiException
;
import
org.activiti.engine.ManagementService
;
import
org.activiti.engine.ProcessEngines
;
import
org.activiti.engine.impl.jobexecutor.TimerActivateProcessDefinitionHandler
;
import
org.activiti.engine.impl.jobexecutor.TimerSuspendProcessDefinitionHandler
;
import
org.activiti.engine.impl.persistence.entity.JobEntity
;
import
org.activiti.engine.impl.persistence.entity.MessageEntity
;
import
org.activiti.engine.impl.persistence.entity.TimerEntity
;
import
org.activiti.engine.runtime.Job
;
...
...
@@ -94,31 +97,31 @@ public class JobDetailPanel extends DetailPanel {
}
protected
void
addHeader
()
{
GridLayout
task
Details
=
new
GridLayout
(
3
,
2
);
task
Details
.
setWidth
(
100
,
UNITS_PERCENTAGE
);
task
Details
.
addStyleName
(
ExplorerLayout
.
STYLE_TITLE_BLOCK
);
task
Details
.
setSpacing
(
true
);
task
Details
.
setMargin
(
false
,
false
,
true
,
false
);
GridLayout
job
Details
=
new
GridLayout
(
3
,
2
);
job
Details
.
setWidth
(
100
,
UNITS_PERCENTAGE
);
job
Details
.
addStyleName
(
ExplorerLayout
.
STYLE_TITLE_BLOCK
);
job
Details
.
setSpacing
(
true
);
job
Details
.
setMargin
(
false
,
false
,
true
,
false
);
// Add image
Embedded
image
=
new
Embedded
(
null
,
Images
.
JOB_50
);
task
Details
.
addComponent
(
image
,
0
,
0
,
0
,
1
);
job
Details
.
addComponent
(
image
,
0
,
0
,
0
,
1
);
// Add job name
Label
nameLabel
=
new
Label
(
getJobLabel
(
job
));
nameLabel
.
addStyleName
(
Reindeer
.
LABEL_H2
);
task
Details
.
addComponent
(
nameLabel
,
1
,
0
,
2
,
0
);
job
Details
.
addComponent
(
nameLabel
,
1
,
0
,
2
,
0
);
// Add due date
PrettyTimeLabel
dueDateLabel
=
new
PrettyTimeLabel
(
i18nManager
.
getMessage
(
Messages
.
JOB_DUEDATE
),
job
.
getDuedate
(),
i18nManager
.
getMessage
(
Messages
.
JOB_NO_DUEDATE
),
false
);
dueDateLabel
.
addStyleName
(
ExplorerLayout
.
STYLE_JOB_HEADER_DUE_DATE
);
task
Details
.
addComponent
(
dueDateLabel
,
1
,
1
);
job
Details
.
addComponent
(
dueDateLabel
,
1
,
1
);
task
Details
.
setColumnExpandRatio
(
1
,
1.0f
);
task
Details
.
setColumnExpandRatio
(
2
,
1.0f
);
job
Details
.
setColumnExpandRatio
(
1
,
1.0f
);
job
Details
.
setColumnExpandRatio
(
2
,
1.0f
);
addDetailComponent
(
task
Details
);
addDetailComponent
(
job
Details
);
}
protected
String
getJobLabel
(
Job
theJob
)
{
...
...
@@ -177,11 +180,35 @@ public class JobDetailPanel extends DetailPanel {
layout
.
addComponent
(
stackPanel
);
layout
.
setExpandRatio
(
stackPanel
,
1.0f
);
}
else
{
Label
noException
=
new
Label
(
i18nManager
.
getMessage
(
Messages
.
JOB_NOT_EXECUTED
));
layout
.
addComponent
(
noException
);
layout
.
setExpandRatio
(
noException
,
1.0f
);
if
(
job
.
getProcessDefinitionId
()
!=
null
)
{
// This is a hack .. need to cleanify this in the engine
JobEntity
jobEntity
=
(
JobEntity
)
job
;
if
(
jobEntity
.
getJobHandlerType
().
equals
(
TimerSuspendProcessDefinitionHandler
.
TYPE
))
{
Label
processDefinitionLabel
=
new
Label
(
i18nManager
.
getMessage
(
Messages
.
JOB_SUSPEND_PROCESSDEFINITION
,
job
.
getProcessDefinitionId
()));
layout
.
addComponent
(
processDefinitionLabel
);
}
else
if
(
jobEntity
.
getJobHandlerType
().
equals
(
TimerActivateProcessDefinitionHandler
.
TYPE
))
{
Label
processDefinitionLabel
=
new
Label
(
i18nManager
.
getMessage
(
Messages
.
JOB_ACTIVATE_PROCESSDEFINITION
,
job
.
getProcessDefinitionId
()));
layout
.
addComponent
(
processDefinitionLabel
);
}
else
{
addNotYetExecutedLabel
(
layout
);
}
}
else
{
addNotYetExecutedLabel
(
layout
);
}
}
}
private
void
addNotYetExecutedLabel
(
VerticalLayout
layout
)
{
Label
noException
=
new
Label
(
i18nManager
.
getMessage
(
Messages
.
JOB_NOT_EXECUTED
));
layout
.
addComponent
(
noException
);
layout
.
setExpandRatio
(
noException
,
1.0f
);
}
protected
String
getRetriesLabel
(
Job
theJob
)
{
String
retriesString
;
...
...
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/management/processdefinition/ActiveProcessDefinitionDetailPanel.java
浏览文件 @
abbb944e
...
...
@@ -39,9 +39,11 @@ public class ActiveProcessDefinitionDetailPanel extends AbstractProcessDefinitio
Button
suspendButton
=
new
Button
(
i18nManager
.
getMessage
(
Messages
.
PROCESS_SUSPEND
));
suspendButton
.
addListener
(
new
ClickListener
()
{
private
static
final
long
serialVersionUID
=
1L
;
public
void
buttonClick
(
ClickEvent
event
)
{
ChangeProcessSuspensionStatePopupWindow
popupWindow
=
new
ChangeProcessSuspensionStatePopupWindow
(
processDefinition
.
getId
(),
parentPage
);
new
ChangeProcessSuspensionStatePopupWindow
(
processDefinition
.
getId
(),
parentPage
,
true
);
ExplorerApp
.
get
().
getViewManager
().
showPopupWindow
(
popupWindow
);
}
...
...
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/management/processdefinition/ActiveProcessDefinitionListQuery.java
浏览文件 @
abbb944e
...
...
@@ -22,8 +22,6 @@ import org.activiti.engine.repository.ProcessDefinition;
import
org.activiti.explorer.data.AbstractLazyLoadingQuery
;
import
com.vaadin.data.Item
;
import
com.vaadin.data.util.ObjectProperty
;
import
com.vaadin.data.util.PropertysetItem
;
/**
...
...
@@ -50,14 +48,14 @@ public class ActiveProcessDefinitionListQuery extends AbstractLazyLoadingQuery {
List
<
Item
>
processDefinitionItems
=
new
ArrayList
<
Item
>();
for
(
ProcessDefinition
processDefinition
:
processDefinitions
)
{
processDefinitionItems
.
add
(
new
Active
ProcessDefinitionListItem
(
processDefinition
));
processDefinitionItems
.
add
(
new
ProcessDefinitionListItem
(
processDefinition
));
}
return
processDefinitionItems
;
}
public
Item
loadSingleResult
(
String
id
)
{
return
new
Active
ProcessDefinitionListItem
(
repositoryService
.
createProcessDefinitionQuery
()
return
new
ProcessDefinitionListItem
(
repositoryService
.
createProcessDefinitionQuery
()
.
processDefinitionId
(
id
).
singleResult
());
}
...
...
@@ -65,39 +63,4 @@ public class ActiveProcessDefinitionListQuery extends AbstractLazyLoadingQuery {
throw
new
UnsupportedOperationException
();
}
class
ActiveProcessDefinitionListItem
extends
PropertysetItem
implements
Comparable
<
ActiveProcessDefinitionListItem
>
{
private
static
final
long
serialVersionUID
=
1L
;
public
ActiveProcessDefinitionListItem
(
ProcessDefinition
processDefinition
)
{
addItemProperty
(
"id"
,
new
ObjectProperty
<
String
>(
processDefinition
.
getId
(),
String
.
class
));
addItemProperty
(
"key"
,
new
ObjectProperty
<
String
>(
processDefinition
.
getKey
(),
String
.
class
));
addItemProperty
(
"name"
,
new
ObjectProperty
<
String
>(
processDefinition
.
getName
()
,
String
.
class
));
addItemProperty
(
"version"
,
new
ObjectProperty
<
Integer
>(
processDefinition
.
getVersion
()
,
Integer
.
class
));
}
public
int
compareTo
(
ActiveProcessDefinitionListItem
other
)
{
String
name
=
(
String
)
getItemProperty
(
"name"
).
getValue
();
String
otherName
=
(
String
)
other
.
getItemProperty
(
"name"
).
getValue
();
int
comparison
=
name
.
compareTo
(
otherName
);
if
(
comparison
!=
0
)
{
return
comparison
;
}
else
{
String
key
=
(
String
)
getItemProperty
(
"key"
).
getValue
();
String
otherKey
=
(
String
)
other
.
getItemProperty
(
"key"
).
getValue
();
comparison
=
key
.
compareTo
(
otherKey
);
if
(
comparison
!=
0
)
{
return
comparison
;
}
else
{
Integer
version
=
(
Integer
)
getItemProperty
(
"version"
).
getValue
();
Integer
otherVersion
=
(
Integer
)
other
.
getItemProperty
(
"version"
).
getValue
();
return
version
.
compareTo
(
otherVersion
);
}
}
}
}
}
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/management/processdefinition/ChangeProcessSuspensionStatePopupWindow.java
浏览文件 @
abbb944e
...
...
@@ -21,6 +21,7 @@ import org.activiti.explorer.I18nManager;
import
org.activiti.explorer.Messages
;
import
org.activiti.explorer.ui.AbstractPage
;
import
org.activiti.explorer.ui.custom.PopupWindow
;
import
org.activiti.explorer.ui.mainlayout.ExplorerLayout
;
import
com.vaadin.data.Property.ValueChangeEvent
;
import
com.vaadin.data.Property.ValueChangeListener
;
...
...
@@ -52,12 +53,13 @@ public class ChangeProcessSuspensionStatePopupWindow extends PopupWindow {
protected
DateField
dateField
;
protected
CheckBox
includeProcessInstancesCheckBox
;
public
ChangeProcessSuspensionStatePopupWindow
(
String
processDefinitionId
,
AbstractPage
parentPage
)
{
public
ChangeProcessSuspensionStatePopupWindow
(
String
processDefinitionId
,
AbstractPage
parentPage
,
boolean
suspend
)
{
this
.
processDefinitionId
=
processDefinitionId
;
this
.
parentPage
=
parentPage
;
this
.
i18nManager
=
ExplorerApp
.
get
().
getI18nManager
();
setCaption
(
i18nManager
.
getMessage
(
Messages
.
PROCESS_SUSPEND_POPUP
));
setCaption
(
suspend
?
i18nManager
.
getMessage
(
Messages
.
PROCESS_SUSPEND_POPUP
)
:
i18nManager
.
getMessage
(
Messages
.
PROCESS_ACTIVATE_POPUP
));
setModal
(
true
);
center
();
setResizable
(
false
);
...
...
@@ -67,17 +69,19 @@ public class ChangeProcessSuspensionStatePopupWindow extends PopupWindow {
verticalLayout
=
new
VerticalLayout
();
addComponent
(
verticalLayout
);
addTimeSection
();
addIncludeProcessInstancesSection
();
addOkButton
();
addTimeSection
(
suspend
);
addIncludeProcessInstancesSection
(
suspend
);
addOkButton
(
suspend
);
}
protected
void
addTimeSection
()
{
Label
timeLabel
=
new
Label
(
i18nManager
.
getMessage
(
Messages
.
PROCESS_SUSPEND_POPUP_TIME_DESCRIPTION
));
protected
void
addTimeSection
(
boolean
suspend
)
{
Label
timeLabel
=
new
Label
(
suspend
?
i18nManager
.
getMessage
(
Messages
.
PROCESS_SUSPEND_POPUP_TIME_DESCRIPTION
)
:
i18nManager
.
getMessage
(
Messages
.
PROCESS_ACTIVATE_POPUP_TIME_DESCRIPTION
));
verticalLayout
.
addComponent
(
timeLabel
);
verticalLayout
.
addComponent
(
new
Label
(
" "
,
Label
.
CONTENT_XHTML
));
nowCheckBox
=
new
CheckBox
(
i18nManager
.
getMessage
(
Messages
.
PROCESS_SUSPEND_POPUP_TIME_NOW
),
true
);
nowCheckBox
.
addStyleName
(
ExplorerLayout
.
STYLE_PROCESS_DEFINITION_SUSPEND_CHOICE
);
nowCheckBox
.
setImmediate
(
true
);
nowCheckBox
.
addListener
(
new
ClickListener
()
{
public
void
buttonClick
(
ClickEvent
event
)
{
...
...
@@ -96,6 +100,7 @@ public class ChangeProcessSuspensionStatePopupWindow extends PopupWindow {
verticalLayout
.
addComponent
(
dateLayout
);
dateCheckBox
=
new
CheckBox
(
i18nManager
.
getMessage
(
Messages
.
PROCESS_SUSPEND_POPUP_TIME_DATE
));
dateCheckBox
.
addStyleName
(
ExplorerLayout
.
STYLE_PROCESS_DEFINITION_SUSPEND_CHOICE
);
dateCheckBox
.
setImmediate
(
true
);
dateCheckBox
.
addListener
(
new
ClickListener
()
{
public
void
buttonClick
(
ClickEvent
event
)
{
...
...
@@ -125,20 +130,21 @@ public class ChangeProcessSuspensionStatePopupWindow extends PopupWindow {
dateLayout
.
addComponent
(
dateField
);
}
protected
void
addIncludeProcessInstancesSection
()
{
protected
void
addIncludeProcessInstancesSection
(
boolean
suspend
)
{
verticalLayout
.
addComponent
(
new
Label
(
" "
,
Label
.
CONTENT_XHTML
));
verticalLayout
.
addComponent
(
new
Label
(
" "
,
Label
.
CONTENT_XHTML
));
includeProcessInstancesCheckBox
=
new
CheckBox
(
i18nManager
.
getMessage
(
Messages
.
PROCESS_SUSPEND_POPUP_INCLUDE_PROCESS_INSTANCES_DESCRIPTION
));
includeProcessInstancesCheckBox
=
new
CheckBox
(
suspend
?
i18nManager
.
getMessage
(
Messages
.
PROCESS_SUSPEND_POPUP_INCLUDE_PROCESS_INSTANCES_DESCRIPTION
)
:
i18nManager
.
getMessage
(
Messages
.
PROCESS_ACTIVATE_POPUP_INCLUDE_PROCESS_INSTANCES_DESCRIPTION
));
verticalLayout
.
addComponent
(
includeProcessInstancesCheckBox
);
}
protected
void
addOkButton
()
{
protected
void
addOkButton
(
final
boolean
suspend
)
{
verticalLayout
.
addComponent
(
new
Label
(
" "
,
Label
.
CONTENT_XHTML
));
verticalLayout
.
addComponent
(
new
Label
(
" "
,
Label
.
CONTENT_XHTML
));
Button
okButton
=
new
Button
(
i18nManager
.
getMessage
(
Messages
.
BUTTON_OK
));
okButton
.
setWidth
(
"110px"
);
okButton
.
setHeight
(
"80px"
);
verticalLayout
.
addComponent
(
okButton
);
verticalLayout
.
setComponentAlignment
(
okButton
,
Alignment
.
BOTTOM_CENTER
);
...
...
@@ -148,8 +154,15 @@ public class ChangeProcessSuspensionStatePopupWindow extends PopupWindow {
public
void
buttonClick
(
ClickEvent
event
)
{
RepositoryService
repositoryService
=
ProcessEngines
.
getDefaultProcessEngine
().
getRepositoryService
();
repositoryService
.
suspendProcessDefinitionById
(
processDefinitionId
,
(
Boolean
)
includeProcessInstancesCheckBox
.
getValue
(),
(
Date
)
dateField
.
getValue
());
boolean
includeProcessInstances
=
(
Boolean
)
includeProcessInstancesCheckBox
.
getValue
();
if
(
suspend
)
{
repositoryService
.
suspendProcessDefinitionById
(
processDefinitionId
,
includeProcessInstances
,
(
Date
)
dateField
.
getValue
());
}
else
{
repositoryService
.
activateProcessDefinitionById
(
processDefinitionId
,
includeProcessInstances
,
(
Date
)
dateField
.
getValue
());
}
close
();
parentPage
.
refreshSelectNext
();
// select next item in list on the left
...
...
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/management/processdefinition/ProcessDefinitionListItem.java
0 → 100644
浏览文件 @
abbb944e
/* 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
org.activiti.explorer.ui.management.processdefinition
;
import
org.activiti.engine.repository.ProcessDefinition
;
import
com.vaadin.data.util.ObjectProperty
;
import
com.vaadin.data.util.PropertysetItem
;
/**
* @author Joram Barrez
*/
public
class
ProcessDefinitionListItem
extends
PropertysetItem
implements
Comparable
<
ProcessDefinitionListItem
>
{
private
static
final
long
serialVersionUID
=
1L
;
public
ProcessDefinitionListItem
(
ProcessDefinition
processDefinition
)
{
addItemProperty
(
"id"
,
new
ObjectProperty
<
String
>(
processDefinition
.
getId
(),
String
.
class
));
addItemProperty
(
"key"
,
new
ObjectProperty
<
String
>(
processDefinition
.
getKey
(),
String
.
class
));
addItemProperty
(
"name"
,
new
ObjectProperty
<
String
>(
processDefinition
.
getName
()
,
String
.
class
));
addItemProperty
(
"version"
,
new
ObjectProperty
<
Integer
>(
processDefinition
.
getVersion
()
,
Integer
.
class
));
}
public
int
compareTo
(
ProcessDefinitionListItem
other
)
{
String
name
=
(
String
)
getItemProperty
(
"name"
).
getValue
();
String
otherName
=
(
String
)
other
.
getItemProperty
(
"name"
).
getValue
();
int
comparison
=
name
.
compareTo
(
otherName
);
if
(
comparison
!=
0
)
{
return
comparison
;
}
else
{
String
key
=
(
String
)
getItemProperty
(
"key"
).
getValue
();
String
otherKey
=
(
String
)
other
.
getItemProperty
(
"key"
).
getValue
();
comparison
=
key
.
compareTo
(
otherKey
);
if
(
comparison
!=
0
)
{
return
comparison
;
}
else
{
Integer
version
=
(
Integer
)
getItemProperty
(
"version"
).
getValue
();
Integer
otherVersion
=
(
Integer
)
other
.
getItemProperty
(
"version"
).
getValue
();
return
version
.
compareTo
(
otherVersion
);
}
}
}
}
\ No newline at end of file
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/management/processdefinition/SuspendedProcessDefinitionDetailPanel.java
0 → 100644
浏览文件 @
abbb944e
/* 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
org.activiti.explorer.ui.management.processdefinition
;
import
org.activiti.explorer.ExplorerApp
;
import
org.activiti.explorer.Messages
;
import
org.activiti.explorer.ui.AbstractPage
;
import
org.activiti.explorer.ui.process.AbstractProcessDefinitionDetailPanel
;
import
com.vaadin.ui.Button
;
import
com.vaadin.ui.Button.ClickEvent
;
import
com.vaadin.ui.Button.ClickListener
;
/**
* @author Joram Barrez
*/
public
class
SuspendedProcessDefinitionDetailPanel
extends
AbstractProcessDefinitionDetailPanel
{
private
static
final
long
serialVersionUID
=
1L
;
public
SuspendedProcessDefinitionDetailPanel
(
String
processDefinitionId
,
SuspendedProcessDefinitionPage
suspendedProcessDefinitionPage
)
{
super
(
processDefinitionId
,
suspendedProcessDefinitionPage
);
}
protected
void
initActions
(
final
AbstractPage
parentPage
)
{
SuspendedProcessDefinitionPage
processDefinitionPage
=
(
SuspendedProcessDefinitionPage
)
parentPage
;
Button
activateButton
=
new
Button
(
i18nManager
.
getMessage
(
Messages
.
PROCESS_ACTIVATE
));
activateButton
.
addListener
(
new
ClickListener
()
{
private
static
final
long
serialVersionUID
=
1L
;
public
void
buttonClick
(
ClickEvent
event
)
{
ChangeProcessSuspensionStatePopupWindow
popupWindow
=
new
ChangeProcessSuspensionStatePopupWindow
(
processDefinition
.
getId
(),
parentPage
,
false
);
ExplorerApp
.
get
().
getViewManager
().
showPopupWindow
(
popupWindow
);
}
});
// Clear toolbar and add 'start' button
processDefinitionPage
.
getToolBar
().
removeAllButtons
();
processDefinitionPage
.
getToolBar
().
addButton
(
activateButton
);
}
}
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/management/processdefinition/SuspendedProcessDefinitionListQuery.java
0 → 100644
浏览文件 @
abbb944e
/* 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
org.activiti.explorer.ui.management.processdefinition
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.activiti.engine.ProcessEngines
;
import
org.activiti.engine.RepositoryService
;
import
org.activiti.engine.repository.ProcessDefinition
;
import
org.activiti.explorer.data.AbstractLazyLoadingQuery
;
import
com.vaadin.data.Item
;
/**
* @author Joram Barrez
*/
public
class
SuspendedProcessDefinitionListQuery
extends
AbstractLazyLoadingQuery
{
protected
RepositoryService
repositoryService
;
public
SuspendedProcessDefinitionListQuery
()
{
this
.
repositoryService
=
ProcessEngines
.
getDefaultProcessEngine
().
getRepositoryService
();
}
public
int
size
()
{
return
(
int
)
repositoryService
.
createProcessDefinitionQuery
().
suspended
().
count
();
}
public
List
<
Item
>
loadItems
(
int
start
,
int
count
)
{
List
<
ProcessDefinition
>
processDefinitions
=
repositoryService
.
createProcessDefinitionQuery
()
.
suspended
()
.
orderByProcessDefinitionName
().
asc
()
.
orderByProcessDefinitionVersion
().
asc
()
.
listPage
(
start
,
count
);
List
<
Item
>
processDefinitionItems
=
new
ArrayList
<
Item
>();
for
(
ProcessDefinition
processDefinition
:
processDefinitions
)
{
processDefinitionItems
.
add
(
new
ProcessDefinitionListItem
(
processDefinition
));
}
return
processDefinitionItems
;
}
public
Item
loadSingleResult
(
String
id
)
{
return
new
ProcessDefinitionListItem
(
repositoryService
.
createProcessDefinitionQuery
()
.
processDefinitionId
(
id
).
singleResult
());
}
public
void
setSorting
(
Object
[]
propertyIds
,
boolean
[]
ascending
)
{
throw
new
UnsupportedOperationException
();
}
}
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/management/processdefinition/SuspendedProcessDefinitionPage.java
0 → 100644
浏览文件 @
abbb944e
/* 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
org.activiti.explorer.ui.management.processdefinition
;
import
org.activiti.explorer.ExplorerApp
;
import
org.activiti.explorer.data.LazyLoadingContainer
;
import
org.activiti.explorer.data.LazyLoadingQuery
;
import
org.activiti.explorer.navigation.ActiveProcessDefinitionNavigator
;
import
org.activiti.explorer.navigation.SuspendedProcessDefinitionNavigator
;
import
org.activiti.explorer.navigation.UriFragment
;
import
org.activiti.explorer.ui.management.ManagementPage
;
import
com.vaadin.data.Item
;
import
com.vaadin.data.Property
;
import
com.vaadin.data.Property.ValueChangeEvent
;
import
com.vaadin.ui.Table
;
/**
* @author Joram Barrez
*/
public
class
SuspendedProcessDefinitionPage
extends
ManagementPage
{
private
static
final
long
serialVersionUID
=
1L
;
protected
String
processDefinitionId
;
protected
Table
processDefinitionTable
;
protected
LazyLoadingQuery
processDefinitionListQuery
;
protected
LazyLoadingContainer
processDefinitionListContainer
;
public
SuspendedProcessDefinitionPage
()
{
ExplorerApp
.
get
().
setCurrentUriFragment
(
new
UriFragment
(
SuspendedProcessDefinitionNavigator
.
SUSPENDED_PROC_DEF_URI_PART
));
}
public
SuspendedProcessDefinitionPage
(
String
processDefinitionId
)
{
this
.
processDefinitionId
=
processDefinitionId
;
}
@Override
protected
void
initUi
()
{
super
.
initUi
();
if
(
processDefinitionId
==
null
)
{
selectElement
(
0
);
}
else
{
selectElement
(
processDefinitionListContainer
.
getIndexForObjectId
(
processDefinitionId
));
}
}
protected
Table
createList
()
{
processDefinitionTable
=
new
Table
();
processDefinitionListQuery
=
new
SuspendedProcessDefinitionListQuery
();
processDefinitionListContainer
=
new
LazyLoadingContainer
(
processDefinitionListQuery
);
processDefinitionTable
.
setContainerDataSource
(
processDefinitionListContainer
);
// Column headers
processDefinitionTable
.
addContainerProperty
(
"name"
,
String
.
class
,
null
);
processDefinitionTable
.
setColumnHeaderMode
(
Table
.
COLUMN_HEADER_MODE_HIDDEN
);
// Listener to change right panel when clicked on a user
processDefinitionTable
.
addListener
(
new
Property
.
ValueChangeListener
()
{
private
static
final
long
serialVersionUID
=
1L
;
public
void
valueChange
(
ValueChangeEvent
event
)
{
Item
item
=
processDefinitionTable
.
getItem
(
event
.
getProperty
().
getValue
());
// the value of the property is the itemId of the table entry
if
(
item
!=
null
)
{
String
processDefinitionId
=
(
String
)
item
.
getItemProperty
(
"id"
).
getValue
();
setDetailComponent
(
new
SuspendedProcessDefinitionDetailPanel
(
processDefinitionId
,
SuspendedProcessDefinitionPage
.
this
));
// Update URL
ExplorerApp
.
get
().
setCurrentUriFragment
(
new
UriFragment
(
ActiveProcessDefinitionNavigator
.
ACTIVE_PROC_DEF_URI_PART
,
processDefinitionId
));
}
else
{
// Nothing selected
setDetailComponent
(
null
);
ExplorerApp
.
get
().
setCurrentUriFragment
(
new
UriFragment
(
ActiveProcessDefinitionNavigator
.
ACTIVE_PROC_DEF_URI_PART
));
}
}
});
return
processDefinitionTable
;
}
}
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/process/AbstractProcessDefinitionDetailPanel.java
浏览文件 @
abbb944e
...
...
@@ -13,6 +13,7 @@
package
org.activiti.explorer.ui.process
;
import
org.activiti.engine.FormService
;
import
org.activiti.engine.ManagementService
;
import
org.activiti.engine.ProcessEngines
;
import
org.activiti.engine.RepositoryService
;
import
org.activiti.engine.repository.Deployment
;
...
...
@@ -53,6 +54,7 @@ public abstract class AbstractProcessDefinitionDetailPanel extends DetailPanel {
// Services
protected
RepositoryService
repositoryService
;
protected
ManagementService
managementService
;
protected
FormService
formService
;
protected
I18nManager
i18nManager
;
...
...
@@ -67,6 +69,7 @@ public abstract class AbstractProcessDefinitionDetailPanel extends DetailPanel {
public
AbstractProcessDefinitionDetailPanel
(
String
processDefinitionId
,
AbstractPage
parentPage
)
{
this
.
repositoryService
=
ProcessEngines
.
getDefaultProcessEngine
().
getRepositoryService
();
this
.
managementService
=
ProcessEngines
.
getDefaultProcessEngine
().
getManagementService
();
this
.
formService
=
ProcessEngines
.
getDefaultProcessEngine
().
getFormService
();
this
.
i18nManager
=
ExplorerApp
.
get
().
getI18nManager
();
...
...
modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/process/ProcessDefinitionInfoComponent.java
浏览文件 @
abbb944e
...
...
@@ -13,10 +13,19 @@
package
org.activiti.explorer.ui.process
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.activiti.engine.ManagementService
;
import
org.activiti.engine.ProcessEngines
;
import
org.activiti.engine.RepositoryService
;
import
org.activiti.engine.impl.jobexecutor.TimerActivateProcessDefinitionHandler
;
import
org.activiti.engine.impl.jobexecutor.TimerSuspendProcessDefinitionHandler
;
import
org.activiti.engine.impl.persistence.entity.JobEntity
;
import
org.activiti.engine.repository.Deployment
;
import
org.activiti.engine.repository.ProcessDefinition
;
import
org.activiti.engine.runtime.Job
;
import
org.activiti.explorer.Constants
;
import
org.activiti.explorer.ExplorerApp
;
import
org.activiti.explorer.I18nManager
;
import
org.activiti.explorer.Messages
;
...
...
@@ -34,6 +43,7 @@ import com.vaadin.ui.themes.Reindeer;
/**
* @author Frederik Heremans
* @author Joram Barrez
*/
public
class
ProcessDefinitionInfoComponent
extends
VerticalLayout
{
...
...
@@ -41,6 +51,7 @@ public class ProcessDefinitionInfoComponent extends VerticalLayout {
// Services
protected
RepositoryService
repositoryService
;
protected
ManagementService
managementService
;
protected
I18nManager
i18nManager
;
// Members
...
...
@@ -55,6 +66,7 @@ public class ProcessDefinitionInfoComponent extends VerticalLayout {
public
ProcessDefinitionInfoComponent
(
ProcessDefinition
processDefinition
,
Deployment
deployment
)
{
super
();
this
.
repositoryService
=
ProcessEngines
.
getDefaultProcessEngine
().
getRepositoryService
();
this
.
managementService
=
ProcessEngines
.
getDefaultProcessEngine
().
getManagementService
();
this
.
i18nManager
=
ExplorerApp
.
get
().
getI18nManager
();
this
.
processDefinition
=
processDefinition
;
...
...
@@ -62,9 +74,49 @@ public class ProcessDefinitionInfoComponent extends VerticalLayout {
addStyleName
(
ExplorerLayout
.
STYLE_DETAIL_BLOCK
);
initSuspensionStateInformation
();
initImage
();
}
protected
void
initSuspensionStateInformation
()
{
List
<
Job
>
jobs
=
managementService
.
createJobQuery
()
.
processDefinitionId
(
processDefinition
.
getId
()).
orderByJobDuedate
().
asc
().
list
();
List
<
JobEntity
>
suspensionStateJobs
=
new
ArrayList
<
JobEntity
>();
// TODO: this is a hack (ie the cast to JobEntity)... we must clean this in the engine!
for
(
Job
job
:
jobs
)
{
JobEntity
jobEntity
=
(
JobEntity
)
job
;
if
(
jobEntity
.
getJobHandlerType
().
equals
(
TimerSuspendProcessDefinitionHandler
.
TYPE
)
||
jobEntity
.
getJobHandlerType
().
equals
(
TimerActivateProcessDefinitionHandler
.
TYPE
))
{
suspensionStateJobs
.
add
(
jobEntity
);
}
}
if
(
suspensionStateJobs
.
size
()
>
0
)
{
// Header
Label
suspensionStateTitle
=
new
Label
(
i18nManager
.
getMessage
(
Messages
.
PROCESS_HEADER_SUSPENSION_STATE
));
suspensionStateTitle
.
addStyleName
(
ExplorerLayout
.
STYLE_H3
);
addComponent
(
suspensionStateTitle
);
addEmptySpace
(
this
);
// Actual suspend/activation jobs
for
(
JobEntity
jobEntity
:
suspensionStateJobs
)
{
if
(
jobEntity
.
getJobHandlerType
().
equals
(
TimerSuspendProcessDefinitionHandler
.
TYPE
))
{
Label
suspendLabel
=
new
Label
(
i18nManager
.
getMessage
(
Messages
.
PROCESS_SCHEDULED_SUSPEND
,
Constants
.
DEFAULT_TIME_FORMATTER
.
format
(
jobEntity
.
getDuedate
())),
Label
.
CONTENT_XHTML
);
addComponent
(
suspendLabel
);
}
else
if
(
jobEntity
.
getJobHandlerType
().
equals
(
TimerActivateProcessDefinitionHandler
.
TYPE
))
{
Label
suspendLabel
=
new
Label
(
i18nManager
.
getMessage
(
Messages
.
PROCESS_SCHEDULED_ACTIVATE
,
Constants
.
DEFAULT_TIME_FORMATTER
.
format
(
jobEntity
.
getDuedate
())),
Label
.
CONTENT_XHTML
);
addComponent
(
suspendLabel
);
}
}
}
addEmptySpace
(
this
);
}
protected
void
initImage
()
{
processImageContainer
=
new
VerticalLayout
();
...
...
modules/activiti-explorer/src/main/resources/messages.properties
浏览文件 @
abbb944e
...
...
@@ -7,6 +7,7 @@ confirmation.dialog.no= No
button.ok
=
Ok
button.create
=
Create
button.cancel
=
Cancel
uncaught.exception
=
Warning!
# Navigation
navigation.error.not.involved.title
=
Cannot view task
...
...
@@ -175,6 +176,9 @@ process.version = Version {0}
process.deploy.time
=
Deployed {0}
process.header.diagram
=
Process Diagram
process.no.diagram
=
No image available for this process.
process.header.suspension.state
=
Suspension state changes
process.scheduled.suspend
=
This process definition is scheduled to be <b>suspended on {0}</b>
process.scheduled.activate
=
This process definition is scheduled to be <b>activated on {0}</b>
process.start
=
Start process
process.edit
=
Edit model
process.copy
=
Copy model
...
...
@@ -183,6 +187,8 @@ process.new = New model
process.deploy
=
Deploy
process.activate
=
Activate
process.activate.popup
=
Activate process definition
process.activate.popup.time.description
=
When do you want to activate this process definition?
process.activate.popup.process.instances.description
=
Also activate all process instances for this process definitions
process.suspend
=
Suspend
process.suspend.popup
=
Suspend process definition
process.suspend.popup.time.description
=
When do you want to suspend this process definition?
...
...
@@ -246,6 +252,8 @@ job.duedate = Due {0}
job.no.dudedate
=
No duedate
job.error
=
Error occurred while executing job
job.not.executed
=
Job hasn't been executed yet.
job.suspend.processdefinition
=
This job will suspend process definition {0}
job.activate.processdefinition
=
This job will activate process definition {0}
# Deployment page
deployment.delete
=
Delete
...
...
modules/activiti-webapp-explorer2/src/main/webapp/VAADIN/themes/activiti/styles.css
浏览文件 @
abbb944e
...
...
@@ -915,6 +915,14 @@ div.searchbox {
.v-table-related-content-create-list
.v-table-row-odd.v-selected
{
background
:
#DFF5FF
;
}
/**********************
* Process definitions *
***********************/
.process-definition-suspend-choice
{
margin
:
5px
5px
5px
10px
;
}
/**********************
* Custom Scrollbar CSS
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录