Create and populate the Step entity

At the moment, your application contains only 10 purchase orders. 

When starting out, a restricted set of data like the one you have currently is great to check the logic of your integration routes, mappings, and dashboard content.

To make effective use of evaluations, you need more purchase orders in the product. In a real-world situation, you would expect:

  • A greater volume of data, even during the early development phase of your application 
  • A more complex structure of entities in your model.

In the diagram below, you can see your two existing entities – Orders, Global, and the relation between them. 

There is one significant missing part: the order process workflow itself. Each of the stages an order moves through represents a step in the process.

As a reminder, you are building this application for Kabels so they can monitor their business workflow process which comprises seven steps. 

# Process step Generated events
1 Purchase Orders Received New Order
2 Validation


Valid Order


Invalid Order

3 Scheduler Line Request Scheduled
4 Production Line Line Request Completed
5 Shipping

Logistics Order



6 Purchase Order Invoicing Invoiced
7 Receivables Payment Received

To monitor this workflow,  include an entity for process steps in your model.  If you apply the same sort of thinking about steps that you did for orders, it might be that the model requires not just an entity for steps, but also a relationship between steps and Global. Something like the diagram below. Adding the relation to Global would enable you to summarize information about all steps.

Adding a relationship between orders and steps is also good to add visibility into what orders are in a step. This is the more complete picture of what your model will include:-

The direction of the relations you are going to create will be:

  • From Step to Global (many to one) 
  • From Order to Step (because there can be more than one order in a step, but an order can never be in more than one step).

Create a checklist

The steps you are about to follow to add new data in your application are essentially the steps you will follow every time you want to add new data to an application.

Making a checklist of these steps could be useful. If you skip a step, or don't check your work carefully, you could be faced with problems later on. When creating a checklist, make sure to update it as you encounter new situations where the expected data behaved in unexpected ways.

1. Create the Step entity

As you've seen before an entity is only part of the process. You must also create instances of that entity.

Before you can read  data in your model, you need to first create the location where that data will be stored. 

Step Action

Click the Configuration icon > Entities.


Click the New Entity button.

  • Create a new [mono or multi] dimensional entity:
  • Name: Step
  • Space: Model
  • Description: Process Step
  • Type: Configuration

transactional vs configuration

Steps in the process are not transactional data. Steps are a part of the process, not a part of the transactions or orders that move through the process. You will choose the configuration entity type. One of the benefits of having steps marked as Configuration is that they will be exported and imported when you save / restore your application.

3 On the Attributes tab, add the following observed attribute:
  • Name: step Name
  • Type: String
  • Description: Name of this process step

Click Done.

4 Add the following observed relation attribute:
  • Name: ref2Global
  • Reverse Name: 2Steps
  • Description: Links steps to global
  • Target: Global

Click Done .

5 On the Keys tab, create a key for the Step entity.
  • Name: KeyStep
  • Attribute: step Name

Click Done .

6 Click Save.

2. Create a mapping and a route for Step

Now that the Step entity is created, create the means to populate the entity. To create the instances of the Step entity, you need to know the names of the process steps.

The test data you used in prior parts of the tutorial did not include information on the step names. 

There are new data files, supplied as part of this tutorial. Unzip the .zip file into a directory. You should see three files:

  • Part-4-11-Steps.txt
  • Part-4-31-Days.txt
  • Part-4-10-Orders.txt

Important: Before using the files provided above, you may need to modify the date of the orders in the files so that the date where the orders arrive in your application corresponds to a date after your own application creation date.

The Part-4-11-Steps.txt file is the first one you will use. Note that in this data file there is no header record, only data fields. You now have an entity data to provision it.

To populate the Step entity, you're missing a mapping and a route.

By creating the mapping first, you benefit from having the parameter names carried forward from the mapping to the route.

Create a mapping for Step

For more information about mappings, see also Configure mappings using the Axway Desktop Client.

Step Action

Click the Data Integration icon > Mappings.


Click the New Mapping button.


Give your mapping the following characteristics:

  • Name: mapStep
  • Parameter: step Name, Type: String

Click the Add Instance Operation button:

  • Select the Step entity.
  • DEFAULT TIMES area – In the Resolution and Operations begin fields, , select Constant, then enter {{app_start_date}}.
  • RESOLUTION area:
    • Click the choose a key hyperlink and select the parameter you created for the step Name attribute.
    • Select the Create an instance option. This is the correct option for what to do if an instance of Step is not found.
  • OPERATIONS area – Create the following two operations.

For the first operation:

  • Add an operation set for the Global attribute to change the value of the relation to the Global entity.
  • In the line for Value, select Constant, Global.

For the second operation:

  • Add a set space operation.
  • In the line for Space name, select Constant, Instances .
7 Click Save.
8 Click the Copy Snippet icon.

Create a route for Step

Step Action

On the left menu, click Routes.


Click the New Routing Context button and give your new route the following characteristics:

  • Name: rouStep.

In the body of the route, enter the following:

  • A from uri statement that uses direct:file.
  • Specify the csv delimeter with skipHeaderRecord="false".
  • Wrap the csv delimiter line in an unmarshal statement.
  • Add log message information:  <log message="csv - ${body}"/>.
  • <split> the route.
  • Add a simple statement to retrieve the body of the file.
  • Add log message information to know whether the split is successful: <log message="split - ${body}"/>.
  • Paste the snippet from the Step mapping. The step information is in body[0].
  • Close the split statement, close the route.
4 Click Save.

Once you're done, start the route, and use the sample text file as an input.

Check the results

To check the results, you can look at the logs and or click the Explore icon on the main menu to explore the Step entity. The order of the step names may vary.

If you do not see these results, you can check that the Step route you created matches the one below:

<routes xmlns="" xmlns:u="">
        <from uri="direct:file"/>
            <csv delimiter="," skipHeaderRecord="false"/>
        <log message="csv - ${body}"/>
            <simple> ${body}</simple>
            <log message="split - ${body}"/>
                    <u:map-entry key="step Name">
            <to uri="tnd-absorption:mapStep"/>

Related Links