Ejemplo n.º 1
0
        protected internal virtual string createCaseInstance(string tenantId)
        {
            VariableMap         variables = Variables.putValue(VARIABLE_NAME, VARIABLE_VALUE);
            CaseInstanceBuilder builder   = caseService.withCaseDefinitionByKey("twoTaskCase").setVariables(variables);

            if (string.ReferenceEquals(tenantId, null))
            {
                return(builder.create().Id);
            }
            else
            {
                return(builder.caseDefinitionTenantId(tenantId).create().Id);
            }
        }
Ejemplo n.º 2
0
        protected internal virtual string createAndCloseCaseInstance(string tenantId)
        {
            string caseInstanceId;

            CaseInstanceBuilder builder = caseService.withCaseDefinitionByKey("oneTaskCase");

            if (string.ReferenceEquals(tenantId, null))
            {
                caseInstanceId = builder.create().Id;
            }
            else
            {
                caseInstanceId = builder.caseDefinitionTenantId(tenantId).create().Id;
            }

            caseService.completeCaseExecution(caseInstanceId);
            caseService.closeCaseInstance(caseInstanceId);

            return(caseInstanceId);
        }
Ejemplo n.º 3
0
        protected internal virtual void createCaseInstance(string tenantId)
        {
            CaseInstanceBuilder builder = caseService.withCaseDefinitionByKey("oneTaskCase");

            builder.caseDefinitionTenantId(tenantId).create();
        }