Returns 'true' if at least one process definition in the {@link BpmnModel} is executable.
480707
protected boolean validateAtLeastOneExecutable(BpmnModel bpmnModel, List<ValidationError> errors) {
	  int nrOfExecutableDefinitions = 0;
		for (Process process : bpmnModel.getProcesses()) {
			if (process.isExecutable()) {
				nrOfExecutableDefinitions++;
			}
		}
		
		if (nrOfExecutableDefinitions == 0) {
			addError(errors, Problems.ALL_PROCESS_DEFINITIONS_NOT_EXECUTABLE,
					"All process definition are set to be non-executable (property 'isExecutable' on process). This is not allowed.");
		}
		
		return nrOfExecutableDefinitions > 0;
  }
1295385
@NullSafe
  public static boolean isRunning(Process process) {
    try {
      return (process != null && process.exitValue() == Double.NaN);
    }
    catch (IllegalThreadStateException ignore) {
      return true;
    }
  }
436102
@Override
	public boolean isMachineRunning( TargetHandlerParameters parameters, String machineId )
	throws TargetException {

		boolean result;
		try {
			final ServiceInstance vmwareServiceInstance = getServiceInstance( parameters.getTargetProperties());
			VirtualMachine vm = getVirtualMachine( vmwareServiceInstance, machineId );
			result = vm != null;

		} catch( Exception e ) {
			throw new TargetException( e );
		}

		return result;
	}
1352044
private static boolean isRunningInWAS() {
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(TRACE, "isRunningInWAS");
        }

        if (inWAS == null) {
            inWAS = Boolean.TRUE;
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(TRACE, "isRunningInWAS", inWAS);
        }
        return inWAS.booleanValue();
    }
1178112
public boolean hasRunCompression() {
    for (int i = 0; i < this.highLowContainer.size(); i++) {
      Container c = this.highLowContainer.getContainerAtIndex(i);
      if (c instanceof RunContainer) {
        return true;
      }
    }
    return false;
  }
717612
def is_executable(path):
  """"""
  return os.path.isfile(path) and os.access(path, os.X_OK)
1241405
public static boolean isPhoenixProcess(Context context) {
        int currentPid = Process.myPid();
        ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
        List<ActivityManager.RunningAppProcessInfo> runningProcesses = manager.getRunningAppProcesses();
        if (runningProcesses != null) {
            for (ActivityManager.RunningAppProcessInfo processInfo : runningProcesses) {
                if (processInfo.pid == currentPid && processInfo.processName.endsWith(":phoenix")) {
                    return true;
                }
            }
        }
        return false;
    }
951794
public synchronized static boolean hasSudo()
	{
		if (!sudoTested)
		{
			String[] cmdArr = new String[]{"which", "sudo"};
			List<String> cmd = new ArrayList<String>(cmdArr.length);
			Collections.addAll(cmd, cmdArr);

			ProcessBuilder whichsudo = new ProcessBuilder(cmd);

			try
			{
				Process p = whichsudo.start();
				try
				{
					Execed e = new Execed(cmd, p, false);

					// Let it run
					int returnCode = e.waitForExit(new Deadline(3, TimeUnit.SECONDS));

					sudoSupported = (returnCode == 0);
					sudoTested = true;
				}
				finally
				{
					p.destroy();
				}
			}
			catch (Throwable t)
			{
				sudoSupported = false;
				sudoTested = true;
			}
		}

		return sudoSupported;
	}
