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.
RobbSalzmann
1 year agoValued Contributor II
KH1 I would use parameters to signal decision logic which object to invoke via the service factory. If you delegate this to yet another object, you've made an already complicated solution to a simple requirement even more complicated by using one factory pattern to to call another factory pattern to then call the actual business logic.
That said, I'm still figuring out how to or if I should make use of the 'itemName' parameter in the CreateWsAssemblyServiceInstance method signature.
Note: "parameter" here refers to the arguments in a method signature, not workspace parameters.
e.g. 'nameList' in: public function GetIds(nameList as List(Of String)) as String
I'm in a similar boat trying to figure out how to use an assembly to run logic for a DataManagement Step.
Related Content
- 1 year ago
- 13 days ago