Destination Data Units

Omkareshwar
Contributor II

Omkareshwar_0-1651056357266.png

I am passing 2 Entities in the Data unit for Calculation as Entity is different in both the destinations 

So what i was expecting is that it will run as a for each loop with both the entities so it will pick enitity1 and then run the Calc and then enitity2 and then run the Calc 

what i was expecting was that the order will remain same every time it will run that is Enitity1 then Enitity2 

but what is happening is that it is first taking enitity1 and then entity2 but when i run it again it is taking enitity2 and then enitity1 in that for each loop 

to solve this i used 2 different DM steps but why it is running like this i want to know 

Can anyone explain why it is running like this ?

Thanks, Omkareshwar
Archetype Consulting
2 ACCEPTED SOLUTIONS

Now I did test it and DM jobs are running the filtered entities in parallel and therefore no order is possible:

ChristianW_0-1651749300278.png

 

View solution in original post

You can call the custom finance business rule for each entity (in the right order) from an extensibility rule:

 

 

BRApi.Finance.Calculate.ExecuteCustomCalculateBusinessRule(si, brName, functionName, nameValuePairs, timeType)

 

 

With nameValuePairs you can pass the pov members.

 

 

Dim povInfo As New Dictionary(Of String, String)

povinfo.Add("Cube", cubeName)
povinfo.Add("Scenario", scenarioMemberName)
povinfo.Add("Entity", entityMemberName)
povinfo.Add("Consolidation", consolidationMemberName)
povinfo.Add("Time", timeMemberName)

brapi.Finance.Calculate.ExecuteCustomCalculateBusinessRule(si, "Your_BusinessRules", "Your_Function", povinfo, CustomCalculateTimeType.MemberFilter)

 

 

 

View solution in original post

9 REPLIES 9

Cosimo
Contributor II

Hi  Omkareshwar,

In your finance calc rule, can you add an api.logmessage("curEntity=" & api.pov.entity.name) and then re-run? I would then review the error log to see these two entries and note if both were executed on the same app server. I also suspect that the data units you are referencing are cached and maybe LRU is being used regardless of left-to-right listing of entities in your DM. Another thought: are you using more than one app or cons server for running DMs? 

 

Curious to know what's happening also!

 

Omkareshwar_0-1651138851577.png

 

 

 

Omkareshwar_1-1651138868356.png

I ran it again and saw the same behavior but after a while it was working fine 

I think it is a bug in the application

Thanks, Omkareshwar
Archetype Consulting

I don't think the entity member filter is supposed to honor the order of the entities. I didn't test it, but it might even be, that the data management job is running the calcs in parallel using different processors.

Now I did test it and DM jobs are running the filtered entities in parallel and therefore no order is possible:

ChristianW_0-1651749300278.png

 

Thanks Christian for the clarification 

So that means to run it in order i have to create different DM steps and run it in a sequence ?

Thanks, Omkareshwar
Archetype Consulting

Yes, I think, that is the easiest set up.

Yes it is easiest setup but there are a lot of DM steps to maintain is their any other way to do the same but without creating a lot of DM steps

Thanks, Omkareshwar
Archetype Consulting

You can call the custom finance business rule for each entity (in the right order) from an extensibility rule:

 

 

BRApi.Finance.Calculate.ExecuteCustomCalculateBusinessRule(si, brName, functionName, nameValuePairs, timeType)

 

 

With nameValuePairs you can pass the pov members.

 

 

Dim povInfo As New Dictionary(Of String, String)

povinfo.Add("Cube", cubeName)
povinfo.Add("Scenario", scenarioMemberName)
povinfo.Add("Entity", entityMemberName)
povinfo.Add("Consolidation", consolidationMemberName)
povinfo.Add("Time", timeMemberName)

brapi.Finance.Calculate.ExecuteCustomCalculateBusinessRule(si, "Your_BusinessRules", "Your_Function", povinfo, CustomCalculateTimeType.MemberFilter)

 

 

 

Thankyou will try this 

Thanks, Omkareshwar
Archetype Consulting