Forum Discussion
SamKing
3 years agoNew Contributor III
Complete/Revert Workflow BR
Hi All, We're running into a few problems with an existing BR that is used to change the state of the current workflow. The current BR is used in the admin workflow & we haven't encountered any prob...
JackLacava
OneStream Employee
3 years agoYour "me.WorkflowStatusUpdate" call means you have custom code in a function "WorkflowStatusUpdate", further down (or up) in the same business rule file. In that function you might have code that is tripping up the security setup, you might want to post it here for review. Either that, or the specific user really has no access to that workflow at all.
SamKing
3 years agoNew Contributor III
The complete business rule can be found below.
Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardExtenderArgs) As Object
Try
Select Case args.FunctionType
Case Is = DashboardExtenderFunctionType.LoadDashboard
Case Is = DashboardExtenderFunctionType.ComponentSelectionChanged
If args.FunctionName.XFEqualsIgnoreCase("SetAssignedEntity") Then
Brapi.State.SetUserState(si,False,ClientModuletype.Windows,String.Empty, String.Empty, "ParamComboEntity",String.Empty,args.NameValuePairs("AssignedEntity"),Nothing)
'brapi.ErrorLog.LogMessage(si,"PAram Value - " & args.NameValuePairs("AssignedEntity"))
End If
'-------------------------------------------------
'Complete or Revert Workflow
'-------------------------------------------------
If args.FunctionName.XFEqualsIgnoreCase("WorkflowStatusUpdate") Then
Dim strChangeType As String = args.NameValuePairs.XFGetValue("ChangeType")
Dim selectionChangedTaskResult As XFSelectionChangedTaskResult = Me.WorkflowStatusUpdate(si, strChangeType)
Return selectionChangedTaskResult
End If
End Select
On further investigation users with access to the immediate parent workflow are able to execute this business rule for the child workflow. However, if a user only has access to the workflow in question, they're unable to execute the rule.
- JackLacava3 years ago
OneStream Employee
Sam, sorry, that's still not the actual full rule. The rule class by default does not have a WorkflowStatusUpdate method:
There must be a block somewhere else, with "Function WorkflowStatusUpdate" or "Sub WorkflowStatusUpdate", where that call is defined, or the rule is doing some other funky import magic to pull that method into its namespace.
Without seeing what that function does, we can't know what's going on.
Related Content
- 1 year ago