phpmentors-jp / workflower Goto Github PK
View Code? Open in Web Editor NEWA BPMN 2.0 workflow engine for PHP
Home Page: https://github.com/phpmentors-jp/workflower/wiki
License: BSD 2-Clause "Simplified" License
A BPMN 2.0 workflow engine for PHP
Home Page: https://github.com/phpmentors-jp/workflower/wiki
License: BSD 2-Clause "Simplified" License
I've built support for the intermediateCatchEvent
with a timerEventDefinition
(although this won't quite work fully in the bundle as the delay/timers are handled separately in my instance)
At the moment, this just adds the specification, interfaces and such. I don't really understand the interim format between the Bpmn2Reader
and the WorkflowBuilder
. On my branch, the WorkflowBuilder
creates a TimerEventDefinition
and the Bpmn2Reader
is expected to pass it back. This doesn't seem like it would match the style of the bundle, or fit with what I think is format-agnostic building.
The main problem is that, there is number of different types of EventDefinitions that could be submitted alongside the CatchEvent, so I'm not sure what the format would look like without using a very large switch/case or something.
I don't mind rebuilding my branch so that it only includes the new elements (mine has some other pretty significant changes as well that I don't think would work upstream.)
Argument 1 passed to PHPMentors\Workflower\Workflow\ProcessInstance::allocateWorkItem() must implement interface PHPMentors\Workflower\Workflow\Activity\WorkItemInterface, instance of PHPMentors\Workflower\Workflow\Activity\Task given, called in /workspaces/shipping-fee-center/vendor/phpmentors/workflower/src/Process/Process.php on line 98[434]
can i integrate this in Yii2 framework (php) application as i need it to install in Yii2 framework application and use it
Is there any sample code creating a ProcessContext, Events, and starting the workflow?
I was wondering if there was a way to implement something to replace PHP's \Serializable
interface and use that on all of the data structures. With a Serializer
interface, so that behaviour can be attached to actually recreating the entities themselves.
Main reason I'm after this is because I have managed Doctrine entities everywhere, and it would be useful to keep them around instead of a shallow copy of them. With an unserializer implementation, I could look for the type and just keep the id and class in the serialized string.
This would break a few things, one major drawback I can imagine is that whenever you serialize/unserialize a workflow, you would need to specify the serializer implementation so the class can trickle down and be available throughout the tree. I wouldn't really want this to be globally available or kept in a registry anywhere because, for me anyway, it would need to be a Symfony service entry.
Also, early on, I wanted to push some data to the frontend React app, so a json version of the tree would be helpful as well.
I intend to work on this, but I was wondering if anyone had any alternative ideas/solutions or different models for the concept.
At line 61 serialize ExclusiveGateway class the attibute defaultSequenceFlow is renamed for defaultSequenceFlowId.
When unserialize the object lost the value of attribute defaultSequenceFlow
public function serialize() { return serialize(array( 'id' => $this->id, 'name' => $this->name, 'role' => $this->role, 'defaultSequenceFlow' => $this->defaultSequenceFlowId, )); }
I am not using symfony framework. i can see in the installation instructions show how to set up with symfony. is this possible to use without a framework?
Do you have a roadmap for further developments? This componenrt seems like a great fit for projects I am working on, but it's not clear what "BPMN 2.0 compliant" means when you don't yet support all flow objects of the standard, and according to the docs unknown flow elements are simply ignored. Are you planning on supporting all elemements, and do you plan to extend the documentation and perhaps the repository with examples? Thanks.
Workflow should support SubProcess activities.
Hi, first of all thank you for this great package. Awesome one!
Recently I've tried to add a sub process to my simple workflow, but I got error about sub process ID.
The question is, does workflower
handle a sub process?
Thanks,
Workflow should support CallActivities which are able to instantiate global process definitions.
Does this work with slim3 framework? If so do you have any sort of guide or advice for implementing into this.
1.3
branch for the release if it does not existREADME.md
if the branch is newly created (1.3)README.md
on the release branch. (1.3)git tag -s v1.3.0 HEAD
(1.3)git push upstream 1.3
and git push upstream --tags
(1.3)Workflower 1.3.0 (stable)
(GitHub)README.md
and composer.json
from 1.2
to 1.3
if 1.3
branch is newly created (master)git push upstream master
(master)According to the BPMN standard an instance of a Process Definition is called Process Instance. I suggest a rename of the Workflow
class to ProcessInstance
.
The WorkflowBuilder
class could become ProcessDefinition
. A ProcessDefinition
could have multiple versions (ProcessDefinitionVersion
) but only one of them is active.
A ProcessInstance
is usually linked to a ProcessDefinitionVersion
.
If we would have a ProcessDefinition
class then we could implement methods for:
ProcessInstances
;ProcessInstance
by id;ProcessInstances
from a version to the latest version.Of course these definition classes could be also implemented by users in their apps.
@iteman What do you think?
1.4
branch for the release if it does not existREADME.md
if the branch is newly created (1.4)README.md
on the release branch. (1.4)git tag -s v1.4.0 HEAD
(1.4)git push upstream 1.4
and git push upstream --tags
(1.4)Workflower 1.4.0 (stable)
(GitHub)README.md
and composer.json
from 1.4
to 1.5
if 1.4
branch is newly created (master)git push upstream master
(master)maybe this library can try to integrate with Symfony's workflow, so we don't use two solutions to solve the same problem.
Hello, when is the 2.0 version expected to be released? What will be improved?
PHP Fatal error: Class PHPMentors\Workflower\Process\WorkItemContext contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (PHPMentors\Workflower\Process\WorkItemContextInterface::getWorkItemId)
I'm looking an actual BPMN engine for PHP. Is this project supported or not already?
I was wondering if anyone has started updating this for Laravel 8.x I am working on a Laravel 8 project for a digital marketing agency and need to automate the advertising campaign submission process. Additionally, I have started using the Camunda gui to construct our business process model. I'm having a difficult time wrapping my head around all of this and where to get started.
Do I need to open a resident process? How do i start it?
Hi!
I install symfony
Symfony
Version 3.3.6
End of maintenance 01/2018
End of life 07/2018
Kernel
Type AppKernel
Name app
Environment dev
Debug true
Charset UTF-8
Root directory ./app
Cache directory ./var/cache/dev (1.5 MiB)
Log directory ./var/logs (1 KiB)
PHP
Version 7.0.20
Architecture 64 bits
Intl locale n/a
Timezone Europe/Moscow (2017-08-23T15:26:39+03:00)
OPcache true
APCu true
Xdebug true
To quote from the BPMN specification: "To continue discussing how flow proceeds throughout the Process, an End Event consumes a token that had been generated from a Start Event within the same level of Process. If parallel Sequence Flows targets the End Event, then the tokens will be consumed as they arrive. All the tokens that were generated within the Process MUST be consumed by an End Event before the Process has been completed." (page 245 from "Business Process Model and Notation (BPMN), v2.0.2")
Basically we have to change the workflow so that when "end" is called we consume the tokens as they arrive. When the last one is consumed we could set the "endDate" as a property on the workflow and also have a "closed" property on the Workflow class.
At the moment "isClosed" is actually checking if all remaining tokens are "End" events.
What do you think @iteman ?
I could push a PR to solve this.
In trying to build this kind of workflow:
I was wondering if there's any way to push the workflow to the appropriate state, depending on which button the user pushes.
At first, I thought I could use allocateWorkItem
, startWorkItem
and completeWorkItem
, as they accept an ActivityInterface
parameter, but they also throw an exception when the passed activity is not the current flow object (why even have the parameter if it can only ever be one thing?)
The only possible solution I can think of is to set the condition on each connecting object to just be the action, and use the processData
to set the "next" step. This seems horrifically messy though, especially when actual conditions come into place (which I would use the ExclusiveGateway
for)
I'm not really certain how I would change workflow direction based on user input in a way that adheres to the BPMN standard either.
Thanks again.
Hello,
I've checked the other posts and they did not cover my issue.
I've installed workflower on my PHP project through Composer using this composer.json:
{
"require": {
"phpmentors/workflower": "1.2.",
"phpmentors/workflower-bundle": "1.0."
}
}
I'd like to know what is the next step to start using this project in order to see a window with a workflow since there is no manual in english.
Thanks
Hi all, i'm render 1 workflow object, how to be parse it to XML ?
1.2
branch for the release if it does not existREADME.md
if the branch is newly created (1.2)README.md
on the release branch. (1.2)git tag -s v1.2.0 HEAD
(1.2)git push upstream 1.2
and git push upstream --tags
(1.2)Workflower 1.2.0 (stable)
(GitHub)TZ=UTC date
README.md
and composer.json
from 1.2
to 1.3
if 1.2
branch is newly created (master)git push upstream master
(master)Tasks should support parallel and sequential work items based on a DataProvider and completionCondition
Can you recommend a BPMN editor for use with Workflower? I tried to use the Eclipse BPMN Modeller as mentioned in the docs, but it doesn't seem to allow setting the ID of components via the UI. I also tried using Camunda but it doesn't seem to be able to set operations on send/service tasks (only via it's custom extensions).
I know I can edit the XML directly, but I'd like to find something that clients could use that supports the BPMN features Workflower uses, thanks!
i have the following conflict
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package npm-asset/jquery (locked at 3.2.1, required as 2.2.4) is satisfiable by npm-asset/jquery[3.2.1] but these conflict with your requirements or minimum-stability.
when executing: composer require phpmentors/workflower "1.4.*" the following problem occurs.
Problem 1
- Installation request for phpmentors/workflower-bundle 1.4.* -> satisfiable by phpmentors/workflower-bundle[v1.4.0].
- Conclusion: remove symfony/cache v5.1.3
- Conclusion: don't install symfony/cache v5.1.3
symfony/cache v5.1.3 is required by phpmentors/workflower (v1.4.1)
1.3
branch for the release if it does not existREADME.md
if the branch is newly created (1.3)README.md
on the release branch. (1.3)git tag -s v1.3.1 HEAD
(1.3)git push upstream 1.3
and git push upstream --tags
(1.3)Workflower 1.3.1 (stable)
(GitHub)README.md
and composer.json
from 1.2
to 1.3
if 1.3
branch is newly created (master)git push upstream master
(master)can i use in yii2 application,too.
migrate/up --migrationPath=@ where is it
没有找到数据迁移的数据。
最好添加如何使用的用例或步骤说明,谢谢
Dear,
Would you have some kind of documentation or example how to youse your code.
Thanx,
Frederick
Hi,
I have downloaded this files to my server and added composer require phpmentors/workflower "1.0.*", and after it I run composer install. There was no error, but I don't know how to run it.
If I try to run mydomain.com/workflower/src/Workflow/WorkflowRepositoryInterface.php it gets error Fatal error: Interface 'PHPMentors\DomainKata\Repository\RepositoryInterface' not found in /home/myusername/public_html/workflower/src/Workflow/WorkflowRepositoryInterface.php on line 18
Please help,
thanks
The deserialisation for Start and End events doesn't work properly.
hi,
This workflower is great but do you have a future plan to write a simple demo? I still feel confused after reading the quick start guide..
Quotes from BPMN specification (Business Process Model and Notation (BPMN), v2.0.2):
Basically when a token reaches the Terminate End Event all other existing tokens should be consumed and the active activities should be cancelled. This means that existing work items should be cancelled. If an activity has sub-processes then those process instances should be cancelled. The ProcessInstance could be marked an abnormally terminated.
I've found an open-source Symfony application with their BPMS built on the top of Workflower:
1.4
branch for the release if it does not existREADME.md
if the branch is newly created (1.4)README.md
on the release branch. (1.4)git tag -s v1.4.1 HEAD
(1.4)git push upstream 1.4
and git push upstream --tags
(1.4)Workflower 1.4.1 (stable)
(GitHub)README.md
and composer.json
from 1.4
to 1.5
if 1.4
branch is newly created (master)git push upstream master
(master)1.0
branch for the release if it does not existREADME.md
if the branch is newly created (1.0)README.md
on the release branch. (1.0)git tag -s v1.0.0 HEAD
(1.0)git push upstream 1.0
and git push upstream --tags
(1.0)Workflower 1.0.0 (stable)
(GitHub)TZ=UTC date
README.md
and composer.json
from 1.0
to 1.1
if 1.0
branch is newly created (master)git push upstream master
(master)Is it possible to use this package with Laravel? if not, is there any package like this for Laravel framework?
1.1
branch for the release if it does not existREADME.md
if the branch is newly created (1.1)README.md
on the release branch. (1.1)git tag -s v1.1.0 HEAD
(1.1)git push upstream 1.1
and git push upstream --tags
(1.1)Workflower 1.1.0 (stable)
(GitHub)TZ=UTC date
README.md
and composer.json
from 1.1
to 1.2
if 1.1
branch is newly created (master)git push upstream master
(master)A sequence flow can have a condition defined on it. When a BPMN 2.0 activity is left, the default behaviour is to evaluate the conditions on the outgoing sequence flows. When a condition evaluates ‘true’, that outgoing sequence flow is selected. When multiple sequence flows are selected that way, multiple executions will be generated and the process is continued in a parallel way.
I make a laravel integration example. This is my repository
https://github.com/rockancun/laravel_workflower
Hi.
Can I use workflower for parallel workflows ?
I don't see parallel gateway in your project.
How about "diverging" and "converging" parallel gateways ?
How about another types of gateways ?
Please tell me how to implement parallel gateways and workflows with workflower ?
Thanks.
Jalaal
This allows an application to call any methods on each workflow event such as the following:
Name | WorkflowEvents Constant | Event's Data |
---|---|---|
TBD | TBD | TBD |
The current implementation of serialisation/deserialisation is not really useful if you want to save process instances in a database. You can't store them serialised because you can't do any kind of report on the process data not to mention sorting/filtering data in a work list..
In a database one would save the following data for a ProcessInstance:
So the ProcessInstance class could be modified to serialise/deserialise only the data described above. Anyone agrees to this? Anyone working on this already?
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.