Posted: 20 Aug 2016 14:38 EDT Last activity: 13 Dec 2016 6:28 EST
Pega integration with Macro
There is a macro written in Excel file which receives certain inputs, does some computations, and delivers certain output. Instead of rewriting the macro logic in Pega step, one idea to save development effort/time is to have Pega call the Macro and run it by providing necessary data, and then receive Macro's output to take the process forward.
1. Is this possible?
1a. If Yes, How to do it?
1b. If No, is the only way to do away with Macro and incorporate all the rules/logic in Pega?
***Updated by moderator: Lochan to add Categories***
If you want to reuse your macro code, I can see you could expose the logic through a web service (e.g., REST service), you can then use connect-REST to consume the service. Calling a platform specific (in this case Microsoft) macro does not seem to be portable. Of course, if your logic is fairly simple and easier to rewrite in pega, you should avoid the trouble of using the connector approach all together.
Pega supports Apache POI library which enables you to read or write Excel files. But to run macro is another thing altogether. You may look at options to run macro using Java and then use the corresponding code in Pega.
For running macro you will need some JAVA-to-COM bridge like JACOB, COM4J or similar tools. You may want to analyse the effort needed to write the rules in Pega or use some bridge to call macro from Java program withing pega.