We are slowly trying to migrate to a DevOps Ci/CD pipleline based on storing the source of our: :
- FrontEnd (React and Redux ODATA hooks to the REST API)
- Backend (custom BP, BAQ)
- Custom Table field extensions
#1 is going fine. We use BitBucket (GIT) and JEST for testing, and are able to build and deploy with Bamboo
What is turning out to be harder is #2. We can do most of our unit tests with REST calls to the BAQ and BPM services and test expected vs. actual with JEST.
But getting the source of the BAQs and BPMs as text source into BitBucket is a challenge. Yes, you can manually export as XML, but we are looking for command line tools for import and export (so we can deploy from a test host to a target host with a fresh Epicor DB).
Now it turns out that there is a REST call to import a BAQ, but there is no corresponding EXPORT? Epicor support was stumped on this one too (why have one and not the other?)
Yes, there is the Solution Workbench, but again that is a manual tool, with a GUI. There does not seem to be a API we could automate a remote Bamboo/Atlassian system.
Seems like this DevOps is something that would be useful for EPICOR themselves to manage a CI/CD pipeline? Has anyone else looked into this? Are different approaches than what we are trying?
(I expect that #3 - the addition of custom UD table fields can be done via the command line tools on the appserver, and these could be wrapped as powershell scripts that are invoked remotely to do things like schema rebuild, but the BPM and BAQ stuff has us stumped).
NOTE:
We really want individual BAQ and BPMs in text format, so that we can deploy to a test DB system and then run the JEST tests against that and cherry pick the ones that pass the tests to create a new system test system for possible deployment.
1 Like
The dmt cli is good for exporting data from baqs. You could invoke the powershell scripts from your app
Well, it is NOT the Data from BAQ that we need to capture but rather the information associated with the BAQ design(what you get when you do an export of the BAQ in the designer, which has an extension called .baq, but in truth is a zip of XML).
The BO for BAQDesign has a REST interface called /import (custom REST call) but no EXPORT.
I absolutely want to see Epicor User Developers move more in this direction. You may want to checkout what @josecgomez did with the solution explorer which CAN be run at the command line if I understand his post.
2 Likes
You can also easily export the BAQ (Design) using REST and Powershell
The reason why there is no “Export” is because Export is just a serialization of the the GetByID Call on the BAQDesigner Business Object Ice.BO.BAQDesignerSvc
You can see this in a trace if you run it while doing a BAQ Export
So if you are looking to export in a format that can be imported, just do a GetByID Call on REST to the above BO and save the serialized data set
The import method takes the same data set also via REST to import it back in.
4 Likes
I never thought to do this on BAQs! I have always thought to do GetByID in the BLTester where you can serialized the dataset to an XML textfile and then use those datasets as a source of a mock for unit testing.
1 Like
XML, JSON Meh! same cheese different flavor
2 Likes
Well, I had a EPICOR support case open for 2 weeks. They went back and forth with the BAQ developers and the result was that the nix’ed the idea that GetByID returns all the info you need for:
ERP10.2/api/help/methods/Ice.BO.BAQDesignerSvc/index#!/Custom_methods/ImportQuery
also it is a bit even for me to believe that a call that has only 413 lines in the POST JSON covers an entire BAQ?
But @josecgomez, I would trust you over the epicor folks.
Also, what about BPMs, can I use
api/help/methods/Ice.BO.BpMethodSvc/index#!/Custom_methods/GetByID
and the /UpdateEx methods to do the same thing?
It works I’ve done it re:BAQ
I’ll look at BPM
@josecgomez Any reason that the logic you have built in the EpicorDeployement agent, that @Mark_Wonsil mentioned, can’t be used in a UBAQ BPM? Or would it be a bad idea to call the Solution Workbench CL from that Application Server? I’m just thinking of running the UBAQ on a schedule to pick up any new deployments.
this is really cool, and I’d love to learn more before embarking on converting 100 customizations into kinetic
Anybody done anything further?