Package org.jbpm.pvm.internal.wire

Examples of org.jbpm.pvm.internal.wire.WireDefinition


    } else {
      wireContext = targetWireContext;
    }

    if (wireEvents) {
      WireDefinition wireDefinition = wireContext.getWireDefinition();
     
      // if there are objectNames specified
      if (objectNames!=null) {
        // subscribe to the descriptors for the all objectNames
        for (String objectName: objectNames) {
          Descriptor descriptor = wireDefinition.getDescriptor(objectName);
          subscribe(listener, descriptor);
        }
       
      // if no objectNames are specified, subscribe to all the descriptors
      } else {
        Set<Descriptor> descriptors = new HashSet<Descriptor>(wireDefinition.getDescriptors().values());
        for(Descriptor descriptor: descriptors) {
          subscribe(listener, descriptor);
        }
      }
View Full Code Here


   */
  public Object parseDocumentElement(Element documentElement, Parse parse) {
    List<Element> elements = XmlUtil.elements(documentElement);

   
    WireDefinition wireDefinition = parse.contextStackFind(WireDefinition.class);
    if (wireDefinition==null) {
      wireDefinition = new WireDefinition();
    }
   
    parse.contextStackPush(wireDefinition);
    try {
      for (Element descriptorElement: elements) {
        Descriptor descriptor = (Descriptor) parseElement(descriptorElement, parse, CATEGORY_DESCRIPTOR);
       
        // add the descriptor
        if ( (wireDefinition!=null)
             && (descriptor!=null)
           ) {
          wireDefinition.addDescriptor(descriptor);
        }
      }
    } finally {
      parse.contextStackPop();
    }
View Full Code Here

      }
    }

    Element processEngineElement = XmlUtil.element(documentElement, "process-engine-context");
    if (processEngineElement != null) {
      WireDefinition processEngineContextDefinition = configuration.getProcessEngineWireContext().getWireDefinition();
      parse.contextStackPush(processEngineContextDefinition);
      try {
        processEngineContextParser.parseDocumentElement(processEngineElement, parse);
      } finally {
        parse.contextStackPop();
      }
    }

    Element txCtxElement = XmlUtil.element(documentElement, "transaction-context");
    if (txCtxElement != null) {
      WireDefinition transactionContextDefinition = configuration.getTransactionWireDefinition();
      parse.contextStackPush(transactionContextDefinition);
      try {
        transactionContextParser.parseDocumentElement(txCtxElement, parse);
      } finally {
        parse.contextStackPop();
View Full Code Here

  /** looks up the default script manager used for non persistent purposes where
   * no environment is installed. */
  public static synchronized ScriptManager getDefaultScriptManager() {
    if (defaultScriptManager==null) {
      WireDefinition wireDefinition = (WireDefinition) new WireParser()
        .createParse()
        .setString(
          "<objects>" +
          "  <script-manager default-expression-language='juel'" +
          "                  default-script-language='beanshell'>" +
View Full Code Here

      String className = objectDescriptor.getClassName();
      ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
      clazz = Class.forName(className, true, classLoader)
    }
   
    WireContext wireContext = new WireContext(new WireDefinition());
    Object returnValue = ObjectDescriptor.invokeMethod(methodName, argDescriptors, wireContext, target, clazz);
   
    if (variableName!=null) {
      execution.setVariable(variableName, returnValue);
    }
View Full Code Here

TOP

Related Classes of org.jbpm.pvm.internal.wire.WireDefinition

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.