Snap Execute snap with Oracle Cloud HCM Data Loader (HDL)

We are new customers of Snaplogic and Oracle Cloud HCM and are trying to use Snaplogic for integrations with Oracle Cloud HCM (OC). One of our first projects is to update a flexfield on OC with our custom ID number for each person listed in the a csv file that we will receive from another process. We are using the OC HCM Data Loader (HDL). Outside of Snaplogic we transform the info. from the csv to a “.dat” file in a format that HDL uses, and then zip the file as required by HDL. I have loaded and processed the file manually using HDL so that I know that the file and HDL are working properly. Now I want to use Snaplogic to automate a process to run nightly to update OC

What I want Snaplogic to do is:

Send the zip file to OC.
Initiate the process on OC to process the contents of the zip file.
Store/log the results of the transactions.

I plan on using the SOAP Execute snap for this unless I find a better method.

The first thing I need to know is how to use Snaplogic to send the zip file to OC. It looks like I need the file to be loaded into the envelope in BASE64 format as “Contents”. How do I use Snaplogic to get the file from the server into snaplogic, transform it to BASE64 format and get it into the envelope?

Thanks in advance,
Scott

You can use a File Reader snap to read the file contents. Depending on your setup, you may to create a Binary Account for the snap to use to access the file (i.e. if reading from a FTP server or Windows share).

Then you can use a Binary to Document snap with no decode to make the contents available.

Finally, you use a Mapper snap, use the Base64.encode($content) function to encode the file contents and create the final envelope before calling the SOAP Execute.

This may not be complete for your example, but hopefully it gives you a good start.

Hope this helps!

Thanks Kory! This is very helpful!

Do you mean that I should create the envelope outside of the SOAP Execute snap and then pass the entire envelope in as a parameter somehow, or should I somehow pass the base64 formated file into a variable in an envelope that I previously have built inside the SOAP Execute snap?

Any info. on how to pass the parameters into the envelope would be helpful.

Thanks!
Scott

@swright - You can pass variables into the SOAP Execute snap via the input view and reference them in the “Custom Envelope” window. See the documentation on the snap for an example.

As suggested I used a file reader, then a Binary to Document snap, then Mapper snap, but when I use the Base64.encode($content) in the mapper snap has an error saying that $content is undefined. I’m not sure where I went wrong…

Also, I have the Encode or Decode in the Binary to Document snap set to ‘NONE’ but I notice that it could be set to ENCODE_BASE64. Should I be encoding it here rather than using the function Base64.encode($content) in the Mapper Snap?

Thanks,
Scott

I almost mentioned that you could allow the Binary to Document to encode_base64 and can probably even skip the Mapper snap before the SOAP Execute, assuming there are no other values you need to push into the envelope.

I’m not sure why the Mapper would have an error that $content is undefined after the Binary to Document snap as that is the point of that snap, unless maybe the input view of the Mapper is not really linked. When you Validate, open up the Mapper and make sure you see fields in the Input Schema. If there are no fields listed in the Input Schema, you probably didn’t link the Mapper to the Binary to Document.

Kory,

I was not seeing the Input Schema but the snaps were all connected and seemed to be linked. Is there something special that I have to do to link them other than just connecting them to each other in the GUI? After reading your last message I was looking around for the problem and suddenly I could see the Input Schema and it validated! Somehow I must have caused them to be link I guess… but I don’t know how.

I’ll probably continue using the mapper because I have more items to map anyway.

I found a post that seems closely related to what I am trying to do:

https://community.snaplogic.com/t/soap-execute-snap-attachment-error/5201

I’ll probably use an envelope based on the one they are using so I will probably be passing most of those variables using the Mapper Snap.

They seem to have solved their problem by using something like the following and NOT using base64 so I’m not sure if I should something like that:

<xop:Include
xmlns:xop=“http://www.w3.org/2004/08/xop/include” href=“cid:ArAutoinvoiceImport.zip”/>
</erp:Content>

It seems like this requires mtom. They didn’t mention exactly how they changed the envelope to do this.

Can I (should I) use mtom somehow?

Thanks,

Scott

I will need to defer to others in the Community as this is reaching beyond my current experience. Good luck!

Hi swright,

Have you tried sending the request manually? I usually try the Soap service first using Soap-UI then once that I have successfully invoked the soap service and got a response, I will use the Soap-UI request as my template. Hope this helps

That does help! I had heard about SoapUI but I’ve never used it. I’ll start using it today.

Thanks Mike!

Scott