Code Monkey home page Code Monkey logo

workflower's People

Contributors

77web avatar ateodorescu avatar iteman avatar sirwaddles avatar

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

workflower's Issues

IntermediateCatchEvent/TimerEventDefinition support

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

Type error

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 use in yii2 application

can i integrate this in Yii2 framework (php) application as i need it to install in Yii2 framework application and use it

Sample code

Is there any sample code creating a ProcessContext, Events, and starting the workflow?

Custom Serializations

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.

Serializing Error in ExclusiveGateway Class.

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, )); }

non framework compliant?

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?

Roadmap

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.

SubProcesses

Workflow should support SubProcess activities.

Does Workflower handle subprocess?

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,

CallActivity

Workflow should support CallActivities which are able to instantiate global process definitions.

Slim3 Support

Does this work with slim3 framework? If so do you have any sort of guide or advice for implementing into this.

1.3.0 release

  • Create 1.3 branch for the release if it does not exist
  • Change the branch of the build status in README.md if the branch is newly created (1.3)
  • Change README.md on the release branch. (1.3)
  • Tag to the release on git with the command git tag -s v1.3.0 HEAD (1.3)
  • Push changes to GitHub with the command git push upstream 1.3 and git push upstream --tags (1.3)
  • Create a new draft release as Workflower 1.3.0 (stable) (GitHub)
  • Publish the release
  • Update wiki pages (Home)
  • Update the version in README.md and composer.json from 1.2 to 1.3 if 1.3 branch is newly created (master)
  • Push changes to GitHub with the command git push upstream master (master)
  • Remove unnecessary releases in Packagist
  • Remove unnecessary branches in GitHub
  • Tweet the release

Naming proposal for ProcessInstance

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:

  • creating new ProcessInstances;
  • finding an existing ProcessInstance by id;
  • migrating 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.0 release

  • Create 1.4 branch for the release if it does not exist
  • Change the branch of the build status in README.md if the branch is newly created (1.4)
  • Change README.md on the release branch. (1.4)
  • Tag to the release on git with the command git tag -s v1.4.0 HEAD (1.4)
  • Push changes to GitHub with the command git push upstream 1.4 and git push upstream --tags (1.4)
  • Create a new draft release as Workflower 1.4.0 (stable) (GitHub)
  • Publish the release
  • Update wiki pages (Home)
  • Update the version in README.md and composer.json from 1.4 to 1.5 if 1.4 branch is newly created (master)
  • Push changes to GitHub with the command git push upstream master (master)
  • Remove unnecessary releases in Packagist
  • Remove unnecessary branches in GitHub
  • Tweet the release

PHP Fatal error

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)

Laravel 8

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.

The service "phpmentors_workflower.security_participant" has a dependency on a non-existent service "security.access.role_hierarchy_voter".

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


and install bundle how in docs. But when i open site i see:
image

Process ends when all tokens are consumed

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.

Workflow hints/actions

In trying to build this kind of workflow:
Two path 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.

Initial usage

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

1.2.0 release

  • Create 1.2 branch for the release if it does not exist
  • Change the branch of the build status in README.md if the branch is newly created (1.2)
  • Change README.md on the release branch. (1.2)
  • Tag to the release on git with the command git tag -s v1.2.0 HEAD (1.2)
  • Push changes to GitHub with the command git push upstream 1.2 and git push upstream --tags (1.2)
  • Create a new draft release as Workflower 1.2.0 (stable) (GitHub)
  • Write the description of the release
    • The release date in UTC TZ=UTC date
  • Publish the release
  • Update wiki pages (Home)
  • Update the version in README.md and composer.json from 1.2 to 1.3 if 1.2 branch is newly created (master)
  • Push changes to GitHub with the command git push upstream master (master)
  • Remove unnecessary releases in Packagist
  • Remove unnecessary branches in GitHub
  • Tweet the release

BPMN Diagram Editor

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!

jquery conflict

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.


Composer conflict phpmentors/workflower-bundle 1.3.*

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

  • Create 1.3 branch for the release if it does not exist
  • Change the branch of the build status in README.md if the branch is newly created (1.3)
  • Change README.md on the release branch. (1.3)
  • Tag to the release on git with the command git tag -s v1.3.1 HEAD (1.3)
  • Push changes to GitHub with the command git push upstream 1.3 and git push upstream --tags (1.3)
  • Create a new draft release as Workflower 1.3.1 (stable) (GitHub)
  • Publish the release
  • Update wiki pages (Home)
  • Update the version in README.md and composer.json from 1.2 to 1.3 if 1.3 branch is newly created (master)
  • Push changes to GitHub with the command git push upstream master (master)
  • Remove unnecessary releases in Packagist
  • Remove unnecessary branches in GitHub
  • Tweet the release

