src/Runtime/RuntimeService.php
public function startProcessInstance(ProcessDefinition $def, $businessKey = null, array $variables = [])
    {
        $startNode = $def->findNoneStartEvent();
        
        $id = $this->engine->executeCommand(new StartProcessInstanceCommand($def, $startNode, $businessKey, $variables));
        
        return $this->engine->getHistoryService()->createHistoricProcessInstanceQuery()->processInstanceId($id)->findOne();
    }
public function startProcessInstance(ProcessDefinition $def, $businessKey = null, array $variables = [])
    {
        $startNode = $def->findNoneStartEvent();
        
        $id = $this->engine->executeCommand(new StartProcessInstanceCommand($def, $startNode, $businessKey, $variables));
        
        return $this->engine->getHistoryService()->createHistoricProcessInstanceQuery()->processInstanceId($id)->findOne();
    }
public function startProcessInstance ( ProcessDefinition $ def , $ businessKey = null , array $ variables = [ ] ) { $ startNode = $ def -> findNoneStartEvent ( ) ; $ id = $ this -> engine -> executeCommand ( new StartProcessInstanceCommand ( $ def , $ startNode , $ businessKey , $ variables ) ) ; return $ this -> engine -> getHistoryService ( ) -> createHistoricProcessInstanceQuery ( ) -> processInstanceId ( $ id ) -> findOne ( ) ; }
Start a process from the given definition using a singular

@param ProcessDefinition $def
@param string $businessKey
@param array<string, mixed> $variables
@return HistoricProcessInstance
Start a process from the given definition using a singular