Option to list out all the existing running workflows
ManokarG opened this issue · 2 comments
ManokarG commented
Required an option to list out onboarded workflows and list of running instances of workflows
for example:-
val workflows = client.getWorkflows()
for (val workflow in workflows) {
println(workflow.workflowName) // Workflow Implementation Class Name
println(workflow.workflowId) // Workflow Unique Id that defined in the Workflow Implementation
}
val workflows = client.getWorkflowsInstances() or client.getWorkflowsInstances(setOf("order")) -> Tags
for (val workflow in workflows ){
println(workflow.workflowName) -> Workflow Implementation Class Name
println(workflow.workflowId) -> Static Workflow Unique Id that defined in the Workflow Implementation
println(workflow.workflowRunId) -> Dynamic Workflow Unique Id that defined while starting this workflow, it is used to manage the execution of this workflow like cancelling it.
println(workflow.workflowState) -> Workflow.Started, Workflow.Running, Workflow.Paused, Workflow.Completed.
println(workflow.args) -> Maybe if introduced in future, retreiving input and output args of this running or completed workflow
}
These options may help to implement an ui to show the list of onboarded and running workflows and option to manage them. Or manage it from third party systems.
geomagilles commented
Hello @ManokarG, thx for the suggestion. At short term, it's quite easy to provide a method:
client.getWorkflowIds(HelloWorld.class, tag)
that returns the ids of all running workflows with a tag.
At medium term, a complete UI and APIs will be provided.
geomagilles commented
getWorkflowIds
is available now - please reopen the issue and give more details if this does not fit your needs