Sets the process (the what) that functionally modified this object.

@param modifyingProcess an object denoting the process that modified this object.
@see org.cp.elements.lang.Auditable
481072
@SuppressWarnings("unchecked")
  public void setModifiedWith(PROCESS modifyingProcess) {
    processChange("modifiedWith", this.modifiedWith, modifyingProcess);
    this.lastModifiedWith = ObjectUtils.defaultIfNull(this.lastModifiedWith, this.modifiedWith);
  }
369111
public function setSource(Processable $source)
    {
        if ($source instanceof ExpressionProcessor) {
            parent::setSource($source);
        } else {
            $msg = "ExpressionProcessingException::setSource only accept ExpressionProcessor objects.";
            throw new InvalidArgumentException($msg);
        }
    }
328581
public void configureProcessDefinitionQuery(ProcessDefinitionQueryImpl query) {
    configureQuery(query, PROCESS_DEFINITION, "RES.KEY_");

    if (query.isStartablePermissionCheck()) {
      AuthorizationCheck authorizationCheck = query.getAuthCheck();

      if (!authorizationCheck.isRevokeAuthorizationCheckEnabled()) {
        CompositePermissionCheck permCheck = new PermissionCheckBuilder()
            .atomicCheck(PROCESS_DEFINITION, "RES.KEY_", Permissions.CREATE_INSTANCE)
            .build();

        query.addProcessDefinitionCreatePermissionCheck(permCheck);

      } else {
        CompositePermissionCheck permissionCheck = new PermissionCheckBuilder()
            .conjunctive()
            .atomicCheck(PROCESS_DEFINITION, "RES.KEY_", READ)
            .atomicCheck(PROCESS_DEFINITION, "RES.KEY_", Permissions.CREATE_INSTANCE)
            .build();
        addPermissionCheck(authorizationCheck, permissionCheck);
      }

    }

  }
807666
public function setProcess(ProcessInterface $process)
    {
        $this->process = $process;
        $this->setClient($process->getClient());

        return $this;
    }
569569
public void verifyProcessDefinitionsDoNotShareKeys(
      Collection<ProcessDefinitionEntity> processDefinitions) {
    Set<String> keySet = new LinkedHashSet<String>();
    for (ProcessDefinitionEntity processDefinition : processDefinitions) {
      if (keySet.contains(processDefinition.getKey())) {
        throw new ActivitiException(
            "The deployment contains process definitions with the same key (process id attribute), this is not allowed");
      }
      keySet.add(processDefinition.getKey());
    }
  }
1276672
public static synchronized void setProcess(String applicationName, String scopedInstancePath, Process process) {
		PROCESS_MAP.put(toAgentId(applicationName, scopedInstancePath), process);
	}
320736
@Transactional
	public void execute(ProcessInstance processInstance) {
		HashIdLogger.log(this,"execute");
		TaskBase task = getCurrentTask(processInstance);
		if (processInstance.getStatus() == TaskStatus.DONE) {
			return;
		}
		while (true) {
			log.debug("processInstanceId={} processName={} taskId={} status={}",processInstance.getId(),task.getOwnerProcess().getName(),task.getTaskId(), processInstance.getStatus());
			boolean b = true;
			Audit audit = createAudit(processInstance, task);
			try {
				if (processInstance.getStatus()==TaskStatus.ABORTING)
				{
					// Someone (external) set our status to ABORTING.
					// Don't attempt to execute the current instruction just throw an abort error.
					throw new AbortException(processInstance.getComment());
				}
				if (processInstance.getStatus()==TaskStatus.TIMEOUT)
				{
					// Just throw an exception and the exception handler looks after it.
					throw new TimeoutException();
				}
				if (processInstance.getStatus()==TaskStatus.GO)
				{
					if (task instanceof TaskEnd) {
						throw new WorkflowException("Trying to restart an end task, should never happen "+task.toString());
					}
					log.debug("moving on from "+task.toString());
					// simple search for the task after this one.
					task = task.getNextTask(processInstance);
					if (task == null) {
						// There is no task, this should never happen
						throw new WorkflowException("Failed to find a next task");
					}
					// Not the end of the process, so ensure the next task is pending.
					audit.setTaskId(task.getTaskId());
					audit.setProcessDefinitionName(task.getOwnerProcess().getName());
					audit.setComment(trimComment(task.toString()));
					audit.setHandler(task.getHandler());
					task.loadTask(processInstance);
				}
				audit.setStatus(TaskStatus.PENDING);
				ProcessInstanceUtils.clearQueue(processInstance, TaskStatus.PENDING);
				b = task.execute(processInstance);
			} catch (ContinueException e) {
				task = getCurrentTask(processInstance);
				continue;
			} catch (RetryException e) {
				task = getCurrentTask(processInstance);
				continue;
			} catch (ErrorException e) {
				audit.setStatus(TaskStatus.ERROR);
				if (!handleError(processInstance)) {
					// no appropriate handler, fall back to abort handler
					audit.setStatus(TaskStatus.ERROR);
					audit.setInterrupted(true);
					if (!handleAbort(processInstance)) {
						// Still no handler so we are screwed
						// Setting this status in the process 
						// instance will stop it
						processInstance.setStatus(TaskStatus.ABORTED);
					}
				} else {
					task = getCurrentTask(processInstance);
					continue;
				}
			} catch (AbortException e) {
				audit.setInterrupted(true);
				audit.setStatus(TaskStatus.ABORTED);
				audit.setComment(e.getMessage());
				if (!handleAbort(processInstance)) {
					// No handler found so just force an abort
					// Setting this status in the process instance will stop it
					processInstance.setStatus(TaskStatus.ABORTED);
					tickleParentProcess(processInstance,TaskStatus.ABORTED); // this should abort the sibling processes as well as the parent.
					break;
				} else {
					task = getCurrentTask(processInstance);
					continue;
				}
			} catch (TimeoutException e) {
				processInstance.getAudits().remove(audit);
				if (!handleTimeout(processInstance, audit)) {
					// No handler found so just force an abort
					// Setting this status in the process instance will stop it
					processInstance.setStatus(TaskStatus.ABORTED);
					tickleParentProcess(processInstance,processInstance.getStatus());
					break;
				} else {
					task = getCurrentTask(processInstance);
					continue;
				}
			}
			if (!b) {
				// task was not completed, exit the loop
				processInstance.setStatus(TaskStatus.WAIT);
				audit.setStatus(TaskStatus.WAIT);
				break;
			} else {
				if (task instanceof TaskEnd) {
					endOfProcessDetected(processInstance,audit);
					break;
				} else if (task instanceof TaskTry) {
					task = ((TaskTry)task).getFirstTask();
				} else if (task instanceof TaskIf) {
					task = ((TaskIf)task).getConditionalTask(processInstance);
				} else {
					task = getCurrentTask(processInstance).getNextTask(processInstance);
				}
				if (task == null) {
					throw new WorkflowException("Trying to step to a task when there is none");
				}
				// Not the end of the process, so ensure the next task is pending.
				task.loadTask(processInstance);
			}
		}
	}
