Forum Discussion

aricgresko's avatar
aricgresko
Contributor III
4 days ago

Call Assembly Business Rule from another Workspace in a Data Management Step

I'm looking to call a business rule that is located in a different workspace within Assemblies but am unsuccessful.  The first screenshot below shows my DM step configuration.  The business rule I'm trying to call is an out-of-the-box rule within the Financial Close solution. The second screenshot shows the workspace (namespace prefix = OFC), the assembly (RCM) and the business rule (DiscoverRecons).  The third screenshot shows the tool tip when you hover over "Business Rules" on the DM step.  I've attempted many variations of the yellow highlighted syntax, always returning an invalid business rule error.  The fourth screenshot shows the out-of-the-box DM step I'm emulating.  I used this to verify the parameters I'm passing in work which they do. 

I've ensured that both the current workspace and OFC workspaces are sharable and include the shared workspace names.  

Does anyone know the correct syntax to call this rule into my DM step?

Screenshot #1Screenshot #2

 

Screenshot #3Screenshot #4

 

2 Replies

  • JackLacava's avatar
    JackLacava
    Icon for OneStream Employee rankOneStream Employee

    The problem here is the nature of the code you're trying to call. Data Management steps can either call:

    • A traditional Extender, which is a class that must have a Main function accepting 4 specific parameters; or
    • a Service Factory, which in turn will provide a Data Management Service with a specific method to call.

    From the WSMU reference you see in the original step, we can deduce that OFC is doing the latter: it's calling a Service Factory set in the properties of the current Maintenance Unit (-MU) in the current Workspace (WS-). You can try pointing to that factory with "Workspace.OFC.RCM.WSMU" (or something like that, I don't remember the details of RCM maintenance units), but there is no guarantee it will work - because that factory likely assumes to be called in specific ways as part of OFC operations only.

    If that doesn't work, you will have to write your own Factory which somehow invokes that code. If you examine the code of the original factory, you will also find that it's also doing something a bit funky, implementing the service through custom classes that implement a parent event-like class. You might be able to copy all that stuff too, but it will require careful examination of the code to figure out what you need and what you don't need.

    In short, it's probably not as simple as just pointing at that code...

    • aricgresko's avatar
      aricgresko
      Contributor III

      Thanks for the detailed feedback, Jack.  Workspace.OFC.RCM.WSMU didn't work but did trigger a different error message along the lines of what you were describing.  Here it is for reference.


      On a related note, the way I've historically handled automating these functions for clients is through an Extensibility Rule called by a DM job.  I would add the three Imports statements (rows 17-19) currently commented out and use some bits and pieces from those rules within my Extender Rule.  In v9 these rules have moved into Assemblies so I can no longer use this exact methodology.  Lines 20-34 are my attempt to find the appropriate rules within the RCM Assembly to accomplish what I had done previously.  

      I was thinking that line 29 (Workspace.OFC.RCM.Legacy.SolutionHelper) would replace line 17 (OneStream.BusinessRule.DashboardExtender.RCM_SolutionHelper), for example.  Any guidance on how to solve this issue I am running into?