- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemType.getOriginalAssigneeRef()
方法的一些代码示例,展示了WorkItemType.getOriginalAssigneeRef()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WorkItemType.getOriginalAssigneeRef()
方法的具体详情如下:
包路径:com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemType
类名称:WorkItemType
方法名:getOriginalAssigneeRef
暂无
代码示例来源:origin: Evolveum/midpoint
private String getCompareKey(WorkItemType workItem) {
return workItem.getOriginalAssigneeRef().getOid();
}
代码示例来源:origin: Evolveum/midpoint
private void appendAssigneeInformation(StringBuilder sb, WorkItemEvent event, OperationResult result) {
WorkItemType workItem = event.getWorkItem();
ObjectReferenceType originalAssignee = workItem.getOriginalAssigneeRef();
List<ObjectReferenceType> currentAssignees = workItem.getAssigneeRef();
boolean atLeastOne = false;
if (currentAssignees.size() != 1 || !java.util.Objects.equals(originalAssignee.getOid(), currentAssignees.get(0).getOid())) {
UserType originalAssigneeObject = (UserType) functions.getObjectType(originalAssignee, true, result);
sb.append("Originally allocated to: ").append(
textFormatter.formatUserName(originalAssigneeObject, originalAssignee.getOid())).append("\n");
atLeastOne = true;
}
if (!workItem.getAssigneeRef().isEmpty()) {
sb.append("Allocated to");
if (event.getOperationKind() == WorkItemOperationKindType.DELEGATE) {
sb.append(event.isAdd() ? " (after delegation)" : " (before delegation)");
} else if (event.getOperationKind() == WorkItemOperationKindType.ESCALATE) {
sb.append(event.isAdd() ? " (after escalation)" : " (before escalation)");
}
sb.append(": ");
sb.append(workItem.getAssigneeRef().stream()
.map(ref -> textFormatter.formatUserName(ref, result))
.collect(Collectors.joining(", ")));
sb.append("\n");
atLeastOne = true;
}
if (atLeastOne) {
sb.append("\n");
}
}
代码示例来源:origin: Evolveum/midpoint
public boolean matches(WorkItemType actualWorkItem) {
if (!assigneeOid.equals(actualWorkItem.getOriginalAssigneeRef().getOid())) {
return false;
}
if (targetOid != null && !targetOid.equals(WfContextUtil.getTargetRef(actualWorkItem).getOid())) {
return false;
}
TaskType actualTask = WfContextUtil.getTask(actualWorkItem);
return task.processName.equals(actualTask.getWorkflowContext().getProcessInstanceName());
}
代码示例来源:origin: Evolveum/midpoint
@Test
public void test120DelegateToUser2() throws Exception {
final String TEST_NAME = "test120DelegateToUser2";
TestUtil.displayTestTitle(this, TEST_NAME);
login(userLead1);
Task task = createTask(TEST_NAME);
OperationResult result = task.getResult();
workflowService.delegateWorkItem(workItemId, Collections.singletonList(ort(userLead2Oid)), ADD_ASSIGNEES, result);
result.computeStatus();
assertSuccess(result);
WorkItemType workItem = getWorkItem(task, result);
display("work item", workItem);
PrismObject<TaskType> wfTask = getObjectViaRepo(TaskType.class, taskOid);
display("task", wfTask);
PrismAsserts.assertReferenceValues(ref(workItem.getAssigneeRef()), userLead1Oid, userLead2Oid);
assertRefEquals("Wrong originalAssigneeRef", ort(userLead1Oid), workItem.getOriginalAssigneeRef());
org.activiti.engine.task.Task activitiTask = activitiEngine.getTaskService().createTaskQuery()
.taskId(workItem.getExternalId())
.singleResult();
System.out.println("Activiti task: " + activitiTask);
assertEquals("Wrong activiti assignee", "UserType:"+userLead1Oid, activitiTask.getAssignee());
List<String> assignees = getAssignees(activitiTask);
assertEquals("Wrong midpoint-assignee values", new HashSet<>(Arrays.asList("UserType:" + userLead1Oid, "UserType:" + userLead2Oid)),
new HashSet<>(assignees));
List<WorkItemDelegationEventType> events = WfContextUtil.getWorkItemEvents(wfTask.asObjectable().getWorkflowContext(), workItemId, WorkItemDelegationEventType.class);
assertEquals("Wrong # of delegation events", 1, events.size());
// TODO check content
}
代码示例来源:origin: Evolveum/midpoint
miscDataUtil.resolveAndStoreObjectReference(wi.getOriginalAssigneeRef(), result);
代码示例来源:origin: Evolveum/midpoint
assertRefEquals("Wrong originalAssigneeRef", ort(userLead1Oid), workItem.getOriginalAssigneeRef());
代码示例来源:origin: Evolveum/midpoint
@Test
public void test130DelegateToUser3ByReplace() throws Exception {
final String TEST_NAME = "test130DelegateToUser3ByReplace";
TestUtil.displayTestTitle(this, TEST_NAME);
login(userLead1);
Task task = createTask(TEST_NAME);
OperationResult result = task.getResult();
workflowService.delegateWorkItem(workItemId, Collections.singletonList(ort(userLead3Oid)), REPLACE_ASSIGNEES, result);
result.computeStatus();
assertSuccess(result);
WorkItemType workItem = getWorkItem(task, result);
display("work item", workItem);
PrismObject<TaskType> wfTask = getObjectViaRepo(TaskType.class, taskOid);
display("task", wfTask);
PrismAsserts.assertReferenceValues(ref(workItem.getAssigneeRef()), userLead3Oid);
assertRefEquals("Wrong originalAssigneeRef", ort(userLead1Oid), workItem.getOriginalAssigneeRef());
org.activiti.engine.task.Task activitiTask = activitiEngine.getTaskService().createTaskQuery()
.taskId(workItem.getExternalId())
.singleResult();
System.out.println("Activiti task: " + activitiTask);
assertEquals("Wrong activiti assignee", "UserType:"+userLead3Oid, activitiTask.getAssignee());
List<String> assignees = getAssignees(activitiTask);
assertEquals("Wrong midpoint-assignee values", Collections.singleton("UserType:" + userLead3Oid),
new HashSet<>(assignees));
List<WorkItemDelegationEventType> events = WfContextUtil.getWorkItemEvents(wfTask.asObjectable().getWorkflowContext(), workItemId, WorkItemDelegationEventType.class);
assertEquals("Wrong # of delegation events", 2, events.size());
// TODO check content
}
代码示例来源:origin: Evolveum/midpoint
.assertRef("assignee reference", workItem.getOriginalAssigneeRef(), expectedWorkItems.get(i).assigneeOid, false, true);
代码示例来源:origin: Evolveum/midpoint
@Test
public void test110Notify() throws Exception {
final String TEST_NAME = "test110Notify";
TestUtil.displayTestTitle(this, TEST_NAME);
login(userAdministrator);
Task task = createTask(TEST_NAME);
OperationResult result = task.getResult();
clock.overrideDuration("P6D"); // at P5D there's a notify action
waitForTaskNextRun(TASK_TRIGGER_SCANNER_OID, true, 20000, true);
// TODO assert notifications
WorkItemType workItem = getWorkItem(task, result);
display("work item", workItem);
String wfTaskOid = WfContextUtil.getTask(workItem).getOid();
PrismObject<TaskType> wfTask = getTask(wfTaskOid);
display("task", wfTask);
assertEquals("Wrong # of triggers", 2, wfTask.asObjectable().getTrigger().size());
PrismAsserts.assertReferenceValues(ref(workItem.getAssigneeRef()), userLead1Oid);
PrismAsserts.assertReferenceValue(ref(workItem.getOriginalAssigneeRef()), userLead1Oid);
}
代码示例来源:origin: Evolveum/midpoint
@Test
public void test100CreateTask() throws Exception {
final String TEST_NAME = "test100CreateTask";
TestUtil.displayTestTitle(this, TEST_NAME);
login(userAdministrator);
Task task = createTask(TEST_NAME);
OperationResult result = task.getResult();
assignRole(userJackOid, roleE1Oid, task, result); // should start approval process
assertNotAssignedRole(userJackOid, roleE1Oid, task, result);
WorkItemType workItem = getWorkItem(task, result);
workItemId = workItem.getExternalId();
approvalTaskOid = WfContextUtil.getTask(workItem).getOid();
PrismObject<TaskType> wfTask = getTask(approvalTaskOid);
display("work item", workItem);
display("workflow task", wfTask);
// 5 days: notification
// D-2 days: escalate
// D-0 days: approve
assertEquals("Wrong # of triggers", 3, wfTask.asObjectable().getTrigger().size());
PrismAsserts.assertReferenceValues(ref(workItem.getAssigneeRef()), userLead1Oid);
PrismAsserts.assertReferenceValue(ref(workItem.getOriginalAssigneeRef()), userLead1Oid);
}
代码示例来源:origin: Evolveum/midpoint
@Test
public void test120Escalate() throws Exception {
final String TEST_NAME = "test120Escalate";
TestUtil.displayTestTitle(this, TEST_NAME);
login(userAdministrator);
Task task = createTask(TEST_NAME);
OperationResult result = task.getResult();
clock.resetOverride();
clock.overrideDuration("P13D"); // at -P2D (i.e. P12D) there is a delegate action
waitForTaskNextRun(TASK_TRIGGER_SCANNER_OID, true, 20000, true);
WorkItemType workItem = getWorkItem(task, result);
display("work item", workItem);
PrismObject<TaskType> wfTask = getTask(WfContextUtil.getTask(workItem).getOid());
display("task", wfTask);
assertEquals("Wrong # of triggers", 1, wfTask.asObjectable().getTrigger().size());
PrismAsserts.assertReferenceValues(ref(workItem.getAssigneeRef()), userLead1Oid, userLead2Oid);
PrismAsserts.assertReferenceValue(ref(workItem.getOriginalAssigneeRef()), userLead1Oid);
assertEquals("Wrong escalation level number", 1, WfContextUtil.getEscalationLevelNumber(workItem));
}
代码示例来源:origin: Evolveum/midpoint
public AuditEventRecord prepareWorkItemAuditReportCommon(WorkItemType workItem, WfTask wfTask, AuditEventStage stage,
OperationResult result) throws WorkflowException {
AuditEventRecord record = new AuditEventRecord();
record.setEventType(AuditEventType.WORK_ITEM);
record.setEventStage(stage);
ObjectReferenceType objectRef = resolveIfNeeded(WfContextUtil.getObjectRef(workItem), result);
record.setTarget(objectRef.asReferenceValue());
record.setOutcome(OperationResultStatus.SUCCESS);
record.setParameter(wfTask.getCompleteStageInfo());
record.addReferenceValueIgnoreNull(WorkflowConstants.AUDIT_OBJECT, objectRef);
record.addReferenceValueIgnoreNull(WorkflowConstants.AUDIT_TARGET, resolveIfNeeded(WfContextUtil.getTargetRef(workItem), result));
record.addReferenceValueIgnoreNull(WorkflowConstants.AUDIT_ORIGINAL_ASSIGNEE, resolveIfNeeded(workItem.getOriginalAssigneeRef(), result));
record.addReferenceValues(WorkflowConstants.AUDIT_CURRENT_ASSIGNEE, resolveIfNeeded(workItem.getAssigneeRef(), result));
record.addPropertyValueIgnoreNull(WorkflowConstants.AUDIT_STAGE_NUMBER, workItem.getStageNumber());
record.addPropertyValueIgnoreNull(WorkflowConstants.AUDIT_STAGE_COUNT, WfContextUtil.getStageCount(workItem));
record.addPropertyValueIgnoreNull(WorkflowConstants.AUDIT_STAGE_NAME, WfContextUtil.getStageName(workItem));
record.addPropertyValueIgnoreNull(WorkflowConstants.AUDIT_STAGE_DISPLAY_NAME, WfContextUtil.getStageDisplayName(workItem));
record.addPropertyValueIgnoreNull(WorkflowConstants.AUDIT_ESCALATION_LEVEL_NUMBER, WfContextUtil.getEscalationLevelNumber(workItem));
record.addPropertyValueIgnoreNull(WorkflowConstants.AUDIT_ESCALATION_LEVEL_NAME, WfContextUtil.getEscalationLevelName(workItem));
record.addPropertyValueIgnoreNull(WorkflowConstants.AUDIT_ESCALATION_LEVEL_DISPLAY_NAME, WfContextUtil.getEscalationLevelDisplayName(workItem));
record.addPropertyValue(WorkflowConstants.AUDIT_WORK_ITEM_ID, workItem.getExternalId());
record.addPropertyValue(WorkflowConstants.AUDIT_PROCESS_INSTANCE_ID, WfContextUtil.getProcessInstanceId(workItem));
return record;
}
代码示例来源:origin: Evolveum/midpoint
WfTestUtil.assertRef("object reference", WfContextUtil.getObjectRef(workItem), USER_JACK_OID, true, true);
WfTestUtil.assertRef("target reference", WfContextUtil.getTargetRef(workItem), ROLE_R1_OID, true, true);
WfTestUtil.assertRef("assignee reference", workItem.getOriginalAssigneeRef(), R1BOSS_OID, false, true); // name is not known, as it is not stored in activiti (only OID is)
我在 XML 中创建了一个新的工作项类型,并通过命令提示符将其导入:witadmin importwitd... 假设我在 XML 中定义了一个字段: 现在,我想修
本文整理了Java中com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemType.setOriginalAssigneeRef()
本文整理了Java中com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemType.setProcessSpecificPart()
本文整理了Java中com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemType.getCandidateRef()方法的一些代码
本文整理了Java中com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemType.getCreateTimestamp()方法的一
本文整理了Java中com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemType.getAdditionalInformation
本文整理了Java中com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemType.getAssigneeRef()方法的一些代码示
本文整理了Java中com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemType.getExternalId()方法的一些代码示例
本文整理了Java中com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemType.setDeadline()方法的一些代码示例,展
本文整理了Java中com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemType.setCreateTimestamp()方法的一
本文整理了Java中com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemType.setOutput()方法的一些代码示例,展示了
本文整理了Java中com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemType.()方法的一些代码示例,展示了WorkItemT
本文整理了Java中com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemType.setName()方法的一些代码示例,展示了Wo
本文整理了Java中com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemType.getOriginalAssigneeRef()
本文整理了Java中com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemType.getOutput()方法的一些代码示例,展示了
我是一名优秀的程序员,十分优秀!