本文整理了Java中org.kie.api.task.model.Task.getNames()
方法的一些代码示例,展示了Task.getNames()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getNames()
方法的具体详情如下:
包路径:org.kie.api.task.model.Task
类名称:Task
方法名:getNames
暂无
代码示例来源:origin: kiegroup/jbpm
private void postInit(Object result) {
if (result instanceof Task) {
Task task = (Task) result;
if (task != null && !eagerDisabled) {
task.getNames().size();
task.getDescriptions().size();
task.getSubjects().size();
task.getPeopleAssignments().getBusinessAdministrators().size();
task.getPeopleAssignments().getPotentialOwners().size();
((InternalPeopleAssignments) task.getPeopleAssignments()).getRecipients().size();
((InternalPeopleAssignments) task.getPeopleAssignments()).getExcludedOwners().size();
((InternalPeopleAssignments) task.getPeopleAssignments()).getTaskStakeholders().size();
task.getTaskData().getAttachments().size();
task.getTaskData().getComments().size();
((InternalTask)task).getDeadlines().getStartDeadlines().size();
((InternalTask)task).getDeadlines().getEndDeadlines().size();
if (((InternalTask)task).getDelegation() != null) {
((InternalTask)task).getDelegation().getDelegates().size();
}
}
} else if (result instanceof Collection<?>) {
((Collection<?>) result).size();
}
}
代码示例来源:origin: kiegroup/jbpm
ut.begin();
Task newTask = taskService.getTaskById(tasks.get(0).getId());
((InternalI18NText)newTask.getNames().get(0)).setText("New task name");
ut.commit();
assertEquals("New task name", newTask.getNames().get(0).getText());
代码示例来源:origin: kiegroup/jbpm
List<I18NText> updatedNames = new ArrayList<I18NText>();
I18NText updatedName = TaskModelProvider.getFactory().newI18NText();
((InternalI18NText) updatedName).setLanguage(newTask.getNames().get(0).getLanguage());
((InternalI18NText) updatedName).setText("New task name");
updatedNames.add(updatedName);
assertEquals("New task name", newTask.getNames().get(0).getText());
代码示例来源:origin: kiegroup/jbpm
public void initialize(Task task) {
if( task == null ) {
return;
}
this.id = task.getId();
this.priority = task.getPriority();
this.version = task.getVersion();
this.archived = task.isArchived();
this.subTasksStrategy = ((InternalTask) task).getSubTaskStrategy();
this.peopleAssignments = new JaxbPeopleAssignments(task.getPeopleAssignments());
this.names = convertListFromInterfaceToJaxbImpl(task.getNames(), I18NText.class, JaxbI18NText.class);
this.name = ((InternalTask)task).getName();
this.subjects = convertListFromInterfaceToJaxbImpl(task.getSubjects(), I18NText.class, JaxbI18NText.class);
this.subject = ((InternalTask)task).getSubject();
this.descriptions = convertListFromInterfaceToJaxbImpl(task.getDescriptions(), I18NText.class, JaxbI18NText.class);
this.description = ((InternalTask)task).getDescription();
this.taskType = task.getTaskType();
this.formName = ((InternalTask)task).getFormName();
this.taskData = new JaxbTaskData(task.getTaskData());
}
代码示例来源:origin: kiegroup/jbpm
@Test
public void testTaskExit() throws Exception {
TestWorkItemManager manager = new TestWorkItemManager();
ksession.setWorkItemManager(manager);
WorkItemImpl workItem = new WorkItemImpl();
workItem.setName("Human Task");
workItem.setParameter("NodeName", "TaskName");
workItem.setParameter("Comment", "Comment");
workItem.setParameter("Priority", "10");
workItem.setParameter("ActorId", "Darth Vader");
workItem.setProcessInstanceId(10);
getHandler().executeWorkItem(workItem, manager);
Task task = taskService.getTaskByWorkItemId(workItem.getId());
taskService.exit(task.getId(), "Administrator");
task = taskService.getTaskByWorkItemId(workItem.getId());
assertEquals("TaskName", task.getNames().get(0).getText());
assertEquals(10, task.getPriority().intValue());
assertEquals("Comment", task.getDescriptions().get(0).getText());
assertEquals(Status.Exited, task.getTaskData().getStatus());
List<TaskSummary> tasks = taskService.getTasksAssignedAsPotentialOwner("Darth Vader", "en-UK");
assertEquals(0, tasks.size());
}
@Test
代码示例来源:origin: kiegroup/jbpm
@Test
public void testTaskExitByCustomBusinessAdmin() throws Exception {
TestWorkItemManager manager = new TestWorkItemManager();
ksession.setWorkItemManager(manager);
WorkItemImpl workItem = new WorkItemImpl();
workItem.setName("Human Task");
workItem.setParameter("NodeName", "TaskName");
workItem.setParameter("Comment", "Comment");
workItem.setParameter("Priority", "10");
workItem.setParameter("ActorId", "Darth Vader");
workItem.setParameter("BusinessAdministratorId", "Luke Cage");
workItem.setProcessInstanceId(10);
getHandler().executeWorkItem(workItem, manager);
Task task = taskService.getTaskByWorkItemId(workItem.getId());
assertNotNull(task);
getHandler().abortWorkItem(workItem, manager);
task = taskService.getTaskByWorkItemId(workItem.getId());
assertEquals("TaskName", task.getNames().get(0).getText());
assertEquals(10, task.getPriority().intValue());
assertEquals("Comment", task.getDescriptions().get(0).getText());
assertEquals(Status.Exited, task.getTaskData().getStatus());
List<TaskSummary> tasks = taskService.getTasksAssignedAsPotentialOwner("Darth Vader", "en-UK");
assertEquals(0, tasks.size());
}
代码示例来源:origin: org.kie.server/kie-server-services-jbpm-ui
protected String getTaskFormName(Task task) {
String formName = ((InternalTask ) task).getFormName();
if (formName != null && !formName.equals("")) {
// if the form name has extension it
if ( formName.endsWith( ".frm" ) ) {
return formName;
}
return formName + SUPPORTED_FORM_SUFFIX;
} else {
if (task.getNames() != null && !task.getNames().isEmpty()) {
formName = task.getNames().get(0).getText();
if (formName != null) return formName.replace(" ", "") + SUPPORTED_FORM_SUFFIX;
}
}
return null;
}
代码示例来源:origin: org.jbpm/jbpm-human-task-jpa
private void postInit(Object result) {
if (result instanceof Task) {
Task task = (Task) result;
if (task != null && !eagerDisabled) {
task.getNames().size();
task.getDescriptions().size();
task.getSubjects().size();
task.getPeopleAssignments().getBusinessAdministrators().size();
task.getPeopleAssignments().getPotentialOwners().size();
((InternalPeopleAssignments) task.getPeopleAssignments()).getRecipients().size();
((InternalPeopleAssignments) task.getPeopleAssignments()).getExcludedOwners().size();
((InternalPeopleAssignments) task.getPeopleAssignments()).getTaskStakeholders().size();
task.getTaskData().getAttachments().size();
task.getTaskData().getComments().size();
((InternalTask)task).getDeadlines().getStartDeadlines().size();
((InternalTask)task).getDeadlines().getEndDeadlines().size();
if (((InternalTask)task).getDelegation() != null) {
((InternalTask)task).getDelegation().getDelegates().size();
}
}
} else if (result instanceof Collection<?>) {
((Collection<?>) result).size();
}
}
代码示例来源:origin: org.jbpm/droolsjbpm-knowledge-services
List<I18NText> names = task.getNames();
for (I18NText text : names) {
if ("en-UK".equals(text.getLanguage())) {
if(availableForms != null){
for (Path p : availableForms) {
if (p.getFileName().toString().contains(task.getNames().get(0).getText())) {
selectedForm = p;
if (processId != null && !processId.equals("")) {
taskOutputMappings = bpmn2Service.getTaskOutputMappings(processId, task.getNames().iterator().next().getText());
代码示例来源:origin: org.jbpm/jbpm-console-ng-business-domain-backend
if(availableForms != null){
for (Path p : availableForms) {
if (p.getFileName().toString().contains(task.getNames().get(0).getText())) {
selectedForm = p;
代码示例来源:origin: org.jbpm/jbpm-examples
public static ChecklistItem createChecklistItem(Task task) {
return new DefaultChecklistItem(
getText(task.getNames()),
getStatus(task.getTaskData().getStatus()),
task.getId(),
"HumanTaskNode",
getActors(task),
task.getPriority(),
task.getTaskData().getProcessId(),
task.getTaskData().getProcessInstanceId(),
getText(task.getDescriptions()));
}
代码示例来源:origin: org.kie.remote/kie-remote-client
genTextList = convertKieTextListToGenTextList(task.getNames());
if( genTextList != null ) {
genTask.getNames().addAll(genTextList);
代码示例来源:origin: org.jbpm/jbpm-human-task-workitems
@Test
public void testTaskExitByCustomBusinessAdmin() throws Exception {
TestWorkItemManager manager = new TestWorkItemManager();
ksession.setWorkItemManager(manager);
WorkItemImpl workItem = new WorkItemImpl();
workItem.setName("Human Task");
workItem.setParameter("NodeName", "TaskName");
workItem.setParameter("Comment", "Comment");
workItem.setParameter("Priority", "10");
workItem.setParameter("ActorId", "Darth Vader");
workItem.setParameter("BusinessAdministratorId", "Luke Cage");
workItem.setProcessInstanceId(10);
getHandler().executeWorkItem(workItem, manager);
Task task = taskService.getTaskByWorkItemId(workItem.getId());
assertNotNull(task);
getHandler().abortWorkItem(workItem, manager);
task = taskService.getTaskByWorkItemId(workItem.getId());
assertEquals("TaskName", task.getNames().get(0).getText());
assertEquals(10, task.getPriority().intValue());
assertEquals("Comment", task.getDescriptions().get(0).getText());
assertEquals(Status.Exited, task.getTaskData().getStatus());
List<TaskSummary> tasks = taskService.getTasksAssignedAsPotentialOwner("Darth Vader", "en-UK");
assertEquals(0, tasks.size());
}
代码示例来源:origin: org.jbpm/jbpm-human-task-workitems
@Test
public void testTaskExit() throws Exception {
TestWorkItemManager manager = new TestWorkItemManager();
ksession.setWorkItemManager(manager);
WorkItemImpl workItem = new WorkItemImpl();
workItem.setName("Human Task");
workItem.setParameter("NodeName", "TaskName");
workItem.setParameter("Comment", "Comment");
workItem.setParameter("Priority", "10");
workItem.setParameter("ActorId", "Darth Vader");
workItem.setProcessInstanceId(10);
getHandler().executeWorkItem(workItem, manager);
Task task = taskService.getTaskByWorkItemId(workItem.getId());
taskService.exit(task.getId(), "Administrator");
task = taskService.getTaskByWorkItemId(workItem.getId());
assertEquals("TaskName", task.getNames().get(0).getText());
assertEquals(10, task.getPriority().intValue());
assertEquals("Comment", task.getDescriptions().get(0).getText());
assertEquals(Status.Exited, task.getTaskData().getStatus());
List<TaskSummary> tasks = taskService.getTasksAssignedAsPotentialOwner("Darth Vader", "en-UK");
assertEquals(0, tasks.size());
}
@Test
内容来源于网络,如有侵权,请联系作者删除!