I know this is a frequently raised issue, but I need to raise it again.
How do I tell if, and what, Processes are CURRENTLY running?
The Workflow Console and logs only show results for jobs (Workflow Processes) that have been completed.
Is there an API call, perhaps, or some other method to know: what is PlanetPress Workflow doing RIGHT NOW?
My client is a large government print shop and we need to frequently add or modify Workflow Processes. Without knowing if any jobs are currently running, “Send Configuration” is always risky. Maybe the services will restart quickly, or maybe everything, including some other processes that run frequently through the day, will shut down and then the server is stuck running that one big job through to completion and the other processes, and the changes just made, are unavailable for hours.
I need to be able to, at a glance, know if PlanetPress is running any processes, and ideally, what plugin/task it’s currently on within that process.
To my knowledge there is no API that provides the functionality you request BUT, you could achieve this using the Workflow Repository.
The idea is to define a Group for each Workflow process. In each group you define 1 key which will contain a single value 0 or 1.
Each Keyset will refer to each step of the process (or important step like a Execute Datamapping but not a Set Jobs Infos and Variables one, I’ll leave that to you).
At first, for each Keyset would be set to 0, indicating that the corresponding step hasn’t been executed yet. Once it has been executed in a process, you would set it to 1 and so on until the end where you reset all of them to 0.
Now based on that, you can define a Workflow process that queries the Repositoryat specified interval and update a dashboard.
I have implemented something very similar already, using the Data Repository. I’ve even added scripts to both the Data Mappers and Templates we implement to add current record count to the Repository so we can not only know what step a process is on, we know the percentage complete of each step of each job. This all gets serialized out to a JSON file, and is served through AJAX to a web-based Job Status Page.
The issue is, we haven’t retrofitted all of the dozens of processes and hundreds of Connect Resources to use this dashboard (I think I invented the Dashboard concept back in the day when I was with Pitney Bowes!!)
And, not everyone has the time or skill set to build HTML dashboards, so I would like to make this a Feature Request: please add some mechanism within the Workflow Console or the Workflow Configuration screen that displays a list of currently running processes.
Is there any update to this? We really need to have this feature implemented. Seems like a basic functionality that should have been included to begin with, seeing it allows for several process to run concurrently.
Process management feature would tremendously (ability to terminate individual process etc as well) reduce time developing processes. And a huge addition.
While this feature request appears to be perfectly logical and useful, you have to consider that in the vast majority of cases, Workflow processes take much less than a single second to complete. And individual tasks usually complete in a matter of milliseconds.
Any dashboard attempting to display system status would not even have time to refresh itself before the process completes its tasks.
Now there would be ways around this: each process could have an option that allows you to specify whether of not you want to monitor it. This would allow you to only monitor processes that take longer to complete. But then you also need to consider self-replicating processes: a single process can dynamically spawn multiple copies of itself. This is especially self-evident with hot folders that receive batches of files at once: the main process launches several cloned processes but has no way of knowing how many files it has to process since files can continuously be sent to that folder. The same is true of HTTP/NodeJS processes that can handle hundreds of requests simultaneously.
Also, on a very busy system, a monitoring process could actually end up taking vital clock cycles away from the actual work processes, which would be counter-productive.
Again, there are several ways we could handle this, but hopefully these considerations (and there are many more!) should help you understand that this is by no means a simple feature to implement.
By no means a simple feature to implement by the looks in how the software is built and set up.
As for the original poster, mentioned the logs get displayed after a process has finished (console log). I dont know how the logging works here. But one can assume for every task a log is written into a file/database. And can be monitored/read by an external means. As to where Im going with this. For the logs to be available as the process progresses giving “real time” monitoring would suffice or this is what you are referring to not simple implementation.
As for our case we have Council bills process that contain up to 500+ tasks. That could take hours to complete. So we are have no way of knowing if its even running or what percentage or how long it would take. As we need these estimate to send to clients.