{"id":18795317,"url":"https://github.com/dpfaffenbauer/processmanager","last_synced_at":"2025-07-20T14:33:30.225Z","repository":{"id":13232785,"uuid":"73952457","full_name":"dpfaffenbauer/ProcessManager","owner":"dpfaffenbauer","description":"Pimcore Process Manager","archived":false,"fork":false,"pushed_at":"2023-10-18T06:16:43.000Z","size":484,"stargazers_count":31,"open_issues_count":7,"forks_count":20,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-27T14:07:02.255Z","etag":null,"topics":["pimcore","pimcore-plugin"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dpfaffenbauer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-16T19:14:19.000Z","updated_at":"2025-06-10T12:54:08.000Z","dependencies_parsed_at":"2024-06-19T06:16:49.132Z","dependency_job_id":"1ccebaa8-e189-4f64-9ced-286f1c55d1d6","html_url":"https://github.com/dpfaffenbauer/ProcessManager","commit_stats":{"total_commits":119,"total_committers":17,"mean_commits":7.0,"dds":0.6974789915966386,"last_synced_commit":"75b76b0f0ec45df7e6f845a5471ce4e8832785d1"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/dpfaffenbauer/ProcessManager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpfaffenbauer%2FProcessManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpfaffenbauer%2FProcessManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpfaffenbauer%2FProcessManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpfaffenbauer%2FProcessManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dpfaffenbauer","download_url":"https://codeload.github.com/dpfaffenbauer/ProcessManager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpfaffenbauer%2FProcessManager/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266140426,"owners_count":23882672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pimcore","pimcore-plugin"],"created_at":"2024-11-07T21:33:27.085Z","updated_at":"2025-07-20T14:33:30.206Z","avatar_url":"https://github.com/dpfaffenbauer.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pimcore - Process Manager\n\n## Requirements\n - Pimcore 11\n\n[![Software License](https://img.shields.io/badge/license-GPLv3-brightgreen.svg?style=flat)](LICENSE.md)\n\nProcess Manager Plugin keeps track of all your \"long running jobs\". It adds a native GUI and a new portlet for your Dashboard. You can also create Executables and run them with one click. (It's planned to integrate a CRON like Syntax for recurring tasks)\n\n## Plugins using Process Manager\n\n - [DataDefinitions](https://github.com/w-vision/DataDefinitions)\n\n## Getting started\n * Install via composer ```composer require dpfaffenbauer/process-manager:^2.0```\n * Enable via command-line (or inside the pimcore extension manager): ```bin/console pimcore:bundle:enable ProcessManagerBundle```\n * Install via command-line (or inside the pimcore extension manager): ```bin/console pimcore:bundle:install ProcessManagerBundle```\n * Reload Pimcore\n * Open Tools -\u003e Process Manager\n\n## Integrate to your Task\n\n### Create new Process\n\n```php\n$processFactory = $container-\u003eget('process_manager.factory.process');\n$process = $processFactory-\u003ecreateProcess(\n    sprintf(\n        'Process (%s): %s',\n        $date-\u003eformatLocalized('%A %d %B %Y'),\n        'Special Long Running Task'\n    ),                                                  //Name\n    'special_task',                                     //Type\n    'Message',                                          //Message Text\n    100,                                                //Total Steps\n    0                                                   //Current Step\n);\n$process-\u003esave();                                       //Save\n```\n\n### Advance the Progress\n\n```php\n$process-\u003eprogress();\n$process-\u003esave();\n```\n\n### Finish the Progress\n\n```php\n$process-\u003esetProgress($process-\u003egetTotal());\n$process-\u003esave();\n```\n\n## Using the Process Logger\nProcess Manager also provides you with the ability to Log what exactly happens in your progress.\n\n```php\n$logger = $container-\u003eget('process_manager.logger');\n\n//Logs a emergency message\n$logger-\u003eemergency($process, 'Total of 100 entries found');\n\n//Logs a alert message\n$logger-\u003ealert($process, 'Total of 100 entries found');\n\n//Logs a critical message\n$logger-\u003ecritical($process, 'Total of 100 entries found');\n\n//Logs a error message\n$logger-\u003eerror($process, 'Total of 100 entries found');\n\n//Logs a warning message\n$logger-\u003ewarning($process, 'Total of 100 entries found');\n\n//Logs a notice message\n$logger-\u003enotice($process, 'Total of 100 entries found');\n\n//Logs a info message\n$logger-\u003einfo($process, 'Total of 100 entries found');\n\n//Logs a debug message\n$logger-\u003edebug($process, 'Total of 100 entries found');\n```\n\n## Reports\nYou can also further process the log to create a pretty report. To do that, you have to create\na new service and implement the interface `ProcessManagerBundle\\Report\\ReportInterface`.\nImport Definitions has an example implementation of that [Import Definition Report](https://github.com/w-vision/ImportDefinitions/blob/master/src/ImportDefinitionsBundle/ProcessManager/ImportDefinitionsReport.php)\n\n\n\n## Add a new Process Type\n * Add a new Class to your Bundle and implement ``ProcessManagerBundle\\Process\\ProcessInterface``` Interface\n * Add a new Form Type to your Bundle and add required fields to it\n * Add a new Service with tag ```process_manager.process```\n  ```yml\n        import_definition.process_manager.process:\n            class: Wvision\\Bundle\\ImportDefinitionsBundle\\ProcessManager\\ImportDefinitionProcess\n            tags:\n            - { name: 'process_manager.process', type: 'importdefinition', form-type: 'Wvision\\Bundle\\ImportDefinitionsBundle\\Form\\Type\\ProcessManager\\ImportDefinitionsType' }\n  ```\n * Thats it, done. (You still need to handle Process creation within your Bundle yourself, there is no magic behind it)\n\n## Stoppable processes\nYou can implement your process to be stoppable by user via the admin panel.\nYou need to set the stoppable flag of the process to true and it's status to `ProcessManagerBundle::STATUS_RUNNING`\nfor the stop button to shop up:\n\n```\n$process-\u003esetStoppable(true);\n$process-\u003esetStatus(ProcessManagerBundle::STATUS_RUNNING);\n$process-\u003esave();\n```\n\nAdditionally, you need to implement stop logic to your process. Track the process status and stop your process if it's set to `ProcessManagerBundle::STATUS_STOPPING`:\n\n```php\n$process = $this-\u003eprocessRepository-\u003efind($processId);\nif ($process-\u003egetStatus() == ProcessManagerBundle::STATUS_STOPPING) {\n    // Here goes your process stop and cleanup logic\n    ...\n    \n    $process-\u003esetStatus(ProcessManagerBundle::STATUS_STOPPED); // remember to set the status to stopped.\n    $process-\u003esave();    \n}\n```\n## Cleanup command\n\nYou can execute a cleanup command from the console to delete old process entries and log files. To do this on a regular basis, you can add it as a cronjob. \n\n```bash\n# delete all process entries from the database and log files older than 604800 seconds (7 days)\n$ ./bin/console process-manager:cleanup-process-data\n \n# delete all process entries from the database and log files older than 86400 seconds (1 days)\n$ ./bin/console process-manager:cleanup-process-data --seconds=86400\n\n# delete only process entries from the database older than 604800 seconds (7 days) and keep the log files\n$ ./bin/console process-manager:cleanup-process-data --keeplogs\n```\n\n## Copyright and license \nCopyright: [lineofcode.at](http://www.lineofcode.at)\nFor licensing details please visit [LICENSE.md](LICENSE.md)\n\n![Interface](docs/portlet.png)\n![Interface](docs/executables.png)\n![Interface](docs/panel.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpfaffenbauer%2Fprocessmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdpfaffenbauer%2Fprocessmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpfaffenbauer%2Fprocessmanager/lists"}