Forum Discussion
Krishna
8 months agoValued Contributor
vignesh - The below Code provide you the WF Status in the Grid View. It is a Dashboard Extender Rule. with Parameters. I created the Data Table and populating he output of method query and return to the data Grid. You can create an adapter and call the BR.
If args.DataSetName.XFEqualsIgnoreCase("MyDataSet") Then
Using dbConnApp As DBConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si)
'Create Tables in Memory
Dim WFTable As DataTable = New DataTable("WFSTATUS")
WFTable.Columns.Add("ProfileName")
WFTable.Columns.Add("ScenarioName")
WFTable.Columns.Add("TimeName")
WFTable.Columns.Add("StatusText")
WFTable.Columns.Add("LastExecutedStepStatus")
WFTable.Columns.Add("LastExecutedStepTimeUTC")
WFTable.Columns.Add("LastExecutedStepTimeEST")
Dim WFTime As String = args.NameValuePairs("ParamYear")
Dim WFScenario As String = args.NameValuePairs("ParamScr")
Dim WFName As String = args.NameValuePairs("ParamName")
Dim methodTypeId As String = XFCommandMethodTypeId.WorkflowStatus
'Dim methodQuery As String = "{Total Corporate}{Actual}{" & WFTime & "}{Import Status}{Descendants}{Type ='InputImportChild'}"
Dim methodQuery As String = "{" & WFName &"}{" & WFScenario & "}{" & WFTime & "}{Import Status}{Descendants}{Type ='InputImportChild'}"
Dim resultDataTableName As String = "WFSTATUS"
Dim customSubVars As New Dictionary(Of String, String)
customSubVars.Add("Name","")
customSubVars.Add("Value","")
Dim objDataSet As DataSet = BRApi.Database.ExecuteMethodCommand(dbConnApp,methodTypeId,methodQuery, resultDataTableName,customSubVars)
For Each Row As DataRow In objDataSet.Tables("WFSTATUS").Rows
Dim easternZone = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time")
Dim EST = TimeZoneInfo.ConvertTimeFromUtc(Row.Item("LastExecutedStepTime"), easternZone)
WFTable.Rows.Add(Row.Item("ProfileName"),Row.Item("ScenarioName"),Row.Item("TimeName"),Row.Item("StatusText"),Row.Item("LastExecutedStepStatus"),Row.Item("LastExecutedStepTime"),EST)
Next
Return WFTable
End Using
End If
Related Content
- 11 months ago
- 7 months ago
- 2 years ago
- 2 years ago