Open APochmann opened 7 months ago
Just as a hint as it is for sure not the correct solution: If I enhance the original code
if(!$config instanceof \Elements\Bundle\ProcessManagerBundle\Model\Configuration) {
$config = new Configuration();
$config->setExecutorClass(Executor\PimcoreCommand::class);
}
in Helper::executeJob
like this
if(!$config instanceof \Elements\Bundle\ProcessManagerBundle\Model\Configuration) {
$config = new Configuration();
$config->setExecutorClass(Executor\PimcoreCommand::class);
$config->setName('');
$config->setExecutorSettings('{"values":{"group":""}}');
}
al least my code from previous version is running again
Hi @ctippler, would the change described in my last comment be an acceptable fix of the issue? If so, I could create a PR. If not, do you have a better proposal to support start of jobs without predefined configurations?
I run into this issue since migration to pimcore 11 (and therefore ProcessManager 5.x). It seems it's an issue that I do not use predefined configuration but start the job directly and fill some data in the callback function. With ProcessManager 4.x I used parameter
$configId = null
which gave an error in new version so I use empty string now:executeJob
recognizes there is noConfiguration
and creates a new one but with this onegetExecutorClassObject
fails:getExecutorClassObject
(method ofConfiguration
class) is failing on callingsetDataFromResource
by passing its own instance created inexecuteJob
:setDataFromResource
inAbstractExecuter
class tries to get Executer settingsgetExecutorSettings
(method ofConfiguration
class) finally raises the exception as global variable$this->executorSettings
is not initialized yet:I assume, having no predefined configuration is still a valid use case as
executeJob
handles that by creating a newConfiguration
instance. It just seems that this new instance is not initialized in a functional way