Git Product home page Git Product logo

pvm's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pvm's Issues

There seems to be a logic error here

$ormToken = $this->objectManager->getRepository($this->tokenClass)->findOneBy([
'id' => $id,
]);
if (false == $ormToken) {
throw new \LogicException(sprintf('The token with id "%s" could not be found', $id));
}
/** @var \Formapro\Pvm\Doctrine\Process $ormProcess */
$ormProcess = $this->objectManager->getRepository($this->processClass)->findOneBy([
'id' => $ormToken->getProcessId(),
]);
if (false == $ormToken) {
throw new \LogicException(sprintf('The process with id "%s" could not be found', $ormToken->getProcessId()));
}

It seems that both $ormToken is being verified on lines 132 and 141, but it seems that $ormProcess is more logical on line 141.

examples are not working anymore with version > 0.2.0

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

Formapro\Pvm\Doctrine\DoctrineDAL::__construct() must be an instance of Doctrine\Common\Persistence\ObjectManager, instance of Doctrine\ORM\EntityManager given

"formapro/pvm": "^0.4.7"
"symfony/yaml": "3.*"
"doctrine/orm": "^2.6.2",

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...

https://stackoverflow.com/questions/45678333/construct-must-be-an-instance-of-doctrine-common-persistance-objectmanager

But I'm not sure what they mean or how to resolve this.

missing trait

trait CreateTrait must be placed in Yadm directory. But now it just in src/ directory

examples is doesn't work

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

Roadmap request

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.