1234454
public void processDI() {

    if (processDefinitions.isEmpty()) {
      return;
    }

    if (!bpmnModel.getLocationMap().isEmpty()) {

      // Verify if all referenced elements exist
      for (String bpmnReference : bpmnModel.getLocationMap().keySet()) {
        if (bpmnModel.getFlowElement(bpmnReference) == null) {
          // ACT-1625: don't warn when artifacts are referenced from DI
          if (bpmnModel.getArtifact(bpmnReference) == null) {
            // Check if it's a Pool or Lane, then DI is ok
            if (bpmnModel.getPool(bpmnReference) == null && bpmnModel.getLane(bpmnReference) == null) {
              LOGGER.warn("Invalid reference in diagram interchange definition: could not find " + bpmnReference);
            }
          }
        } else if (!(bpmnModel.getFlowElement(bpmnReference) instanceof FlowNode)) {
          LOGGER.warn("Invalid reference in diagram interchange definition: " + bpmnReference + " does not reference a flow node");
        }
      }
      
      for (String bpmnReference : bpmnModel.getFlowLocationMap().keySet()) {
        if (bpmnModel.getFlowElement(bpmnReference) == null) {
          // ACT-1625: don't warn when artifacts are referenced from DI
          if (bpmnModel.getArtifact(bpmnReference) == null) {
            LOGGER.warn("Invalid reference in diagram interchange definition: could not find " + bpmnReference);
          }
        } else if (!(bpmnModel.getFlowElement(bpmnReference) instanceof SequenceFlow)) {
          LOGGER.warn("Invalid reference in diagram interchange definition: " + bpmnReference + " does not reference a sequence flow");
        }
      }

      for (Process process : bpmnModel.getProcesses()) {
        if (!process.isExecutable()) {
          continue;
        }

        // Parse diagram interchange information
        ProcessDefinitionEntity processDefinition = getProcessDefinition(process.getId());
        if (processDefinition != null) {
          processDefinition.setGraphicalNotationDefined(true);
          
          for (String edgeId : bpmnModel.getFlowLocationMap().keySet()) {
            if (bpmnModel.getFlowElement(edgeId) != null) {
              createBPMNEdge(edgeId, bpmnModel.getFlowLocationGraphicInfo(edgeId));
            }
          }
        }
      }
    }
  }
637383
def is_main_process():
    
    try:
        from mpi4py import MPI
        comm = MPI.COMM_WORLD
        rank = comm.Get_rank()
        return rank == 0
    except (ImportError, ValueError, RuntimeError):
        return True
662932
public boolean process()
	{
		if (toProcess.size() <= 0)
			return false;

		BlockPos pos = toProcess.removeFirst();
		process(pos);
		if (onProcess != null)
			onProcess.accept(world, pos);

		return true;
	}
1057356
public static boolean isCompensationThrowing(PvmExecutionImpl execution, Map<ScopeImpl, PvmExecutionImpl> activityExecutionMapping) {
    if (CompensationBehavior.isCompensationThrowing(execution)) {
      ScopeImpl compensationThrowingActivity = execution.getActivity();

      if (compensationThrowingActivity.isScope()) {
        return activityExecutionMapping.get(compensationThrowingActivity) ==
            activityExecutionMapping.get(compensationThrowingActivity.getFlowScope());
      }
      else {
        // for transaction sub processes with cancel end events, the compensation throwing execution waits in the boundary event, not in the end
        // event; cancel boundary events are currently not scope
        return compensationThrowingActivity.getActivityBehavior() instanceof CancelBoundaryEventActivityBehavior;
      }
    }
    else {
      return false;
    }
  }
506115
public static final void assertProcessActive(final String processInstanceId) {
        Validate.notNull(processInstanceId);

        apiCallback.debug(LogMessage.PROCESS_1, processInstanceId);
        try {
            getProcessInstanceAssertable().processIsActive(processInstanceId);
        } catch (final AssertionError ae) {
            apiCallback.fail(ae, LogMessage.ERROR_PROCESS_1, processInstanceId);
        }
    }
813953
public static boolean isClientContainer()
    {
        String processType = AccessController.doPrivileged(new PrivilegedAction<String>() {
            @Override
            public String run() {
                return bundleContext.getProperty(WsLocationConstants.LOC_PROCESS_TYPE);
            }
        });
        return Boolean.valueOf(WsLocationConstants.LOC_PROCESS_TYPE_CLIENT.equals(processType));
    }
68709
def executable_exists(executable):
    """"""
    for directory in os.getenv("PATH").split(":"):
        if os.path.exists(os.path.join(directory, executable)):
            return True
    return False
62173
protected boolean isProcessable() {
		
		// Comparaison des modes
		boolean correctMode = DAOValidatorHelper.arraryContains(getAnnotationMode(), this.systemDAOMode);
		
		// Comparaison des instants d'evaluation
		boolean correctTime = DAOValidatorHelper.arraryContains(getAnnotationEvaluationTime(), this.systemEvaluationTime);
		
		// On retourne la comparaison des deux
		return correctMode && correctTime;
	}
556888
public boolean run() {
        boolean passed;
        ExecutionToken t = createExecutionToken();
        List<FeatureToken> features = getFeatureList(t);
        startTests(t, features);
        initializeInterpreter();
        processFeatures(t, features);
        endTests(t, features);
        passed = t.getEndState() == EndState.PASSED || t.getEndState() == EndState.PENDING;
        dispose();
        return passed;
    }