Forum Discussion
- KrishnaValued 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
- sameburnContributor II
Hi vignesh to get the syntax for any method query in OneStream you simply need to (1) Create a data adapter, (2) Set the Command Type to Method and (3) Set the Method Type to WorkflowStatus (as per your request).
When you try and run it it will give you an error that tells you what the syntax is for each method type (see example below)
WorkflowStatus Example: {MyWorkflowProfileName}{Actual}{2015M1}{AllProfiles}{Descendants}{Empty String or Filter Expression}.
Hope this helps
- vigneshNew Contributor II
Hi, Thanks for your response. I am looking for the backend SQL Query/Code that gets executed when this Method Query is run. I have requirement to modify the some values in the default output that we get. If I get how this is being executed in the backend I will check if it can be modified to achieve what i need.
- sameburnContributor II
I would consider modifying the datatable result that you get from running the method query in my last post as the path of least resistance to achieve desired results for your requirement.
- zreka12New Contributor
Is it possible to get the user name who certified the workflow? This information does not appear to be in the method query table.
Related Content
- 7 months ago
- 11 months ago
- 2 years ago
- 2 years ago