Skip to main content
Veteran
April 14, 2023

Need to run a business rule before checking the transformation rule.

  • April 14, 2023
  • 2 replies
  • 0 views

I have a extensible rule called "A" to update my Derivative transformation rule group. Now during the workflow execution , i want to run A just before the transformation step.

Requirement

step1- Load the file.

step2 - Before running the transformation , I want to execute A

Query?

Where can I add the business rule so that it runs atleast before the derivative transformation kicks in?

 

 

2 replies

Veteran
April 14, 2023

Hi OS_Pizza  !

I am not sure of understanding but, if you add a workspace before your import, you could use this with a WF event handler to run the rule in the workspace. (Or even Add a button on the workspace).
Do you need the LOAD before the execution of A? Or are you flexible on that part?

OS_PizzaAuthor
Veteran
April 17, 2023

NicolasArgenteA will be updating the transformation table, so requirement would be to run before it transforms the data.

OneStream Employee
April 17, 2023

To capture the moment just before transformation rules are processed, this would be a rule type of TransformationEventHandler, so you would have to put your Extender Rule code into a TransformationEventHandler, where you filter on this particular condition:

If      args.IsBeforeEvent _
AndAlso args.OperationName = BREventOperationType.Transformation.ParseAndTrans.ProcessTransformationRules Then
 ' -- do your stuff just before transformation rules are processed --
End If

However there are two items to be careful about:
- I would be very wary about dynamically updating Transformation rules on the fly (as the question suggests) from a BR that is triggered just before the transformation rules get processed. Remember this is a multi-user and multi-threaded environment.  What if multiple users are performing loads at the same time, and the rule is running concurrently for different users each with different data?

- Note that some Marketplace solutions, such as Transaction Matching (TXM) put their own TransformationEventHandler into the application, so be sure you are not interfering with that if you are using the TXM solution.

OS_PizzaAuthor
Veteran
April 17, 2023

ChrisLoran  I assume that for every transformation, the transformation event handler business will be called.

How do i filter that it runs only for specific workflow profile ?

OS_PizzaAuthor
Veteran
April 17, 2023

I was able to write that

Dim objTransformer As Transformer = DirectCast(args.Inputs(0), Transformer)
Brapi.ErrorLog.LogMessage(si,"objTransformer.WorkflowProfile.Name=" & objTransformer.WorkflowProfile.Name.ToString)