2019-07-19 09:56:20 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
|
|
|
|
|
|
use Maveriks\WebApplication;
|
2019-09-17 17:22:39 -04:00
|
|
|
use ProcessMaker\Core\System;
|
2019-07-19 09:56:20 -04:00
|
|
|
|
|
|
|
|
trait AddParametersTrait
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create a new queue command.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function __construct()
|
|
|
|
|
{
|
|
|
|
|
$this->signature .= '
|
|
|
|
|
{--workspace=workflow : ProcessMaker Indicates the workspace to be processed.}
|
|
|
|
|
{--processmakerPath=./ : ProcessMaker path.}
|
|
|
|
|
';
|
|
|
|
|
|
|
|
|
|
$this->description .= ' (ProcessMaker has extended this command)';
|
|
|
|
|
|
|
|
|
|
parent::__construct();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Execute the console command.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function handle()
|
|
|
|
|
{
|
|
|
|
|
$workspace = $this->option('workspace');
|
|
|
|
|
if (!empty($workspace)) {
|
2019-09-17 17:22:39 -04:00
|
|
|
System::readServerInfoFile($workspace);
|
2019-07-19 09:56:20 -04:00
|
|
|
$webApplication = new WebApplication();
|
|
|
|
|
$webApplication->setRootDir($this->option('processmakerPath'));
|
|
|
|
|
$webApplication->loadEnvironment($workspace);
|
|
|
|
|
}
|
|
|
|
|
parent::handle();
|
|
|
|
|
}
|
|
|
|
|
}
|