Before You Begin
The Orchestrator Assertion Framework is a means to test the output generated by your orchestrations. In this way, Orchestrator can act as a framework to test your EnterpriseOne applications. Not only can you verify that an application ran without generating errors, but you can also verify that the application created the output values that you expect. “Assertion” is the name we give to test a value that an orchestration produces against an expected value. An assertion is simply an operator (equal, greater than, less than or equal to, and so on.) and optional test values. If the value generated during execution passes the assertion, the test is successful. You can define assertions on any data returned from any step of an orchestration in addition to orchestration inputs and variables. Note that the execution of the orchestration and the testing against assertions are two distinct outcomes. It is possible that an orchestration completes successfully (that is, with a “200” HTTP response), but the assertion still fails because the orchestration did not produce one or more asserted values.
This 30-minute tutorial shows you how to build an orchestration and use it to validate the sales order.
In this tutorial:
- You will use Process Recorder to capture the process of entering a sales order and returning certain data that you want to validate along with the expected values.
- Using the generated form request, you will create an orchestration and add the assertion test values captured during the recording.
- You will add additional assertions to test other data returned.
- Finally, you will learn how to use variables for the test values instead of the values included in the orchestration. During the process, you will execute the orchestration and view the assertion results.
Creating
an Orchestration to Test the Data Generated During Sales Order
Creation
Scenario
You want to build an orchestration used to validate a sales order and that the sales order generates the expected output, for example, the order total and volume discounts.
Note: This task relies on EnterpriseOne demo
data. You can use other data available in your system to enter a
sales order to perform this task.
You should have access to the Process Recorder through the
user-defined object feature security and action security.
Recording the Sales Order Creation Process and Capturing Assertions for Test Values
- Sign in to the EnterpriseOne web client.
You can access the EnterpriseOne web client from the Orchestrator Studio home page or the Tools drop-down menu on any of the pages. - On the EnterpriseOne page, click the drop-down menu next to
your user name and select Record a Process.
- In Process Recorder, click the Start button.
- Access the Sales Order Entry (P42101) application using Fast Path or open the application from the Navigator menu.
- Click Add.
- Complete these header fields:
- Sold To = 4243
- Branch/Plant = 30
- Enter the following lines and enter these values:
- Line 1
- Quantity Ordered = 1
- Item Number = 21001
- Line 2
- Quantity Ordered = 250
- Item Number = 21001
- Line 1
- Navigate to the Order Summary tab in the order header.
- Click Return Values in the Process Recorder window.
- Enable the Capture Assertions switch to capture the data in each field.
- Click Order Total, Tax, and INVOICE TOTAL in the Order Summary tab.
- Click the column headers for Quantity Ordered, Item Number, Unit Price, and Extended Price in the Sales Order Detail grid.
- Click Resume in the Process Recorder window.
- Click Cancel to cancel the order and click Yes in the confirm cancel window (it is not necessary to save the order for these validations).
- Click Stop in the Process Recorder window
and enter a name:
- Name = Assert SO Entry
- Click Save.
Creating an Orchestration from the Form request and Testing the Assertions Values
- Login to Orchestrator Studio.
- Click Orchestrations.
- Click New.
- Enter Assert SO Entry in the Name field.
- Click the plus icon in the diagram to add a step.
- Click Form Request.
- Search and select Assert SO Entry.
- Click the Transformations icon.
- In the Transformations window, click the Add Inputs to Orchestration icon to add all the inputs of the form request to the orchestration.
- Click the Auto Map button on the top-left corner to map the transformations.
- Delete the P42101_Version mapping from the Available Values drop-down menu so that the default version can be used.
- Click Save.
- Click outside the Transformations window to close it.
- Click the Start icon of the orchestration and then click the Inputs and Values icon.
- Click the X icon in the P42101_Version row to delete the row from the inputs.
- Click Save.
- Click the End node and click Outputs and Assertions to edit the outputs.
- Enable the Select All toggle in the Define Outputs tab to select all the available output.
- Click Save.
- Click the Define Assertions tab.
- Click the Load Assertions from step icon in the Assert SO Entry step.
- Click Save.
- Double-click the Start icon.
- On the Run Orchestrations window, click the Raw button to choose the raw option for input.
- Enter the following input to create the same order entered
during the recording:
{
"Long_Address_Number_Sold_To": "4243",
"HdrBusinessUnit": "30",
"GridData_188_20": [
{
"Item_Number": "21001",
"Quantity_Ordered": "1"
},
{
"Item_Number": "21001",
"Quantity_Ordered": "250"
}
]
} - Enable the Evaluate Assertions toggle and click Run to execute the orchestration.
- Verify that you can see 7 out of 7 passed message and then expand the Assert SO Entry step to review the seven tests.
- Click Save Assertions to export the assertion results to a local file. This file is useful as a record of the results of the assertion test.
- Close the Run Orchestrations window.



