├── .styleci.yml ├── resources ├── img │ ├── 42workflows.png │ ├── workflow_concept.png │ └── nature_background.jpeg ├── views │ ├── fields │ │ ├── text_field.blade.php │ │ ├── dropdown_field.blade.php │ │ ├── data_bus_resource_field.blade.php │ │ ├── trix_input_field.blade.php │ │ └── text_input_field.blade.php │ ├── parts │ │ └── button_trigger.blade.php │ ├── layouts │ │ ├── task_node_html.blade.php │ │ ├── workflow_app.blade.php │ │ ├── conditions_overlay.blade.php │ │ ├── logs_overlay.blade.php │ │ └── settings_overlay.blade.php │ ├── create.blade.php │ ├── edit.blade.php │ ├── index.blade.php │ └── diagram.blade.php ├── fonts │ ├── iconfont │ │ ├── MaterialIcons-Regular.eot │ │ ├── MaterialIcons-Regular.ttf │ │ ├── MaterialIcons-Regular.woff │ │ ├── MaterialIcons-Regular.woff2 │ │ └── MaterialIcons-Regular.ijmap │ └── nunito-sans-v5-latin │ │ ├── nunito-sans-v5-latin-regular.eot │ │ ├── nunito-sans-v5-latin-regular.ttf │ │ ├── nunito-sans-v5-latin-regular.woff │ │ └── nunito-sans-v5-latin-regular.woff2 ├── sass │ ├── workflow.scss │ └── _drawflow.scss ├── js │ └── workflow.js ├── lang │ └── en │ │ └── workflows.php └── css │ └── drawflow.min.css ├── src ├── Fields │ ├── TextField.php │ ├── FieldInterface.php │ ├── DropdownField.php │ ├── TextInputField.php │ ├── TrixInputField.php │ └── Fieldable.php ├── Triggers │ ├── ReRunTrigger.php │ ├── ObserverTrigger.php │ ├── WorkflowObservable.php │ ├── ButtonTrigger.php │ └── Trigger.php ├── DataBuses │ ├── Resource.php │ ├── ConfigResource.php │ ├── ValueResource.php │ ├── DataBusResource.php │ ├── DataBussable.php │ ├── DataBus.php │ └── ModelResource.php ├── WorkflowsFacade.php ├── Tasks │ ├── SaveModel.php │ ├── HttpStatus.php │ ├── DomPDF.php │ ├── RunCommand.php │ ├── Execute.php │ ├── PregReplace.php │ ├── TaskInterface.php │ ├── ChangeModel.php │ ├── SendSlackMessage.php │ ├── LoadModel.php │ ├── SendMail.php │ ├── HtmlInput.php │ ├── TextInput.php │ └── Task.php ├── Workflow.php ├── Notifications │ └── SlackNotification.php ├── Loggers │ ├── TaskLog.php │ └── WorkflowLog.php ├── Jobs │ └── ProcessWorkflow.php ├── WorkflowsServiceProvider.php ├── Workflows.php └── Http │ └── Controllers │ └── WorkflowController.php ├── mix-manifest.json ├── CHANGELOG.md ├── public ├── fonts │ └── vendor │ │ └── @fortawesome │ │ └── fontawesome-free │ │ ├── webfa-solid-900.eot │ │ ├── webfa-solid-900.ttf │ │ ├── webfa-brands-400.eot │ │ ├── webfa-brands-400.ttf │ │ ├── webfa-brands-400.woff │ │ ├── webfa-brands-400.woff2 │ │ ├── webfa-regular-400.eot │ │ ├── webfa-regular-400.ttf │ │ ├── webfa-regular-400.woff │ │ ├── webfa-solid-900.woff │ │ ├── webfa-solid-900.woff2 │ │ └── webfa-regular-400.woff2 └── js │ └── workflow.js.LICENSE.txt ├── database └── migrations │ ├── 2020_04_30_130710_create_workflows_table.php │ ├── 2020_04_30_133430_create_task_logs_table.php │ ├── 2020_06_23_154141_create_triggers_table.php │ ├── 2020_04_30_130638_create_tasks_table.php │ ├── 2020_07_09_173228_create_workflow_logs_table.php │ └── 2022_02_21_173228_update_cascade_delete.php ├── webpack.mix.js ├── LICENSE.md ├── composer.json ├── package.json ├── CONTRIBUTING.md ├── CODE_OF_CONDUCT.md ├── config └── config.php └── README.md /.styleci.yml: -------------------------------------------------------------------------------- 1 | preset: laravel 2 | 3 | disabled: 4 | - single_class_element_per_statement 5 | -------------------------------------------------------------------------------- /resources/img/42workflows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42coders/workflows/HEAD/resources/img/42workflows.png -------------------------------------------------------------------------------- /resources/img/workflow_concept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42coders/workflows/HEAD/resources/img/workflow_concept.png -------------------------------------------------------------------------------- /resources/img/nature_background.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42coders/workflows/HEAD/resources/img/nature_background.jpeg -------------------------------------------------------------------------------- /resources/views/fields/text_field.blade.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/Fields/TextField.php: -------------------------------------------------------------------------------- 1 | value" df-name> 2 | @foreach($options as $optionValue => $optionName) 3 | 4 | @endforeach 5 | 6 | -------------------------------------------------------------------------------- /src/Triggers/ReRunTrigger.php: -------------------------------------------------------------------------------- 1 | triggerable->start($log->elementable); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /resources/views/fields/data_bus_resource_field.blade.php: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /resources/js/workflow.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | $.ajaxSetup({ 4 | headers: { 5 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 6 | } 7 | }); 8 | 9 | import queryBuilder from 'jQuery-QueryBuilder/dist/js/query-builder.standalone'; 10 | window.queryBuilder = queryBuilder; 11 | 12 | import Drawflow from './drawflow'; 13 | window.Drawflow = Drawflow; 14 | -------------------------------------------------------------------------------- /resources/views/parts/button_trigger.blade.php: -------------------------------------------------------------------------------- 1 |
7 | -------------------------------------------------------------------------------- /src/DataBuses/Resource.php: -------------------------------------------------------------------------------- 1 | 'model', 9 | ]; 10 | 11 | public static $output = [ 12 | 'Output' => 'output', 13 | ]; 14 | 15 | public static $icon = ''; 16 | 17 | public function execute(): void 18 | { 19 | $model = $this->getData('model'); 20 | 21 | $model->save(); 22 | 23 | $this->setData('output', $model); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Tasks/HttpStatus.php: -------------------------------------------------------------------------------- 1 | 'url', 11 | ]; 12 | 13 | public static $output = [ 14 | 'HTTP Status' => 'http_status', 15 | ]; 16 | 17 | public static $icon = ''; 18 | 19 | public function execute(): void 20 | { 21 | $this->setData('http_status', Http::get($this->getData('url'))->status()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Tasks/DomPDF.php: -------------------------------------------------------------------------------- 1 | 'html', 11 | ]; 12 | 13 | public static $output = [ 14 | 'PDFFile' => 'pdf_file', 15 | ]; 16 | 17 | public static $icon = ''; 18 | 19 | public function execute(): void 20 | { 21 | $pdf = Pdf::loadHTML($this->getData('html')); 22 | $this->setDataArray('pdf_file', $pdf->output()); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Tasks/RunCommand.php: -------------------------------------------------------------------------------- 1 | 'command', 11 | ]; 12 | 13 | public static $output = [ 14 | 'Command Output' => 'command_output', 15 | ]; 16 | 17 | public static $icon = ''; 18 | 19 | public function execute(): void 20 | { 21 | 22 | $this->setData('command_output', Artisan::call($this->getData('command'))); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /public/js/workflow.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * Sizzle CSS Selector Engine v2.3.5 3 | * https://sizzlejs.com/ 4 | * 5 | * Copyright JS Foundation and other contributors 6 | * Released under the MIT license 7 | * https://js.foundation/ 8 | * 9 | * Date: 2020-03-14 10 | */ 11 | 12 | /*! 13 | * jQuery JavaScript Library v3.5.1 14 | * https://jquery.com/ 15 | * 16 | * Includes Sizzle.js 17 | * https://sizzlejs.com/ 18 | * 19 | * Copyright JS Foundation and other contributors 20 | * Released under the MIT license 21 | * https://jquery.org/license 22 | * 23 | * Date: 2020-05-04T22:49Z 24 | */ 25 | -------------------------------------------------------------------------------- /src/Tasks/Execute.php: -------------------------------------------------------------------------------- 1 | 'command', 9 | ]; 10 | 11 | public static $output = [ 12 | 'Command Output' => 'command_output', 13 | ]; 14 | 15 | public static $icon = ''; 16 | 17 | public function execute(): void 18 | { 19 | chdir(base_path()); 20 | dd(shell_exec($this->getData('command').' 2>&1')); 21 | $this->setData('command_output', shell_exec($this->getData('command'))); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /resources/views/layouts/task_node_html.blade.php: -------------------------------------------------------------------------------- 1 |