Forum Discussion
sudarshan
3 years agoNew Contributor III
Assuming you are trying to do this in a rule:
You can query the TaskActivityTable with status = 1000 to indicate it is currently running.
Dim dt As DataTable = Nothing
Dim sequence as String = "Task1" 'The name of the DM sequence
Dim sql As String = "SELECT TaskActivityStatus FROM TaskActivity WHERE Description = '" & sequence & "' AND TaskActivityStatus = 1000"
'Query the table
Using dbConnApp As DbConnInfo = BRApi.Database.CreateFrameworkDbConnInfo(si)
dt = BRAPi.Database.ExecuteSql(dbConnApp,sql,False)
End Using
'if the following check passes then there is a process currently running
If dt IsNot Nothing AndAlso dt.Rows.Count < 1
'Do something
End If
Related Content
- 6 months ago
- 3 years ago
- 8 months ago