Package io.apigee.trireme.core.internal

Examples of io.apigee.trireme.core.internal.ScriptRunner$Activity


        @JSFunction
        @SuppressWarnings("unused")
        public static Object getOSRelease(Context cx, Scriptable thisObj, Object[] args, Function func)
        {
            ScriptRunner runner = getRunner(cx);
            if ((runner.getSandbox() != null) &&
                runner.getSandbox().isHideOSDetails()) {
                return HIDDEN_OS_RELEASE;
            }
            return System.getProperty("os.version");
        }
View Full Code Here


        @SuppressWarnings("unused")
        public static Object getInterfaceAddresses(Context cx, Scriptable thisObj, Object[] args, Function func)
                throws SocketException
        {
            Scriptable obj = cx.newObject(thisObj);
            ScriptRunner runner = getRunner(cx);

            Enumeration<NetworkInterface> nets = NetworkInterface.getNetworkInterfaces();
            // Only include non-loopback interfaces if we are not "hiding" the OS details.
            for (NetworkInterface netIf : Collections.list(nets)) {
                if ((runner.getSandbox() == null) ||
                    !runner.getSandbox().isHideOSDetails() ||
                    netIf.isLoopback()) {

                    List<InterfaceAddress> ifAddresses = netIf.getInterfaceAddresses();
                    Scriptable ifAddressesArray = cx.newArray(thisObj, ifAddresses.size());
View Full Code Here

        throws NodeException
    {
        ModuleRegistry registry = getRegistry();

        if ((scriptFile == null) && (script == null)) {
            runner = new ScriptRunner(this, env, sandbox, args, forceRepl);
        } else if (scriptFile == null) {
            runner = new ScriptRunner(this, env, sandbox, scriptName, script, args);
        } else {
            runner = new ScriptRunner(this, env, sandbox, scriptFile, args);
        }
        runner.setRegistry(registry);
        runner.setParentProcess((ProcessWrap.ProcessImpl)parentProcess);
        if (workingDir != null) {
            try {
View Full Code Here

        if (scriptFile == null) {
            throw new NodeException("Modules must be specified as a file name and not as a string");
        }
        ModuleRegistry registry = getRegistry();

        runner = new ScriptRunner(this, env, sandbox, scriptName,
                                  makeModuleScript(), args);
        runner.setParentProcess((ProcessWrap.ProcessImpl)parentProcess);
        runner.setRegistry(registry);
        if (workingDir != null) {
            try {
View Full Code Here

    /**
     * An internal method to retrieve the "process" argument for sending events.
     */
    public Scriptable _getProcessObject()
    {
        ScriptRunner runner = _getRuntime();
        return (runner == null ? null : runner.getProcess());
    }
View Full Code Here

        List<FlowElement> flowElements = container.getFlowElements();
        for (FlowElement fElement : flowElements) {
            if (fElement instanceof StartEvent) {
                triggerElements.add(0, fElement);
            } else if((fElement instanceof Activity) && BPMN2Utils.isContainerAdHoc(container)) {
                Activity act = (Activity) fElement;
                if(act.getIncoming() == null || act.getIncoming().size() == 0) {
                    triggerElements.add(0, fElement);
                }
            } else if (fElement instanceof IntermediateCatchEvent) {
               
                IntermediateCatchEvent act = (IntermediateCatchEvent) fElement;
                if(act.getIncoming() == null || act.getIncoming().size() == 0) {
                    triggerElements.add(0, fElement);
                }
               
                List<EventDefinition> eventDefinitions = ((IntermediateCatchEvent) fElement)
                        .getEventDefinitions();
View Full Code Here

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.ACTIVITY: {
            Activity activity = (Activity) theEObject;
            T result = caseActivity(activity);
            if (result == null)
                result = caseFlowNode(activity);
            if (result == null)
                result = caseFlowElement(activity);
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetAttachedToRef(Activity newAttachedToRef, NotificationChain msgs) {
        Activity oldAttachedToRef = attachedToRef;
        attachedToRef = newAttachedToRef;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.BOUNDARY_EVENT__ATTACHED_TO_REF, oldAttachedToRef,
                    newAttachedToRef);
View Full Code Here

        }
      }
     
      if (flowElement instanceof BoundaryEvent) {
        BoundaryEvent boundaryEvent = (BoundaryEvent) flowElement;
        Activity activity = retrieveAttachedRefObject(boundaryEvent.getAttachedToRef().getId(), process.getFlowElements());
       
        if (activity == null) {
          LOGGER.warn("Boundary event " + boundaryEvent.getId() + " is not attached to any activity");
        } else {
          boundaryEvent.setAttachedToRef(activity);
          activity.getBoundaryEventRefs().add(boundaryEvent);
        }
      } else if (flowElement instanceof SubProcess) {
        SubProcess subProcess = (SubProcess) flowElement;
        postProcessElements(process, subProcess.getFlowElements(), flowSourceMap, flowTargetMap);
      }
View Full Code Here

    for (FlowElement flowElement : flowElementList) {
      if (attachedToRefId.equals(flowElement.getId())) {
        return (Activity) flowElement;
      } else if (flowElement instanceof SubProcess) {
        SubProcess subProcess = (SubProcess) flowElement;
        Activity activity = retrieveAttachedRefObject(attachedToRefId, subProcess.getFlowElements());
        if (activity != null) {
          return activity;
        }
      }
    }
View Full Code Here

TOP

Related Classes of io.apigee.trireme.core.internal.ScriptRunner$Activity

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.