JDE Release 22 Makes Working with Attachments (Media Objects) Easier
We did an overview of several exciting new features for Orchestrator in JDE EnterpriseOne Release 22. But a few of them deserve a deeper dive. Working with media objects/attachments is on that list. The latest update changes the way users can handle file based content. The “Attachment” subcomponent can handle many types of files such as:
- Text Notes
- Office Documents
- Other Files
A Better Way to Handle Attachments in JDE
Before the latest JDE update, it was possible to add text or a URL using a REST or Open API connector. The new attachment component is a simpler, cleaner way of dealing with attachments inside the orchestration and allows for the use of files as both inputs and outputs.
Now, we can also add files as inputs and outputs to an orchestration. Orchestrator can then act on and use these files in several ways, such as:
- Adding them as attachments to records in JDE
- Sending them in messages or notifications
- Using them as inputs to future orchestration steps
You can see a quick overview from Oracle here. Our deep dive is below.
Note: The attachment component works regardless of whether media objects are stored in the database or file system.
Setting Up a New Attachment
JDE relies on a combination of a structure name, key and sequence number to uniquely identify an attachment. The structure name for the media object enables JDE to dynamically look up all the keys related to that structure. The key description/value and structure link the two together, effectively mapping the JDE data to the attachment data.
In the example below, the structure is a media object, the selected key is for an address book record and the desired action is to upload the object. Specify the item name and file name, and that’s it. This attachment step is now ready for use in an orchestration. It will add whatever file is passed into it into the address book record.
Using an Attachment in an Orchestration
Here, you can see the attachment subcomponent being used as a step in an orchestration. The first step is a regular Form Request, and the next is the Attachment step. The address number (key) is mapped in from the output of the Form Request step. The other field is the filename. The file must be uploaded for it to be available for this orchestration step.
The input for the orchestration has a file input option. We select the Content-Type for a jpeg. Then, we name the variable “filename.” When we run this and pass in an attachment, it will store the file in a variable called filename, which we can then pass into the attachment step.
When running this orchestration, you can click on the files button and drag and drop any desired file there (as long as it is the file type you specified earlier). Click run, and you can see the temp filename, the alpha name, and the address book # created. If you go into JDE and into the address book, you will see the address book entry and the attachment you uploaded stored there.
External REST Calls
Files can also be passed into Orchestrations from 3rd party applications. The content-type must first be set to multipart/form-data. After that you can add the typical json in the input form parameter. Next choose a file to attach using the file form parameter. Once everything is set up, you can submit the REST request in the same way you would call any Orchestration.
Upcoming ADEX Enhancement for Adding Files in Bulk
As a result of the new functionality in JDE, our ADEX tool is gaining more functionality as well. For example, you might have 100 work orders in Excel and one column has a path to a picture or PDF. ADEX will automatically grab the file and pass it into the Orchestration from Excel. Since many of our customers have asked for this exact feature, we’re excited to be able to deliver it.
Want to learn more about using attachments in Orchestrator? Contact us for training or to help build the orchestrations that let you get more done.