@Test public void get_from_caseExecution() throws Exception { caseDefinition("1", "case"); when(caseExecution.getCaseDefinitionId()).thenReturn("1"); assertThat(GetProcessDefinitionKey.from(caseExecution)).isEqualTo("case"); }
public static String from(final DelegateTask delegateTask) { Context context = null; String id = null; if (delegateTask.getProcessDefinitionId() != null) { context = Context.bpmn; id = delegateTask.getProcessDefinitionId(); } else { context = cmmn; id = delegateTask.getCaseDefinitionId(); } return new Adapter(context, delegateTask.getProcessEngineServices().getRepositoryService(), id).get(); }
GetProcessDefinitionKey { public static String from(final DelegateTask delegateTask) { Context context = null; String id = null; if (delegateTask.getProcessDefinitionId() != null) { context = Context.bpmn; id = delegateTask.getProcessDefinitionId(); } else { context = cmmn; id = delegateTask.getCaseDefinitionId(); } return new Adapter(context, delegateTask.getProcessEngineServices().getRepositoryService(), id).get(); } }
GetProcessDefinitionKey { public static String from(final DelegateTask delegateTask) { Context context = null; String id = null; if (delegateTask.getProcessDefinitionId() != null) { context = Context.bpmn; id = delegateTask.getProcessDefinitionId(); } else { context = cmmn; id = delegateTask.getCaseDefinitionId(); } return new Adapter(context, delegateTask.getProcessEngineServices().getRepositoryService(), id).get(); } private  GetProcessDefinitionKey(); }
GetProcessDefinitionKey { public static String from(final DelegateTask delegateTask) { Context context = null; String id = null; if (delegateTask.getProcessDefinitionId() != null) { context = Context.bpmn; id = delegateTask.getProcessDefinitionId(); } else { context = cmmn; id = delegateTask.getCaseDefinitionId(); } return new Adapter(context, delegateTask.getProcessEngineServices().getRepositoryService(), id).get(); } private  GetProcessDefinitionKey(); static String from(final DelegateTask delegateTask); static String from(DelegateCaseExecution execution); static String from(DelegateExecution execution); }
GetProcessDefinitionKey { public static String from(final DelegateTask delegateTask) { Context context = null; String id = null; if (delegateTask.getProcessDefinitionId() != null) { context = Context.bpmn; id = delegateTask.getProcessDefinitionId(); } else { context = cmmn; id = delegateTask.getCaseDefinitionId(); } return new Adapter(context, delegateTask.getProcessEngineServices().getRepositoryService(), id).get(); } private  GetProcessDefinitionKey(); static String from(final DelegateTask delegateTask); static String from(DelegateCaseExecution execution); static String from(DelegateExecution execution);  }