939161
@Override
  public void visit(final Visitable visitable) {
    if (visitable instanceof Auditable) {
      modified |= ((Auditable) visitable).isModified();
    }
  }
943176
private function addProcessInfo(Process $process, Project $project)
    {
        $this->processes[$project->getName()] = [
            'process' => $process,
            'project' => $project,
        ];
    }
1351850
public void setProcessName(java.util.Collection<StringFilter> processName) {
        if (processName == null) {
            this.processName = null;
            return;
        }

        this.processName = new java.util.ArrayList<StringFilter>(processName);
    }
162410
@PreUpdate
    @PrePersist
    private void changeAuditInformation(Auditable auditableEntity) {
        Timestamp lastUpdated = new Timestamp(System.currentTimeMillis());
        auditableEntity.setLastUpdated(lastUpdated);
        String lastUpdatedBy = ServiceContextStore.getCurrentUser();
        auditableEntity.setLastUpdatedBy(lastUpdatedBy);
        if (auditableEntity.getCreatedDate() == null)
            auditableEntity.setCreatedDate(lastUpdated);
        if (auditableEntity.getCreatedBy() == null)
            auditableEntity.setCreatedBy(lastUpdatedBy);
    }
101423
protected void ensureProcessDefinitionInitialized() {
    if ((processDefinition == null) && (processDefinitionId != null)) {
      ProcessDefinitionEntity deployedProcessDefinition = Context.getProcessEngineConfiguration().getDeploymentCache()
          .findDeployedProcessDefinitionById(processDefinitionId);
      setProcessDefinition(deployedProcessDefinition);
    }
  }
1242062
def set_process(self, process = None):
        
        if process is None:
            self.dwProcessId = None
            self.__process   = None
        else:
            self.__load_Process_class()
            if not isinstance(process, Process):
                msg  = "Parent process must be a Process instance, "
                msg += "got %s instead" % type(process)
                raise TypeError(msg)
            self.dwProcessId = process.get_pid()
            self.__process = process
1127627
public void setModifiedOn(LocalDateTime modifiedOn) {
    processChange("modifiedOn", this.modifiedOn, modifiedOn);
    this.lastModifiedOn = ObjectUtils.defaultIfNull(this.lastModifiedOn, this.modifiedOn);
  }
1161581
@Modified
    protected void modified(Map<String, Object> map) {

        // Build up the list of filters in a local list, then convert that to an array
        // and assign to the static reference. This is done to avoid creating an iterator
        // in the main path in `process`.
        List<SpanFilter> filters = new ArrayList<SpanFilter>();

        /*
         * Removing filter processing until microprofile spec for it is approved. Expect to add this code
         * back in in 1Q18 - smf
         */
//        processFilters(filters, map, configAdmin, "excludeSpans", ExcludeFilter.class);
//        processFilters(filters, map, configAdmin, "includeSpans", IncludeFilter.class);

        SpanFilter[] finalFilters = new SpanFilter[filters.size()];
        filters.toArray(finalFilters);

        allFilters = finalFilters;
    }
1050285
public void addProcess(Process process) {
        ResourceTypePackageRegistry rtps = getResourceTypePackages();
        ProcessPackage rtp = ProcessPackage.getOrCreate(rtps);
        rtp.add(process);
    }
873937
public void updateProcessDefinitionSuspensionStateById(String processDefinitionId, SuspensionState suspensionState) {
    Map<String, Object> parameters = new HashMap<String, Object>();
    parameters.put("processDefinitionId", processDefinitionId);
    parameters.put("suspensionState", suspensionState.getStateCode());
    getDbEntityManager().update(ProcessDefinitionEntity.class, "updateProcessDefinitionSuspensionStateByParameters", configureParameterizedQuery(parameters));
  }