The Complete JDE Orchestrator Guide Part 12: How to Call Orchestrations
Now you are familiar with all the components in Orchestrator Studio and how to build orchestrations. Let’s look at how to call them.
As you’ve noticed, orchestrations are used primarily for integrations and for automating business processes. To automate unsupervised processes, orchestrations are put on a Scheduler and no one touches them. However, when you are using orchestrations to actively expedite business processes, they may need to be called by end users or 3rd party applications.
There are four ways to call orchestrations:
- From a third party app directly using a REST request.
- Using Form Extensions inside JDE
- With ADEX (formerly JDExcelerator) from inside Excel
- Through mobile apps (using a REST request)
We will look at each of these in more detail below. But first…
A Quick Note about Running Orchestrations
It’s possible to run orchestrations from within an orchestration itself. You can do this by using the “run orchestrations” screen (formerly called “orchestrator client”). Simply enter the input fields and when you click the run button, the orchestration runs, compiling the input and output into JSON.
Method 1: Calling Orchestrations with REST
If you want to test calling an orchestration like you would from within a third party app such as Salesforce, Dynamics 365, an e-commerce site, etc., you can use a REST Client tool. Our favorite choice is Talend API Tester, because it is user-friendly and well-organized for this purpose. You can add this lightweight Chrome extension to your browser. Postman and SoapUI are also popular options.
Start by entering the URI. That is the end point to the AIS server where orchestrations live, then the path after the / is jderest/v3. The last part (the only part of the URI that changes) is the orchestration name at the end.
Next, set the Method to POST and complete the headers. These include content type and accept fields that let you define the format you are sending and receiving. This is usually JSON for modern applications, but it can also be set to send and receive XML.
You will also need to fill out the Authorization header and input your JDE username and password so the REST API has permission to access information in JDE.
Copy the JSON from the Input section on the Run Orchestrations screen and paste it into the body of the REST client tool screen.
Finally press Send to run. This will send the REST request to that URI.
(NOTE: If you click on the key next to the end of the Authorization row, you can enter your JDE User ID and Password which will be converted into a Base 64 Encoded Authorization String.)
By simulating calling from 3rd party apps in this way, we are doing the same thing in a 3rd party application that we did in the Run Orchestrations. This includes testing connectivity, security, etc.
Method 2: Calling Orchestrations from Form Extensions in JDE
Form Extensions provide a no-code way for users to extend the functionality of forms without having to ask IT to come in and customize the application behind the scenes. This is one of the most powerful features of JDE and Orchestrator.
Here’s a step-by-step example of how to build an orchestration using a Form Extension.
- Click on the Form Extension button and drag/drop a button into the form.
- Click on Associate Orchestrations and select the orchestration you want to call.
- Map Orchestration inputs by clicking the fields you want directly from the form on the screen or hard coding inputs directly as default values.
- Specify how it will run (synchronously so that it will wait for the orchestration to finish or asynchronously to run right away if there are no dependencies to consider). If run synchronously, you can take the Orchestration outputs and map them back to other fields on the screen.
With the execute before or after options, you can set up customized logic flows in an existing application using any of the fields on the screen (including the Save and OK buttons at the top).
Method 3: Calling Orchestrations from ADEX
Excel is one of the most commonly used applications for users to manage data in spreadsheets. Until recently, there was no simple way to interface Excel and JDE. Our ADEX software is a proprietary solution built specifically to call any orchestration from inside Excel. It eliminates the need to build a custom integration for every new end point by dynamically discovering and calling any Orchestration.
Method 4: Calling Orchestrations from Mobile Apps
Mobile apps can use REST requests to call orchestrations, so they follow the same process as described in Method 1 above.
That’s it for the JDE Orchestrator Guide Series. There are endless use cases you can create using this powerful platform and toolset. If you want to get hands on with applying what you’ve learned, sign up for our training _!