Workflow tasks cleaner
A Jahia 8.2 module that automatically cleans exited or completed workflow tasks (publication, etc.).
Comment installer
Installation
- In Jahia, go to "Administration --> Server settings --> System components --> Modules"
- Upload the JAR workflow-tasks-cleaner-X.X.X.jar
- Check that the module is started
FAQ
GraphQL API
The module exposes a GraphQL API under the WorkflowTasksCleanerQuery and WorkflowTasksCleanerMutations extensions.
Queries
workflowTasksCleanerConfig
Returns the current scheduler configuration (cron expression).
query {
workflowTasksCleanerConfig {
cronExpression
isRunning
tasksScanned
tasksDeleted
tasksFixed
}
}
workflowTasksCleanerWorkflowList
Lists workflow tasks with optional state filter.
query {
workflowTasksCleanerWorkflowList(taskState: ESCALATED) {
taskId
taskName
taskState
processId
processSubject
assignee
createdDate
dueDate
}
}
taskState values: PENDING, IN_PROGRESS, COMPLETED, CANCELLED, EXITED, ESCALATED, SUSPENDED, OBSOLETE
Mutations
workflowTasksCleanerRunClean
Triggers an immediate cleanup of exited/completed tasks. Returns false if a clean is already running.
mutation {
workflowTasksCleanerRunClean
}
workflowTasksCleanerSaveConfig
Saves a new cron expression for the scheduled job. A module restart is required for schedule changes to take effect.
mutation {
workflowTasksCleanerSaveConfig(cronExpression: "0 0 3 * * ?")
}
Admin UI
The module includes a React-based admin UI accessible via the Jahia tools:
- Karaf command line (legacy):
workflow-cleaner:clean,workflow-cleaner:list,workflow-cleaner:task - Admin UI (recommended): Available in the Jahia admin panel under the workflow tasks cleaner section
Karaf Commands (legacy)
workflow-cleaner:list
List all current workflow tasks with human-readable values for task states.
workflow-cleaner:task
Options:
-id(required): The task id--fix: Try to fix the task (reassign groups/users)--delete: Delete the task
workflow-cleaner:task -id 12345 --delete
MIT License
Copyright (c) 2022 - present Florent BOURASSÉ
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.