Examples of InconsistentWorkflowException


Examples of org.data2semantics.platform.exception.InconsistentWorkflowException

   
     
      List<String> errors = new ArrayList<String>();
     
      if(!domain.validate(source, errors)){
        throw new InconsistentWorkflowException(errors);
      }
     
      parseInputAndCouples(builder, moduleName, domain, sourceTail, inputMap, couples);
     
      // ask the domain object for the outputs
View Full Code Here

Examples of org.data2semantics.platform.exception.InconsistentWorkflowException

            boolean print = domain.printInput(sourceTail, inputName);
           
            builder.rawInput(moduleName, description, inputName, inputValue, domain.inputType(sourceTail, inputName), print);
             
          } else
            throw new InconsistentWorkflowException("Module "+moduleName+", input " + inputName + ": value ("+inputValue+") does not match the required data type ("+inputDataType+").");
         
        }
        else
        if(domain.valueMatches(inputValue, inputDataType)){
          boolean print = domain.printInput(sourceTail, inputName);

          builder.rawInput(moduleName, description, inputName, inputValue, domain.inputType(sourceTail, inputName), print);
         
        }
       
        else
          throw new InconsistentWorkflowException("Module "+moduleName+", input " + inputName + ": value ("+inputValue+") does not match the required data type ("+inputDataType+").");
      }
    }
   
    // Process the couple lists
    if(couples != null)
    for(Object couple : couples){
      if(!(couple instanceof List)) throw new InconsistentWorkflowException("Couple info is not a list, it should be a list of input names in this module");
      List <String> coupleLS = (List<String>) couple;
      for(String inputName : coupleLS){
        if(!inputMap.containsKey(inputName)){
          throw new InconsistentWorkflowException("Couple list contains input "+inputName+" which is not defined for this module ");
        }
      }
     
      builder.coupledInputs(moduleName, coupleLS);
    }
View Full Code Here

Examples of org.data2semantics.platform.exception.InconsistentWorkflowException

    {
      List<String> errors = new ArrayList<String>();
     
     
      if(! consistent(errors))
        throw new InconsistentWorkflowException(errors);
     
      for(List<Object> reference : references)
      {
        String moduleName = (String) reference.get(0),
               inputName = (String) reference.get(1),
               description = (String) reference.get(2),
               refModuleName = (String) reference.get(3),
               refOutputName = (String) reference.get(4);
       
        DataType type = (DataType) reference.get(5);
        boolean print = (Boolean) reference.get(6);
       
        ModuleImpl module = workflow.modules.get(moduleName),
                   refModule = workflow.modules.get(refModuleName);
       
        Output refOutput = refModule.output(refOutputName);
        Domain inputDomain = module.domain();
     
        DataType outputType = refOutput.dataType();
        module.addRefInput(inputName, description, refOutput, type, false, print);
       
        if(inputDomain.typeMatches(refOutput, module.input(inputName))){
          // Single reference input case
          ((ReferenceInput) module.input(inputName)).setMultiValue(false);
         
        } else
        if(isList(outputType)){
          ((ReferenceInput) module.input(inputName)).setMultiValue(true);
             
        } else
          throw new InconsistentWorkflowException("Input type of "+moduleName + "."+inputName+" ("+module.input(inputName).dataType()+") and output type "+refModuleName+"."+refOutputName+" ("+outputType+") does not match ");
         
      }
     
      for(List<Object> multiRef : multiReferences){
        String  moduleName   = (String) multiRef.get(0),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.