Forum Discussion
KH1
1 year agoContributor III
Service Factory - Data Management Step
We're moving most of the Business Rules to Workspaces Assemblies under PV 8.4. - We have several Extensibility Rules that are run by multiple Data Management (DM) Jobs like you. - Hence, we include...
- 1 year ago
In addition to Daniel's response, I think it is good practice to use the service factory only as the initial router to point to a single service (file). In that service file I would apply the conditional logic.
In the below example, I call only Data Set and Component Service files from the SF and then apply all the conditional logic in those two files. The actual different data set and component code is then in files in my HelperFiles folder.
KH1
1 year agoContributor III
Namespace Workspace.__WsNamespacePrefix.__WsAssemblyName
Public Class _0_01_SF
Implements IWsAssemblyServiceFactory
Public Function CreateWsAssemblyServiceInstance(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal workspace As DashboardWorkspace, ByVal wsasType As WsAssemblyServiceType, ByVal itemName As String) As IWsAssemblyServiceBase Implements IWsAssemblyServiceFactory.CreateWsAssemblyServiceInstance
Try
Select Case wsasType
Case Is = WsAssemblyServiceType.Component
'Return New WsasComponent()
Case Is = WsAssemblyServiceType.Dashboard
'Return New WsasDashboard()
Case Is = WsAssemblyServiceType.DataManagementStep
Return New Delete_Batch_Folders_Ex_S()
Return New Delete_Dim_Members_Ex_S()
Return New Direct_WF_Cube_Ex_S()
Case Is = WsAssemblyServiceType.FinanceCustomCalculate
Return New Act_Copy_Scenario_Fin()
Case Else
Return Nothing
End Select
Return Nothing
Catch ex As Exception
Throw New XFException(si, ex)
End Try
End Function
End Class
End Namespace
Related Content
- 1 year ago
- 13 days ago