formapro / pvm Goto Github PK
View Code? Open in Web Editor NEWBuild workflows, activities, BPMN like processes, or state machines with PVM.
Home Page: https://pvm.forma-pro.com/
License: MIT License
Build workflows, activities, BPMN like processes, or state machines with PVM.
Home Page: https://pvm.forma-pro.com/
License: MIT License
pvm/src/Doctrine/DoctrineDAL.php
Lines 128 to 143 in 2de510d
It seems that both $ormToken is being verified on lines 132 and 141, but it seems that $ormProcess is more logical on line 141.
Version: 0.2.3
example: https://github.com/formapro/pvm/blob/master/docs/sequence-example.md
PHP Fatal error: Uncaught TypeError: Argument 3 passed to Makasim\Values\array_set() must be of the type array, null given, called in C:\DEV\workspace\testing\pvmTest\vendor\makasim\values\src\functions\objects.php on line 81 and defined in C:\DEV\workspace\testing\pvmTest\vendor\makasim\values\src\functions\array.php:24
Stack trace:
#0 C:\DEV\workspace\testing\pvmTest\vendor\makasim\values\src\functions\objects.php(81): Makasim\Values\array_set('transitions.0', Object(Formapro\Pvm\TokenTransition), NULL)
#1 [internal function]: Formapro\Pvm\Token->Makasim\Values\{closure}('transitions', Object(Formapro\Pvm\TokenTransition), 0)
#2 C:\DEV\workspace\testing\pvmTest\vendor\makasim\values\src\functions\objects.php(87): Closure->call(Object(Formapro\Pvm\Token), 'transitions', Object(Formapro\Pvm\TokenTransition), NULL)
#3 C:\DEV\workspace\testing\pvmTest\vendor\formapro\pvm\src\Token.php(67): Makasim\Values\add_object(Object(Formapro\Pvm\Token), 'transitions', Object(Formapro\Pvm\TokenTransition))
#4 C:\DEV\workspace\testing\pvmTe in C:\DEV\workspace\testing\pvmTest\vendor\makasim\values\src\functions\array.php on line 24
I am following your documentation example here:
https://pvm-demo.forma-pro.com/demo/store-to-mysql
I am however using more recent versions. I've had to update a few parts to make it work.
I'm now stuck on this line:
$doctrineDal = new DoctrineDAL($em, OrmProcess::class, OrmToken::class);
According to your example Argument 1 should be the EntityManager instance but for some reason it is expecting ObjectManager.
Everything seems to run fine up until this point...
$config = new Configuration();
$config->setAutoGenerateProxyClasses(true);
$config->setProxyDir(\sys_get_temp_dir());
$config->setProxyNamespace('Proxies');
$config->setQueryCacheImpl(new ArrayCache());
$config->setMetadataCacheImpl(new ArrayCache());
$driver = new MappingDriverChain();
$annotationDriver = $config->newDefaultAnnotationDriver([BASE_DIR . 'app/StoreToDoctrine'], false);
$driver->addDriver($annotationDriver, 'MYAPP\StoreToDoctrine');
$xmlDriver = new SimplifiedXmlDriver([
realpath(BASE_DIR.'vendor/formapro/pvm/src/Doctrine/mapping') => 'Formapro\Pvm\Doctrine',
]);
$driver->addDriver($xmlDriver, 'Formapro\Pvm\Doctrine');
$config->setMetadataDriverImpl($driver);
$encryption = new Encryption();
$dbName = 'test';
$credentials = array (
'test' => array (
'username' => <removed>,
'pw' => <removed>,
'connstr' => <removed>,
'host' => <removed>
)
);
$conn = [
'url' => 'oci8:' . $credentials[$dbName]['username'] .':'. $credentials[$dbName]['pw'] . '@' . $credentials[$dbName]['host'] ."/" . $credentials[$dbName]['connstr'],
'user' => $credentials[$dbName]['username'],
'password' => <removed>,
"connectstring" => $credentials[$dbName]['host'] ."/" . $credentials[$dbName]['connstr']
];
$entityManager = EntityManager::create($conn, $config);
/* Formapro PVM */
use Formapro\Pvm\DefaultBehaviorRegistry;
use Formapro\Pvm\Doctrine\DoctrineDAL;
use Formapro\Pvm\ProcessEngine;
use Formapro\Pvm\Token;
use Formapro\Pvm\ProcessBuilder;
use MYAPP\Doctrine\OrmProcess;
use MYAPP\Doctrine\OrmToken;
$schemaTool = new SchemaTool($entityManager);
$schemaTool->updateSchema($entityManager->getMetadataFactory()->getAllMetadata());
Then I add this:
$doctrineDal = new DoctrineDAL($entityManager, OrmProcess::class, OrmToken::class);
And get the following error:
Fatal error: Uncaught TypeError: Argument 1 passed to Formapro\Pvm\Doctrine\DoctrineDAL::__construct() must be an instance of Doctrine\Common\Persistence\ObjectManager, instance of Doctrine\ORM\EntityManager given, called in <removed>/scripts/myapp.php on line 77 and defined in <removed>/vendor/formapro/pvm/src/Doctrine/DoctrineDAL.php:28
Stack trace:
#0 <removed>/scripts/myapp.php(77): Formapro\Pvm\Doctrine\DoctrineDAL->__construct(Object(Doctrine\ORM\EntityManager), 'MYAPP\\Doctrine\\Or...', 'MYAPP\\Doctrine\\Or...')
#1 {main}
thrown in <removed>/vendor/formapro/pvm/src/Doctrine/DoctrineDAL.php on line 28
I've only been able to find this possible solution online...
But I'm not sure what they mean or how to resolve this.
PHP 8 support
trait CreateTrait must be placed in Yadm directory. But now it just in src/ directory
i follow the docs to examples ,but is doesn't work ,the error strack :
2018-09-27 09:03:54[debug] [ProcessEngine] Start execution: process: 6cb01eda-b421-495f-8f95-fe835fb5c6f8, token: 1b075e07-7c54-4b7
f-a169-a93722b0a180
Fatal error: Uncaught TypeError: Return value of Formapro\Pvm\Token::getCurrentTransition() must be an instance of Formapro\Pvm\Tok
enTransition, null returned in D:\pvm\src\Token.php:80
Stack trace:
#0 D:\pvm\src\ProcessEngine.php(97): Formapro\Pvm\Token->getCurrentTransition()
#1 D:\pvm\src\ProcessEngine.php(78): Formapro\Pvm\ProcessEngine->doProceed(Object(Formapro\Pvm\Token))
#2 D:\pvm\demo\demo1.php(39): Formapro\Pvm\ProcessEngine->proceed(Object(Formapro\Pvm\Token), Object(Formapro\demo\EchoL
ogger))
#3 {main}
thrown in D:\pvm\src\Token.php on line 80
May some using examples?
Non docker.
and docker.
Thx and regards
I am interested in using this library, i noticed there are some breaking changes in master (between v0.2.4 and master) are there many more breaking changes planned for the next release? or have you thought about what might be left before you get to version 1 of this library?
https://twitter.com/maksim_ka2/status/913404270732615680
<?php
public function can(string $nodeLabel, string $action): bool
{
$stateNode = null;
foreach ($this->process->getNodes() as $node) {
if ($node->getLabel() === $nodeLabel) {
$stateNode = $node;
}
}
if (false == $stateNode) {
throw new \LogicException();
}
return (bool) $this->process->getOutTransitionsWithName($stateNode, $action);
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.