- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi,
If the workflow is always 'started' because there is a signal or scheduler activity
then you can just query how many activities (except for signals/schedulers) did not finish running - meaning the workflow is currently running.
You can do something like:
instance.vars.workflowId = <your workflow Id>
instance.vars.running=sqlGetDouble("select count(*) from xtkworkflowtask where iworkflowid= " + instance.vars.workflowId + " and tscompletion is null and sactivity <>'schedule' and sactivity <>'signal' ");
if instance.vars.running > 0 then your workflow is currently running.
Hope it helps,
Sagi
Views
Replies
0 Likes
Total Likes