You can create a process as per below description:Use "Query single row"
component in workbench and execute below mentioned query:select status
from tb_process_instance where long_lived_invocation_id = '{$
/process_data/@InstanceID $}';(where "InstanceID" is a string type input
variable for this process).The above query would give you status of the
Process instance you would provide as input.This status would be in
number:1 Running3 CompletedYou can create conditional routes in your
process base...