Note: The assertion values that you captured
in Process Recorder are loaded into the Test Value column. The
three values from the sales order header are displayed in the
fields. The four values from the sales order detail are
represented by the number 1, indicating that values for 1 row
of data are loaded.
You will learn how to test for values in multiple rows in the
next task.
Important Concept: Although you captured the
assertion values while using Process Recorder, and those
values are currently stored in the Assert SO Entry form
request, the values on this Define Assertions page are the
values that Orchestrator will actually evaluate against. By
clicking Load Assertions from Step icon you
copied the assertions that are stored in the form request and
loaded them into this page. You can manually add or edit
values on this page instead of loading them from a service
request.

Adding Assertions for a Second Detail Row
-
In the previous exercise you used Process Recorder to capture
assertion values for header fields and one detail row of a sales
order. Then you ran the orchestration to evaluate the results
against those values. In this exercise you will manually add
assertions for a second detail row. You will intentionally add
incorrect values to see how an assertion fails and then change
the values so that the assertion succeeds.
- Click the End node and click Outputs and Assertions to edit the outputs.
- Click the Define Assertions tab to add assertions for the second row of the grid.
- Click the Define Row Assertions icon to add additional assertions for Quantity Ordered.
- Click Add to add another row for assertion, select the Operator value as = and enter 250 in the Test Value field.
- Click anywhere outside the window and click Save.
- Verify that the assertion count for Quantity Ordered is updated to 2.
- Disable the Select toggle of Item Number to exclude that assertion from being processed.
- Similar to step 4, add additional assertions for Unit Price and Extended Price, set the Operator to = and enter a Test Value as 1 for each to ensure they fail.
- Save the orchestration.
- Click the Start icon and click Run Orchestrations.
- Enable the Evaluate Assertions toggle.
- Click the Raw button and enter the
following input to create the same order entered during the
recording:
{
"Long_Address_Number_Sold_To": "4243",
"HdrBusinessUnit": "30",
"GridData_188_20": [
{
"Item_Number": "21001",
"Quantity_Ordered": "1"
},
{
"Item_Number": "21001",
"Quantity_Ordered": "250"
}
]
}
- Click Run. You should see 7 out of 9 passed and the step expanded showing the failure message of the assertions for Unit Price and Extended Price that were added in Row 2.
- Note the values displayed in the Unit Price and Extended Price fields in Row 2.
- To test your knowledge, update the orchestration assertions for Unit Price and Extended Price to match the actual values and save. Again test the orchestration and verify that all the nine tests are passed.



