本文整理汇总了Java中org.activiti.engine.history.HistoricTaskInstance.getDueDate方法的典型用法代码示例。如果您正苦于以下问题:Java HistoricTaskInstance.getDueDate方法的具体用法?Java HistoricTaskInstance.getDueDate怎么用?Java HistoricTaskInstance.getDueDate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.activiti.engine.history.HistoricTaskInstance
的用法示例。
在下文中一共展示了HistoricTaskInstance.getDueDate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Task
import org.activiti.engine.history.HistoricTaskInstance; //导入方法依赖的package包/类
public Task(HistoricTaskInstance taskInstance)
{
this.id = taskInstance.getId();
this.processId = taskInstance.getProcessInstanceId();
this.processDefinitionId = taskInstance.getProcessDefinitionId();
this.activityDefinitionId = taskInstance.getTaskDefinitionKey();
this.name = taskInstance.getName();
this.description = taskInstance.getDescription();
this.dueAt = taskInstance.getDueDate();
this.startedAt = taskInstance.getStartTime();
this.endedAt = taskInstance.getEndTime();
this.durationInMs = taskInstance.getDurationInMillis();
this.priority = taskInstance.getPriority();
this.owner = taskInstance.getOwner();
this.assignee = taskInstance.getAssignee();
this.formResourceKey = taskInstance.getFormKey();
if (taskInstance.getEndTime() != null)
{
this.state = TaskStateTransition.COMPLETED.name().toLowerCase();
}
else if (taskInstance.getAssignee() != null)
{
this.state = TaskStateTransition.CLAIMED.name().toLowerCase();
}
else
{
this.state = TaskStateTransition.UNCLAIMED.name().toLowerCase();
}
}
示例2: addTaskItem
import org.activiti.engine.history.HistoricTaskInstance; //导入方法依赖的package包/类
protected void addTaskItem(HistoricTaskInstance task, Table taskTable) {
Item item = taskTable.addItem(task.getId());
if(task.getEndTime() != null) {
item.getItemProperty("finished").setValue(new Embedded(null, Images.TASK_FINISHED_22));
} else {
item.getItemProperty("finished").setValue(new Embedded(null, Images.TASK_22));
}
item.getItemProperty("name").setValue(task.getName());
item.getItemProperty("priority").setValue(task.getPriority());
item.getItemProperty("startDate").setValue(new PrettyTimeLabel(task.getStartTime(), true));
item.getItemProperty("endDate").setValue(new PrettyTimeLabel(task.getEndTime(), true));
if(task.getDueDate() != null) {
Label dueDateLabel = new PrettyTimeLabel(task.getEndTime(), i18nManager.getMessage(Messages.TASK_NOT_FINISHED_YET), true);
item.getItemProperty("dueDate").setValue(dueDateLabel);
}
if(task.getAssignee() != null) {
Component taskAssigneeComponent = getTaskAssigneeComponent(task.getAssignee());
if(taskAssigneeComponent != null) {
item.getItemProperty("assignee").setValue(taskAssigneeComponent);
}
}
}