Package org.huihoo.workflow.rules.interpretor

Examples of org.huihoo.workflow.rules.interpretor.ScriptInterpretor


    List outTrans = new ArrayList();
    WorkflowActivity workActivity = workflowWork.getWorkflowActivity();
    List transList = workActivity.getOutgoingTransitions();
    WorkflowProcess workflowProcess = workActivity.getWorkflowProcess();
    WorkflowPackage workflowPackage = workflowProcess.getWorkflowPackage();
    ScriptInterpretor interpretor = workflowService.getScriptInterpretor();

    RuntimeContext context = null;
    WorkflowCase workflowCase = workflowWork.getWorkflowCase();
    WorkflowCaseContext caseContext = workflowCase.getCaseContext();

    int sizeTrans = transList.size();
    if (sizeTrans > 0)
    {
      WorkflowTransition transition = null;

      for (int i = 0; i < sizeTrans; ++i)
      {
        if (context != null)
        {
          context.clear();
        }
        transition = (WorkflowTransition) transList.get(i);
        context = genParameterConext(caseContext, transition);

        WorkflowCondition conditon = transition.getCondition();
        if (conditon == null)
        {
          log.debug("[filterOutTransition_xorSplit] ACCEPT transition:" + transition.getInfo() + " | condition: " + conditon);
          outTrans.add(transition);
          break;
        }
        else
        {
          if (interpretor.evalute(workflowWork, transition, context))
          {
            log.debug("[filterOutTransition_xorSplit] ACCEPT transition:" + transition.getInfo() + " | condition: " + conditon);
            try
            {
              updateContext(workflowProcess, operator, caseDatabase, userTransaction, context, caseContext, false);
View Full Code Here


    List outTrans = new ArrayList();
    WorkflowActivity workActivity = workflowWork.getWorkflowActivity();
    List transList = workActivity.getOutgoingTransitions();
    WorkflowProcess workflowProcess = workActivity.getWorkflowProcess();
    WorkflowPackage workflowPackage = workflowProcess.getWorkflowPackage();
    ScriptInterpretor interpretor = workflowService.getScriptInterpretor();

    RuntimeContext context = null;
    WorkflowCase workflowCase = workflowWork.getWorkflowCase();
    WorkflowCaseContext caseContext = workflowCase.getCaseContext();

    List rejectTrans = new ArrayList();

    int sizeTrans = transList.size();
    if (sizeTrans > 0)
    {
      WorkflowTransition transition = null;

      for (int i = 0; i < sizeTrans; ++i)
      {
        if (context != null)
        {
          context.clear();
        }
       
        transition = (WorkflowTransition) transList.get(i);
        context = genParameterConext(caseContext, transition);

        WorkflowCondition conditon = transition.getCondition();
        if (conditon == null)
        {
          outTrans.add(transition);
          log.debug("[filterOutTransition_orSplit] ACCEPT transition:" + transition.getInfo() + " | condition: " + conditon);
        }
        else
        {
          if (interpretor.evalute(workflowWork, transition, context))
          {
            log.debug("[filterOutTransition_orSplit] ACCEPT transition:" + transition.getInfo() + " | condition: " + conditon);
            try
            {
              updateContext(workflowProcess, operator, caseDatabase, userTransaction, context, caseContext, false);
View Full Code Here

        }
        if (caseDatabase.getSchemaContext() == null)
        {
          caseDatabase.setSchemaContext(schemaContext);
        }
        ScriptInterpretor scriptInterpretor = new JavaInterpretor();
        scriptInterpretor.initialize(context.getScriptContext());
        context.setCaseDatabase(caseDatabase);
        context.setUserDatabase(userDatabase);
        context.setScriptInterpretor(scriptInterpretor);
       
        if (context.getEngine().getService().getNamingServer() != null)
View Full Code Here

TOP

Related Classes of org.huihoo.workflow.rules.interpretor.ScriptInterpretor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.