Launching Smart Push from another Plan Type

Smart Push has been an amazing tool added to the Planning / EPBCS / PBCS developer tool kit, but there are some limitations.  Let's look at an example.

Sometimes when you are working on data in a planning application with more than 2 plan types, you might need to move that data from Plan Type 1 to 2, then to 3.  An example of this might be a case where you have a Financials (FINPLAN) BSO, a Workforce(WFP) BSO, and a Reporting(RPT) ASO.  In this example, you would be working on data in WFP and add employees, these would then calculate any costs associated with the employees and push over to FINPLAN all of the updated costs and headcount.  but once you get that new data in FINPLAN, maybe you also want to update some other cost lines, like cell phone costs, based on the new Employee count.  

Using what is in front of us we could easily set up a Smart Push on the employee form save to move data into FINPLAN, then we could even kick of a rule in FINPLAN to update the downstream costs.  But with that done, we now need to move all of this data into RPT.  If you try to add this Smart Push to the form, you will quickly notice that there is no way to add the FINPLAN to RPT Smart Push.  One way around this is to run a Data Map via Groovy, but that only works if you are an Administrator.  Well if you look at the documentation a little bit closer, there is another option.



Welcome createSmartPush to the chat. 


createSmartPush is a method that is available on the DataMap class, yes, the same one I just said you needed to be an Admin to use. The trick here is that Admin role is required to run a data map, but not required to create a smart push from the data map.  This can be applied to any Grid, but specifically in our case, we can apply this to the grid we got from our Form.  This one magical line of groovy code solves our issues, and now we can apply all 3 steps from our above problem into a single business rule

It's worth noting, that even though you have created your Smart Push, you still will want to pass members into the execution to make sure you are pushing only the slice of data you want, you can pull these off your grid the same way you would for any other POV execution.

Putting it together could look something like this:


I know this is a quick one, but I hope this helps someone out there. Comment bellow if you have any questions, or anything to add.

Comments