can i use in yii2 application,too.

can i use in yii2 application,too.
migrate/up --migrationPath=@ where is it
没有找到数据迁移的数据。
最好添加如何使用的用例或步骤说明,谢谢

Manual

Dear,
Would you have some kind of documentation or example how to youse your code.

Thanx,
Frederick

Installing and running problem

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

Need Demo

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

Terminate End Event

Quotes from BPMN specification (Business Process Model and Notation (BPMN), v2.0.2):

  • "If a token reaches a Terminate End Event, the entire Process is abnormally terminated." (chapter 13.5.6)
  • "For a “terminate” End Event, the Process is abnormally terminated—no other ongoing Process instances are
    affected." (page 443)
  • "For a “terminate” End Event, the Sub-Process is abnormally terminated. In case of a multi-instance Sub-Process,
    only the affected instance is terminated—no other ongoing Sub-Process instances or higher-level Sub-Process or
    Process instances are affected." (chapter 13.5.6)

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.

1.4.1 release

  • Create 1.4 branch for the release if it does not exist
  • Change the branch of the build status in README.md if the branch is newly created (1.4)
  • Change README.md on the release branch. (1.4)
  • Tag to the release on git with the command git tag -s v1.4.1 HEAD (1.4)
  • Push changes to GitHub with the command git push upstream 1.4 and git push upstream --tags (1.4)
  • Create a new draft release as Workflower 1.4.1 (stable) (GitHub)
  • Publish the release
  • Update wiki pages (Home)
  • Update the version in README.md and composer.json from 1.4 to 1.5 if 1.4 branch is newly created (master)
  • Push changes to GitHub with the command git push upstream master (master)
  • Remove unnecessary releases in Packagist
  • Remove unnecessary branches in GitHub
  • Tweet the release

1.0.0 release

  • Create 1.0 branch for the release if it does not exist
  • Change the branch of the build status in README.md if the branch is newly created (1.0)
  • Change README.md on the release branch. (1.0)
  • Tag to the release on git with the command git tag -s v1.0.0 HEAD (1.0)
  • Push changes to GitHub with the command git push upstream 1.0 and git push upstream --tags (1.0)
  • Create a new draft release as Workflower 1.0.0 (stable) (GitHub)
  • Write the description of the release
    • The release date in UTC TZ=UTC date
  • Publish the release
  • Update wiki pages (Home)
  • Update the version in README.md and composer.json from 1.0 to 1.1 if 1.0 branch is newly created (master)
  • Push changes to GitHub with the command git push upstream master (master)
  • Remove unnecessary releases in Packagist
  • Remove unnecessary branches in GitHub
  • Tweet the release

Support for Laravel

Is it possible to use this package with Laravel? if not, is there any package like this for Laravel framework?

1.1.0 release

  • Create 1.1 branch for the release if it does not exist
  • Change the branch of the build status in README.md if the branch is newly created (1.1)
  • Change README.md on the release branch. (1.1)
  • Tag to the release on git with the command git tag -s v1.1.0 HEAD (1.1)
  • Push changes to GitHub with the command git push upstream 1.1 and git push upstream --tags (1.1)
  • Create a new draft release as Workflower 1.1.0 (stable) (GitHub)
  • Write the description of the release
    • The release date in UTC TZ=UTC date
  • Publish the release
  • Update wiki pages (Home)
  • Update the version in README.md and composer.json from 1.1 to 1.2 if 1.1 branch is newly created (master)
  • Push changes to GitHub with the command git push upstream master (master)
  • Remove unnecessary releases in Packagist
  • Remove unnecessary branches in GitHub
  • Tweet the release

Parallel sequence flows

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.

Parallel Gateways & Workflows

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

Workflow events

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

Serialise/deserialise a ProcessInstance

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:

  • id, name, idProcessDefinitionVersion, process data
  • all tokens available
  • all work items available and the activities they are linked to.
  • all sub-process instances and the activities they are linked to (this is not implemented yet)

So the ProcessInstance class could be modified to serialise/deserialise only the data described above. Anyone agrees to this? Anyone working on this already?

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.