Forum Discussion

RobbSalzmann's avatar
RobbSalzmann
Valued Contributor II
5 days ago

How to Run Workspace Assembly from a Data Management Step In 6 Easy Steps

This was originally a question.It took a while to figure out, so to save someone else the hours of trial and error, here is the process I use in detail, start to finish, to run a Workspace-based Data Management step in a Workspace Assembly business rule.

Here's a How-to step by step:
List of abbreviations used below:
DM: Data Management
WS: Workspace
MU: Maintenance Unit
BR: Business Rule
AS: Assembly

1. Workspace:Set the NameSpace Prefix - this is what gets filled in at runtime for __WSNameSpacePrefix


2. Assemblies: Note these properties

 

3. Create the Assembly Business Rule:Create an "Extender" business rule, this is done by right clicking files and selecting "Extensibility Rules"

Add some test code, to verify correct configuration, such as BRApi.ErrorLog.LogMessage(si, "Hello from the new extender!"then code the way you would any other extender


4. Create The Data Management Group: Create a DataManagement Group in the same workspace that the Assembly that has your business rule is in

 


5. Create a Data Management Step -  Create a DM step in the new DM Group, reference the rule using the pattern:
Workspace.{WorkspacePrefix}.{AssemblyName}.{BusinessRuleName}

In this case it would be: Workspace.Current.DMTestAS.DMTestStepExtender
Note: we could also use 'DMTestWS' instead of 'Current'.We use Current because the DM Step is in the same WS as the Extender Rule.


7. Done! Test the DM Step with run button and check the error log(System Tab -> Logging -> Error Log),for your test code's output.