E9.2 Extracting BLOB data from F95631 via a Data Request in Orchestrator - Base64?

Luyendijkleo

Member
Hi, I am working on a project where exixting BIP PDF ouputs will be extracted from JDE and sent to an external Content Manager location via a REST service.

For several reasons it is not recommended that we locate the PDF files one by one in what my be a variety of output folders, then encode and move them across the REST service. We think a better approach would be to read the BLOB data from F95631 into and Orchestration and from there call the REST service.

Orcacle states that the BLOB data field in F95631 holds the BIP PDF output in compressed binary format (whereas the BLOB field in F95630 holds the XML source in binary)

When extracting the BLOB data via a Data Request in Orchestrator the data appears to automatically translate to Base64. Base64 can easilly be converted back to the pdf it was defined from, but I find the conversion from Base 64 to pdf to fail. I.e.,when I convert the Base64 (the extracted BLOB field) to PDF it creates a pdf, but fails to open due to reasons I am trying to discover. It must be related to the extract of the BLOB field. Below is a sample of what the data looks like when exracted into an Orchestration.

Any ideas?

Much appreciated

Leo

e.g.
eJyMugN0Zs22NdxxR52kY9u2bdsdGx3btm3btm27Y9vml35P9z33/t+54/ufjJGnaq2queauqrWfWbU3oYyAECUtFQM0BCMODY6lrik0BAcHNAS1grOVAQ61irSuqYGe3Wdd3l7X7h+T6E8dI4NPg5CJuZ2BDQ61kLmOnYGAgZ6l/m+rhIGFkZ0xDgMrHc1nTdlE/7NCR8/4WRYxMDEytsOhpfnt4DOxs5UxsOG3/GllaWFgYYfD8mnktzS3tJG30tH7jCJg4GCiZyAnzAcNwcUFDWFrZ2Og8xMawintTAP8h8JiO6hArmgKSmreT82VxP38hbaC+kqT2IXEaJ3qCtncgaLppAEByVLnpBLaeRp0n9aveMC8tCQD7siwjj944BD04WSAFWAFlAzQmy7Y6f16xtodz8fSk9m7njw+Mrn7bSc5D9g33jI/VHVQIP7zx1okcyTtBbFVI0FcgwUCQj4LsMBKv844+ZldQpJNPnkoDtPw/ELnXJAWxFuiW43ogFw3EdQaguVKMqaGJolDsSVzVyZewsaMJKFFCUEDEhZxDiSZ13JKf+FAYoVgm5v62y5CoVMrgV5Fu/S6vfw82XXITR4BAgKHMYnBiPT3bp6iw7dsuV+ic3Stl6CxdDHDKaOrmoKvTGme8vFzZbIigYPMyWC0Eu90RLZEsbcJt891YzHtQXkXfvQwkzThMPn7cT0JU1x47rRuFAihJAo2Z8s9sB449yQQBiXyyfsuxaiFsNDAoEG4N25Jc9MzpaMTAVFA1bA5jm4Nj06kbJBqdfoyWlUJzc8Zt2Q2sOzcXlBQuIYCEwgR4AJeKCurSRvBQGovS/m8EuedIq/SazX4X1ool4d/ZEqlhe2uHP4IQAFq8+Zke67lRgtJ
 
the output generated by BIP is not BASE64 but BINARY. the BINARY can be converted to PDF only with oracle APIs.
if u want to send the bulk output, the best option is to use P95641 save output to any location and convert as needed.
This soemthing we generally do and always work out.
But beware, this works only above JDE 9 I believe.
 
Hi Alex,

One question, you should send PDF when batch is executed at runtime, or you send BIPublisher old? If its runtime, you can create a rest connector with put or patch rest method and get the pdf by job number and server or file. I've integrated with Sharepoint and send BIPublisher files getting the job number and server and set to File
1708004864598.png

If you need send old files, Barg propose a good solution, in P95641 define path output and in P95620 define a files name, it will save on enterprise server and you could send a file with the complete route.

Regards.
 
Sorry. Alfred, I did not understand your question, please rephrase.
 
I tested with DREQ f95631 and it's seems base64 but not is, because I compare the same document convert to base64 and string returned by orchestrator and not is equal. And I try convert this base64 to PDF in web tools and get error. I don't know what it's but this way it's not right, I'll continue investing.
 
