本文整理了Java中org.activiti.engine.task.Task.getName()
方法的一些代码示例,展示了Task.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getName()
方法的具体详情如下:
包路径:org.activiti.engine.task.Task
类名称:Task
方法名:getName
[英]Name or title of the task.
[中]任务的名称或标题。
代码示例来源:origin: hs-web/hsweb-framework
protected void acceptTaskFormData(Task task,
Map<String, Object> formData) {
formData.put("processTaskId", task.getId());
formData.put("processTaskDefineKey", task.getTaskDefinitionKey());
formData.put("processTaskName", task.getName());
}
代码示例来源:origin: Activiti/Activiti
private int updateName(UpdateTaskPayload updateTaskPayload,
org.activiti.engine.task.Task internalTask,
int updates) {
String newValue;
if ((newValue = updateTaskPayload.getName()) != null) {
String oldValue = internalTask.getName();
if (!Objects.equals(oldValue, newValue)) {
updates++;
internalTask.setName(newValue);
}
}
return updates;
}
代码示例来源:origin: hs-web/hsweb-framework
@Override
public ActivityImpl selectActivityImplByTask(String taskId) {
if (StringUtils.isNullOrEmpty(taskId)) {
return new ActivityImpl(null, null);
}
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
ProcessDefinitionEntity entity = (ProcessDefinitionEntity) ((RepositoryServiceImpl) repositoryService).getDeployedProcessDefinition(task.getProcessDefinitionId());
List<ActivityImpl> activities = entity.getActivities();
return activities
.stream()
.filter(activity -> "userTask".equals(activity.getProperty("type")) && activity.getProperty("name").equals(task.getName()))
.findFirst()
.orElseThrow(() -> new NotFoundException("获取节点信息失败"));
}
代码示例来源:origin: hs-web/hsweb-framework
Map<String, String> target = new HashMap<>();
target.put("taskId", t.getId());
target.put("taskName", t.getName());
target.put("activityId", t.getTaskDefinitionKey());
targetTask.add(target);
.taskId(task.getId())
.taskDefineKey(task.getTaskDefinitionKey())
.taskName(task.getName())
.data(data)
.build();
代码示例来源:origin: hs-web/hsweb-framework
.taskId(taskId)
.taskDefineKey(curTask.getTaskDefinitionKey())
.taskName(curTask.getName())
.data(request.getData())
.build();
代码示例来源:origin: hs-web/hsweb-framework
.taskId(task.getId())
.taskDefineKey(task.getTaskDefinitionKey())
.taskName(task.getName())
.build();
代码示例来源:origin: Activiti/Activiti
public Task from(org.activiti.engine.task.Task internalTask,
Task.TaskStatus status) {
TaskImpl task = new TaskImpl(internalTask.getId(),
internalTask.getName(),
status);
task.setProcessDefinitionId(internalTask.getProcessDefinitionId());
task.setProcessInstanceId(internalTask.getProcessInstanceId());
task.setAssignee(internalTask.getAssignee());
task.setClaimedDate(internalTask.getClaimTime());
task.setCreatedDate(internalTask.getCreateTime());
task.setDueDate(internalTask.getDueDate());
task.setDescription(internalTask.getDescription());
task.setOwner(internalTask.getOwner());
task.setParentTaskId(internalTask.getParentTaskId());
task.setPriority(internalTask.getPriority());
task.setFormKey(internalTask.getFormKey());
return task;
}
代码示例来源:origin: org.flowable/flowable5-compatibility
@Override
public String getName() {
return activiti5Task.getName();
}
代码示例来源:origin: org.aperteworkflow/activiti-context
public String getProcessState(ProcessInstance pi, ProcessToolContext ctx) {
Task newTask = findProcessTask(pi, ctx);
return newTask != null ? newTask.getName() : null;
}
代码示例来源:origin: org.hswebframework.web/hsweb-system-workflow-local
protected void acceptTaskFormData(Task task,
Map<String, Object> formData) {
formData.put("processTaskId", task.getId());
formData.put("processTaskDefineKey", task.getTaskDefinitionKey());
formData.put("processTaskName", task.getName());
}
代码示例来源:origin: org.aperteworkflow/activiti-context
@Override
public ProcessInstance lambda(Task task) {
ProcessInstance pi = instances.get(task.getProcessInstanceId());
if (pi == null) {
log.warning("process " + task.getProcessInstanceId() + " not found");
return null;
}
pi.setState(task.getName());
pi.setTaskId(task.getId());
return pi;
}
}.go();
代码示例来源:origin: org.hswebframework.web/hsweb-system-workflow-local
@Override
public ActivityImpl selectActivityImplByTask(String taskId) {
if (StringUtils.isNullOrEmpty(taskId)) {
return new ActivityImpl(null, null);
}
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
ProcessDefinitionEntity entity = (ProcessDefinitionEntity) ((RepositoryServiceImpl) repositoryService).getDeployedProcessDefinition(task.getProcessDefinitionId());
List<ActivityImpl> activities = entity.getActivities();
return activities
.stream()
.filter(activity -> "userTask".equals(activity.getProperty("type")) && activity.getProperty("name").equals(task.getName()))
.findFirst()
.orElseThrow(() -> new NotFoundException("获取节点信息失败"));
}
代码示例来源:origin: org.activiti/activiti-explorer
@Override
protected void handleFormSubmit(FormPropertiesEvent event) {
Map<String, String> properties = event.getFormProperties();
formService.submitTaskFormData(task.getId(), properties);
notificationManager.showInformationNotification(Messages.TASK_COMPLETED, task.getName());
taskPage.refreshSelectNext();
}
代码示例来源:origin: org.activiti/activiti-explorer
public TaskListItem(Task task) {
addItemProperty("id", new ObjectProperty<String>(task.getId(), String.class));
addItemProperty("name", new ObjectProperty<String>(task.getName(), String.class));
}
代码示例来源:origin: org.activiti/activiti-explorer
public void buttonClick(ClickEvent event) {
// If no owner, make assignee owner (will go into archived then)
if (task.getOwner() == null) {
task.setOwner(task.getAssignee());
taskService.setOwner(task.getId(), task.getAssignee());
}
taskService.complete(task.getId());
notificationManager.showInformationNotification(Messages.TASK_COMPLETED, task.getName());
taskPage.refreshSelectNext();
}
});
代码示例来源:origin: org.activiti/activiti-explorer
protected void initParentTaskLink() {
if (task.getParentTaskId() != null) {
final Task parentTask = taskService.createTaskQuery()
.taskId(task.getParentTaskId()).singleResult();
Button showParentTaskButton = new Button(i18nManager.getMessage(
Messages.TASK_SUBTASK_OF_PARENT_TASK, parentTask.getName()));
showParentTaskButton.addStyleName(Reindeer.BUTTON_LINK);
showParentTaskButton.addListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
viewManager.showTaskPage(parentTask.getId());
}
});
centralLayout.addComponent(showParentTaskButton);
addEmptySpace(centralLayout);
}
}
代码示例来源:origin: org.activiti/activiti-explorer
public void buttonClick(ClickEvent event) {
User user = identityService.createUserQuery().userId(identityLink.getUserId()).singleResult();
String name = user.getFirstName() + " " + user.getLastName();
ConfirmationDialogPopupWindow confirmationPopup = new ConfirmationDialogPopupWindow(
i18nManager.getMessage(Messages.TASK_INVOLVED_REMOVE_CONFIRMATION_TITLE, name),
i18nManager.getMessage(Messages.TASK_INVOLVED_REMOVE_CONFIRMATION_DESCRIPTION, name, task.getName()));
confirmationPopup.addListener(new ConfirmationEventListener() {
private static final long serialVersionUID = 1L;
protected void rejected(ConfirmationEvent event) {
}
protected void confirmed(ConfirmationEvent event) {
taskService.deleteUserIdentityLink(identityLink.getTaskId(), identityLink.getUserId(), identityLink.getType());
taskDetailPanel.notifyPeopleInvolvedChanged();
}
});
viewManager.showPopupWindow(confirmationPopup);
}
代码示例来源:origin: Alfresco/alfresco-repository
@SuppressWarnings("deprecation")
public LazyActivitiWorkflowTask(Task task, ActivitiTypeConverter typeConverter, TenantService tenantService, String workflowDefinitionName)
{
super(BPMEngineRegistry.createGlobalId(ActivitiConstants.ENGINE_ID, task.getId()), null, null, null, null, null, null, null);
this.task = task;
this.activitiTypeConverter = typeConverter;
this.lazyPropertiesMap = new LazyPropertiesMap();
// Fetch task-definition and a partially-initialized WorkflowTask (not including properties and path)
WorkflowTaskDefinition taskDefinition = activitiTypeConverter.getTaskDefinition(task);
WorkflowTask partiallyInitialized = typeConverter.getWorkflowObjectFactory().createTask(task.getId(), taskDefinition, taskDefinition.getId(), task.getName(),
task.getDescription(), WorkflowTaskState.IN_PROGRESS, null, workflowDefinitionName , lazyPropertiesMap);
this.definition = taskDefinition;
this.name = taskDefinition.getId();
this.title = partiallyInitialized.getTitle();
this.description = partiallyInitialized.getDescription();
this.state = partiallyInitialized.getState();
}
代码示例来源:origin: com.quhaodian.discover/discover-workflow
@Override
public TaskVo conver(Task task) {
TaskVo result = new TaskVo();
result.setCatalog(task.getCategory());
result.setId(task.getId());
result.setProcessDefinitionId(task.getProcessDefinitionId());
result.setName(task.getName());
result.setFlowName("" + taskService.getVariable(task.getId(), "name"));
result.setUpdateUrl("" + taskService.getVariable(task.getId(), "updateurl"));
result.setOid("" + taskService.getVariable(task.getId(), "oid"));
result.setAddDate(DateFormat.format(task.getCreateTime()));
return result;
}
}
代码示例来源:origin: org.aperteworkflow/activiti-context
private MutableBpmTask collectTask(Task task, ProcessInstance pi, ProcessToolContext ctx) {
MutableBpmTask t = new MutableBpmTask();
t.setProcessInstance(pi);
t.setAssignee(task.getAssignee());
UserData ud = ctx.getUserDataDAO().loadUserByLogin(task.getAssignee());
if (ud == null) {
ud = new UserData();
ud.setLogin(task.getAssignee());
}
t.setOwner(ud);
t.setTaskName(task.getName());
t.setInternalTaskId(task.getId());
t.setExecutionId(task.getExecutionId());
t.setCreateDate(task.getCreateTime());
t.setFinished(false);
return t;
}
内容来源于网络,如有侵权,请联系作者删除!