Giter Site home page Giter Site logo

nayra's Introduction

ProcessMaker Nayra

ProcessMaker Nayra is a package that provides base classes to implement a process execution engine. This includes patterns to implement activities, events and gateways.

How to execute a process

Load a BPMN definition

        $bpmnRepository = new BpmnDocument();
        $bpmnRepository->setEngine($this->engine);
        $bpmnRepository->setFactory($this->repository);
        $bpmnRepository->load('files/ParallelGateway.bpmn');

ParallelGateway diagram

Get a reference to the process

        $process = $bpmnRepository->getProcess('ParallelGateway');

Create a data storage

        $dataStore = $this->repository->createDataStore();

Create a process instance

        $instance = $this->engine->createExecutionInstance($process, $dataStore);

Trigger the start event

        $start = $bpmnRepository->getStartEvent('StartEvent');
        $start->start($instance);

Start Event

Execute tokens and run to the next state

        $this->engine->runToNextState();

One token arrives to the first task

        $firstTask = $bpmnRepository->getScriptTask('start');
        $token = $firstTask->getTokens($instance)->item(0);

First task

Complete the first task

        $startActivity->complete($token);

Execute tokens and run to the next state

        $this->engine->runToNextState();

One token arrives to the second task and one to the third task

        $secondTask = $bpmnRepository->getScriptTask('ScriptTask_1');
        $token1 = $secondTask->getTokens($instance)->item(0);
        $thirdTask = $bpmnRepository->getScriptTask('ScriptTask_2');
        $token2 = $thirdTask->getTokens($instance)->item(0);

Second task and third task

License

ProcessMaker Nayra is open-sourced software licensed under the Apache 2.0 license.

nayra's People

Contributors

agustinbusso avatar boliviacoca avatar caleeli avatar danloa avatar eiresendez avatar hlorofos avatar marcoantonionina avatar nolanpro avatar ryancooley avatar tdondich avatar viezel 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

nayra's Issues

nayra vs Workflower

Hi,

I'm evaluating BPMN engines in PHP and I've found yours and Workflower. How exactly those 2 differentiate?

Can you provide some guidance how would I do a simple user interactive process like "reject"/"approve"?

Implement the BPMN signal event

The signal event allows sending broadcast messages. A signal has just one property: its name. All listeners of signals will receive it.

Implement the Script Task

As a developer I would like to have a base Trait to implement a Script Task class that will execute my business scripts.

Implement default final model classes for flow elements

As a developer, I would like to have ready to use classes to load and execute BPMN processes.

Implement default final repository classes for BPMN element. For:

Flow classes and repositories:
Process
Activity
Gateway
Event

Remove all Models and Repositories of the test directory

  • Remove the models and repositories and adapt the current tests to the new factory and models implemented in Nayra/Bpmn/Model.
  • If there are some classes in tests/Model that wern't moved yet, move them to the Nayra/Bpmn/Model namespace.

Implement the Parallel Gateway element

Parallel Gateway is used to synchronize multiple concurrent branches (merging behavior). On the
other hand, it is used to spawn new concurrent threads on parallel branches (branching behavior).

Operational Semantics
The Parallel Gateway consumes exactly one token from each incoming Sequence Flow and produces exactly one token at each outgoing Sequence Flow. If there are excess tokens at an incoming Sequence Flow, these tokens remain at this Sequence Flow after execution of the Gateway.

Exception Issues: The Parallel Gateway cannot throw any exception.

Fix the composer.json file

Currently the composer.json file has some wrong parameters like:
name - should be ProcessMaker/nayra
authors - do not add personal information
require - remove laravel dependencies

BPM-9

Complete tests for the first commit of the Nayra engine

Implement the Exclusive Gateway element

As a BPM designer, I want to be able to create processes where a flow can be routed to just one outgoing flow following the definition of the Exclusive Gateway, as defined in the BPM standard

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.