Alex with all due respect, if you can code it, so can we.
We're here to help one another not help ourselves ;)
My point was that everyone reinventing their own bicycle is not a productive use of time, however pleasant it may be. And also, your bicycle would not help anyone else, even if you share the blueprints...
 
This rang a bell. Found this snippet of test code in a unit test I had so maybe it give some clue how to pull the data out of F95631. You would most likely have to create a BSFN then wrap that with an Orch call. Again this was just test code in a unit test in our custom BSFN unit tester so no idea of it is correct or really what I was trying to accomplish but maybe it gives you and idea.

jdeBufferUncompress is the key here and the API that Bargslmha eluded too.

Code:
    if(JDB_OpenTable(    hUser, NID_F95631, (ID)0,
                            colRpt, (ushort)DIM(colRpt),
                            (JCHAR *)NULL, &hReqRpt) != JDEDB_PASSED

        || JDB_SelectKeyed(hReqRpt, ID_F95631_OUTGUID, &keyRpt, (short)1) != JDEDB_PASSED)
    {
        m_acmebfu_assertTrue(pTest, _J("Open Table"), _J("Open Table Failed"), FALSE, FALSE);
        goto TearDown;
    }

   
    while(JDB_Fetch(hReqRpt, &recRpt, 0) == JDEDB_PASSED)
    {
        DSD5800007M dsAddBodyByPtr = {0};
        ZCHAR *pzBipOut = (ZCHAR *)NULL;
        JCHAR *pszBodyChunk = (JCHAR *)NULL;
        size_t nsize = 0;

        if(!recRpt.data.lpValue || recRpt.data.lSize == 0)
            continue;

        jdeBufferUncompress(    (BYTE **)&pzBipOut,
                                    (size_t *)&nsize,
                                    (const BYTE *)recRpt.data.lpValue,
                                    recRpt.data.lSize);

        if(!pzBipOut)
            continue;

...
 
the output generated by BIP is not BASE64 but BINARY. the BINARY can be converted to PDF only with oracle APIs.
if u want to send the bulk output, the best option is to use P95641 save output to any location and convert as needed.
This soemthing we generally do and always work out.
But beware, this works only above JDE 9 I believe.
Thanks for your input
 
This rang a bell. Found this snippet of test code in a unit test I had so maybe it give some clue how to pull the data out of F95631. You would most likely have to create a BSFN then wrap that with an Orch call. Again this was just test code in a unit test in our custom BSFN unit tester so no idea of it is correct or really what I was trying to accomplish but maybe it gives you and idea.

jdeBufferUncompress is the key here and the API that Bargslmha eluded too.

Code:
    if(JDB_OpenTable(    hUser, NID_F95631, (ID)0,
                            colRpt, (ushort)DIM(colRpt),
                            (JCHAR *)NULL, &hReqRpt) != JDEDB_PASSED

        || JDB_SelectKeyed(hReqRpt, ID_F95631_OUTGUID, &keyRpt, (short)1) != JDEDB_PASSED)
    {
        m_acmebfu_assertTrue(pTest, _J("Open Table"), _J("Open Table Failed"), FALSE, FALSE);
        goto TearDown;
    }

  
    while(JDB_Fetch(hReqRpt, &recRpt, 0) == JDEDB_PASSED)
    {
        DSD5800007M dsAddBodyByPtr = {0};
        ZCHAR *pzBipOut = (ZCHAR *)NULL;
        JCHAR *pszBodyChunk = (JCHAR *)NULL;
        size_t nsize = 0;

        if(!recRpt.data.lpValue || recRpt.data.lSize == 0)
            continue;

        jdeBufferUncompress(    (BYTE **)&pzBipOut,
                                    (size_t *)&nsize,
                                    (const BYTE *)recRpt.data.lpValue,
                                    recRpt.data.lSize);

        if(!pzBipOut)
            continue;

...
Thanks for your input
 
Hi Alex,

One question, you should send PDF when batch is executed at runtime, or you send BIPublisher old? If its runtime, you can create a rest connector with put or patch rest method and get the pdf by job number and server or file. I've integrated with Sharepoint and send BIPublisher files getting the job number and server and set to File
View attachment 20065

If you need send old files, Barg propose a good solution, in P95641 define path output and in P95620 define a files name, it will save on enterprise server and you could send a file with the complete route.

Regards.
Hi, thanks for the input.
 
Back
Top