Search in sources :

Example 91 with CaseInstance

use of org.jbpm.casemgmt.api.model.instance.CaseInstance in project jbpm by kiegroup.

the class AbstractCaseServicesBaseTest method assertCaseInstanceActive.

public void assertCaseInstanceActive(String caseId) {
    try {
        CaseInstance caseInstance = caseService.getCaseInstance(caseId);
        assertThat(caseInstance).isNotNull();
        assertThat(caseInstance.getStatus()).isEqualTo(CaseStatus.OPEN.getId());
    } catch (CaseNotFoundException ex) {
        fail("Case instance is not active");
    }
}
Also used : CaseInstance(org.jbpm.casemgmt.api.model.instance.CaseInstance) CaseNotFoundException(org.jbpm.casemgmt.api.CaseNotFoundException)

Example 92 with CaseInstance

use of org.jbpm.casemgmt.api.model.instance.CaseInstance in project jbpm by kiegroup.

the class AbstractCaseServicesBaseTest method assertCaseInstance.

protected void assertCaseInstance(String caseId, String name) {
    CaseInstance cInstance = caseService.getCaseInstance(caseId, true, false, false, false);
    assertThat(cInstance).isNotNull();
    assertThat(cInstance.getCaseId()).isEqualTo(caseId);
    assertThat(cInstance.getCaseFile()).isNotNull();
    assertThat(cInstance.getCaseFile().getData("name")).isEqualTo(name);
}
Also used : CaseInstance(org.jbpm.casemgmt.api.model.instance.CaseInstance)

Aggregations

CaseInstance (org.jbpm.casemgmt.api.model.instance.CaseInstance)92 AbstractCaseServicesBaseTest (org.jbpm.casemgmt.impl.util.AbstractCaseServicesBaseTest)88 Test (org.junit.Test)88 HashMap (java.util.HashMap)73 CaseFileInstance (org.jbpm.casemgmt.api.model.instance.CaseFileInstance)66 CaseNotFoundException (org.jbpm.casemgmt.api.CaseNotFoundException)49 QueryContext (org.kie.api.runtime.query.QueryContext)49 AdHocFragmentNotFoundException (org.jbpm.casemgmt.api.AdHocFragmentNotFoundException)47 CaseActiveException (org.jbpm.casemgmt.api.CaseActiveException)47 CaseCommentNotFoundException (org.jbpm.casemgmt.api.CaseCommentNotFoundException)47 TaskNotFoundException (org.jbpm.services.api.TaskNotFoundException)47 UserImpl (org.jbpm.services.task.impl.model.UserImpl)47 OrganizationalEntity (org.kie.api.task.model.OrganizationalEntity)46 TaskSummary (org.kie.api.task.model.TaskSummary)42 QueryFilter (org.kie.internal.query.QueryFilter)29 ProcessInstanceDesc (org.jbpm.services.api.model.ProcessInstanceDesc)23 CaseInstanceImpl (org.jbpm.casemgmt.impl.model.instance.CaseInstanceImpl)12 ArrayList (java.util.ArrayList)10 TaskSpecification (org.jbpm.casemgmt.api.dynamic.TaskSpecification)10 CaseStatus (org.jbpm.casemgmt.api.model.CaseStatus)10