Using
Values from CSV to Test the Orchestration
In this exercise, you will add test values to a CSV file and use them in the orchestration instead of hard coded values saved in the orchestration.
ScenarioUsers need to update the test values of an assertion orchestration to accommodate the changes that are made to the data over time without modifying the orchestration directly.
Prerequisites:You must have an FTP server available to your AIS server
running the Orchestrator Studio and you must have a working
connection to that FTP server. You must also set up a connection
to that FTP server in Orchestrator Studio, which will include
the address and security credentials.
If you do not have access to an FTP server on your system, you
can learn how to pass assertion values dynamically into an
orchestration using orchestration inputs. Skip to the exercise Passing
Assertion Values as Orchestration Inputs.
Creating a One-Line CSV File with Test Data.
- Copy the following two lines into any text editor and save
the file with a .csv extension to create a CSV file with one
row of test values:
Note:
To ensure that the text is converted into a valid CSV file, enter the descriptions in one row, followed by a new line, with all the values on the second row.
Row 1 Unit Price,Row 2 Unit Price,Tax Total,Order Total,Invoice Total
798,718.2,6853.22,180348,187201.22
- Save the file with .csv extension and copy the file to your FTP server.
- From the Orchestrator Studio Home page, click the Connectors icon, then click New, then click FTP to create a new FTP connector step.
- Enter Get Assert SO Entry Test Values in the Name field.
- Select the connection to your FTP server from the FTP drop-down menu.
- Change the first option to File.
- Change Type to Receive.
- Enable the Import CSV option.
- Enable the Import First Row Only option. This option enables the system to read the first row of values into top-level variables instead of reading all rows into an array variable. An array will not work for this use case.
- Enable the CSV Has Headers option.
- In the Source File Name field, enter the name of the CSV file as you saved it in step 2. Modify the path extension if necessary to ensure that the path matches the location where you saved the CSV file on the FTP server in step 2.
- Disable the Remove Source File option.
- Click Sample File and then find and select
a local copy of your CSV file to load the names of the
columns.
Note: Confirm that the source file name matches the name of the file copied on the FTP server.
Orchestrator Studio reads your CSV file as a template of the variable names. Each column header in the CSV file becomes the name of an orchestration variable. In a later exercise you will use these orchestration variables as the assertion test values instead of the hard-coded values you used in the previous task. - Save the connector and click Close to return to the Orchestrator Studio Home page.
Adding the Connector to the Orchestration and Registering the Data as Variables
- From the Orchestrator Studio Home page, open the Assert SO Entry orchestration.
- Click Design Mode, and click the + icon.
- To edit the Assert SO Entry orchestration created in the previous task, click Design Mode .
- Click the + icon to the left of the Assert SO Entry step to insert a new step.
- In the New Step Type window, click Connector.
- Search and find the Get Assert SO Entry Test Values connector created in the previous task.
- Click the Start node, and then click the Inputs and Values icon.
- Click the Variables tab.
- Enter the five variables from the CSV file. Enter each
column header from CSV into the Variable Name column.
This step is necessary to map variables to assertion test values, as the Values From Steps option is not available for assertion test values - Click Save.
- Click the End node and click the Outputs and Assertions icon.
- Click the Define Assertions tab.
- Find INVOICE TOTAL in the Order Summary section. Click in the Test Value column next to INVOICE TOTAL to see the list of available variables.
- Choose Invoice Total from the list to use the value from the CSV file.
- Repeat the preceding step for Tax and Order Total.
- Find Unit Price in the Sales Order Detail section.
- Click the list icon next to the Unit Price to open the grid row assertions.
- Click the Test Value drop-down menu and
select the row Unit Price for each row:
- For Row 1 choose Row 1 Unit Price
- For Row 2 choose Row 2 Unit Price - Save the orchestration and run it again using the following
input you used in the previous task, with the Evaluate
Assertions toggle enabled.
{
"Long_Address_Number_Sold_To": "4243",
"HdrBusinessUnit": "30",
"GridData_188_20": [
{
"Item_Number": "21001",
"Quantity_Ordered": "1"
},
{
"Item_Number": "21001",
"Quantity_Ordered": "250"
}
]
} - Validate that the assertions have passed.
- To test your knowledge, modify the values in the CSV file
that you copied on the FTP server and then run the
orchestration again. Verify that the new test values entered
in the CSV are used while evaluating the assertions.
You should expect the assertions to fail any time the values in the CSV file do not match the values that the orchestration is actually producing.


Passing
Assertion Values as Orchestration Inputs
In this exercise, you will create orchestration inputs for five of the assertion values instead of hard-coded values saved in the orchestration.
Scenario
Users need to update the test values of an assertion orchestration to accommodate the changes that are made to the data over time without modifying the orchestration directly. In this scenario, the assertion values are defined as orchestration inputs and are passed into the orchestration along with the other inputs.
Prerequisites
None.
Defining Orchestration Inputs for the Assertion Values
- From the Orchestrator Studio Home page, open the Assert SO Entry orchestration.
- Click the Start node, and then click the Inputs and Values icon.
- On the Orchestration Inputs tab, add the following 5 inputs.
Leave the Value Type as String.
- Row 1 Unit Price
- Row 2 Unit Price
- Tax Total
- Order Total
- Invoice Total
- Click Save.
- Click the End node and click the Outputs and Assertions icon.
- Click the Define Assertions tab.
- Find INVOICE TOTAL in the Order Summary section. Click in the Test Value column next to INVOICE TOTAL to see the list of available orchestration inputs.
- Choose Invoice Total from the list to use the value from the CSV file.
- Repeat the preceding step for Tax and Order Total.
- Find Unit Price in the Sales Order Detail section.
- Click the Define Row Assertions icon next to the Unit Price to open the grid row assertions.
- Click the Test Value drop-down menu and
select the row Unit Price for each row.
- For Row 1 choose Row 1 Unit Price
- For Row 2 choose Row 2 Unit Price
Add Test Values
- Save the orchestration.
- Run the orchestration again with the Evaluate Assertions
toggle enabled. Use the following input.
Note that the input is the same as what you used in the previous exercise, except that you need to add the 5 inputs for the 5 assertion values at the bottom.
{
"Long_Address_Number_Sold_To": "4243",
"HdrBusinessUnit": "30",
"GridData_188_20": [
{
"Item_Number": "21001",
"Quantity_Ordered": "1"
},
{
"Item_Number": "21001",
"Quantity_Ordered": "250"
}
],
"Row 1 Unit Price": "798",
"Row 2 Unit Price": "718.2",
"Tax Total": "6853.22",
"Order Total": "180348",
"Invoice Total": "187201.22"
}
- Validate that the assertions have passed.
- To test your knowledge, modify the values in the orchestration inputs for the 5 assertion values, then run the orchestration again. You should expect the assertions to fail any time the values in the orchestration inputs do not match the values that the orchestration is actually producing.
