I have a requirement to add 4000 paragraph rules. is there any way I can achieve that without manually creating them one by one. I was looking for some OOTB rule/ activity where in I can feed the paragraph name , ruleset class and all through a file and that in turn creates all the rules.
Instances of a Paragraph rule are like instances of anything else in Pega, and you can automate their creation through an activity. The basic process is to create a new page on the clipboard, populate the properties, and then call the "Accelerate" activity.
I have attached a few screenshots that show how you could construct such an activity to create a Paragraph rule, and an example of the resultant instance. You could modify this to run in a loop, fed from a page list containing the text that needs to be loaded into Paragraph rules -- for each entry, set the .pySourceStream property to the corresponding text.
You might be right about pxCreateRecord being in Pega 7, I do not currently have access to a 6.2 instance to check. That said, the basic outline of the main activity should work, you may just have to track down a different activity to call. You could try running the tracer while you create and save a Paragraph rule to see what activity performs creation behind the scenes, and then use that in place of pxCreateRecord.