Add instance operations for the order entity map

The next step is to define instance operations for your data, that is the section where you direct your map towards the Order entity. This part of the mapping is more detail-oriented than the parameter definition. 

The parameters you are about to define for the mapping can have any name. It is a good practice to keep the names meaningful. In this exercise, use the same names for parameters and route objects as the ones you used for the attributes in the entity.

Step

Action

1

In the Details pane, click the Add Instance Operation button. A line for the new operation is displayed.

2

Click the select an entity hyperlink.

3

From the Select entities drop-down, select the name of the entity you are mapping, then click Done.

In the Details pane, 3 new areas are available for you to fill:

  • Default times
  • Resolution
  • Operations

 

1. Fill the Default times area

Within Axway Decision Insight, time is fundamentally significant to every aspect of the product and your application. This tutorial provides a basic overview on how to work with time in the deployment. The purpose of the fields may still seem a bit confusing, in which case, simply follow the instructions of the tutorial for now, then look for additional resources about time in the documentation later. 

In the Default Times area, the following fields require your attention:

Field

Description

Used by

Default value if empty

Resolution

Time at which the instance should be resolved.

Resolution of an instance by key

Resolution of a relation target instance by key

Current time (now)

Operations begin

Time at which the operations begin.

Begin time of any attribute or relation change

Begin time of any attribute or relation removal

Time at which a key is bound

Time at which a key is unbound

Current time (now)

 

These two fields can be set as either Constant or Parameter

You are defining transaction data for the purchase orders. Purchase orders are transient items moving through the business workflow into completion. For these items, use a parameter to tell Decision Insight when the items came into existence. What you are defining is the timestamp from the data file, that is the time when the purchase order arrived at Kabels for processing.

Alternatively, static data might comprise the name of data centers, process steps, or operational teams. When defining resolution and operation begin times for static data, use a constant for the mapping. Set the constant value to the date and time when the static data change becomes effective. Later in the tutorial, you will use constants set to the same time as the applicability date you used when you defined the application.

For more information about static data and transaction data, see About data types.

To fill the Default times area, follow these steps.

Step

Action

1

In the drop-downs for Resolution, select Parameter, then Timestamp.

2

In the drop-downs for Operations begin, select Parameter then Timestamp.

3

Leave the Operations end field as is.

 

2. Fill the Resolution area

When you created the Order entity, you specified a key for the entity. A key is a unique identifier for each instance of an entity.

To fill the Resolution area, follow these steps.

Step

Action

1

In the [Entity] (here, Order) resolved by drop-down, select Key. This field identifies how to resolve instances of orders.

2

In the Key drop-down, select the Create an instance of Order if not found at resolution time or after option. For more information about the other options, see Select the default action for keys.

Note: The key you created for the order entity is already specified and bolded. In some cases, an entity may have more than one key. In this case, to select the one you need, click the select another key hyperlink.

3

Leave the Resolve at specific time checkbox unchecked. This means a resolution takes place whenever you run your route.

4

Specify a value for the CycleNumber attribute. In the first drop-down, select Parameter, and in the second drop-down, select CycleNumber.

 

Select the default action for keys

The drop-down list specifies the action you want to take when this mapping is called from a route. The options to choose from are:

    1. Error if instance of Order is not found at resolution time – Select this option if an instance needs to exist before you start your Route. This action is used if the absence of an existing instance indicates there is an error. In this case, the route generates an error if the key does not match any existing instance. 

    2. Ignore if instance of Order is not found at resolution time – Select this option if your setup does not require whether an instance is found or not. With this option selected, any information from the route is ignored, and the existing values of the instance remain. Use this option if you need the solution to ignore duplicate items. 

    3. Create an instance of Order if not found at resolution time or after – the option required for this task – Select this option if, when you run your route, each instance of an entity (here, orders) does not exist. When you select this option, the mapping creates the instances for you.

3. Fill the Operations area

In the Operations area, you link the entity attributes to the resolution process. To do that, specify what the mapping will use as the data for the key.

Note: Earlier in this tutorial, you used the CycleNumber attribute as the key to Order.

You want to create two operations to select attributes and connect the parameters for:

  • CustomerReference

  • CustomerName

Step

Action

1

Click the Add an operation drop-down, and select Change the value(s) of attribute.

2

Click the Select hyperlink for the CustomerName attribute. Decision Insight displays a new Set section on-screen in the Operations area for the operation.

3

In the Set > Attribute row, for CustomerName, in the first drop-down, select Parameter, then in the second drop-down, select the CustomerName.

4 Click the Add an operation drop-down, and select Change the value(s) of attribute. The list of attributes for the order is displayed.
5 Click the Select hyperlink for the CustomerReference attribute. Decision Insight adds a second Set section below the operation for CustomerName.
6 In the Set > Attribute row, for CustomerReference, in the first drop-down, select Parameter, and in the second drop-down, select CustomerReference.
7 Click Save. In the Details pane under the Name field, a help link is now available to help you use your mapping.
8

In the Details pane, click the Copy snippet icon (), next to the Name field. You will use that snippet in the next part of this tutorial.

Useful details for later: Type, Null policy and Times

In both the operations you added to your mapping, there are three rows of selections:

  • Type 

  • Null policy 

  • Times 

The type and times sections are more advanced than the subject of this self-study. The null policy is within the scope, although you should not expect to need it.

The null policy controls what action you want your mapping to take if the value received is null – an empty field in other words. If you click the drop-down for the policy, you will see three options:

  • Error – returns an error to the route if the parameter is empty.

  • Clear – resets the attribute to a no value condition.

  • Ignore – ignores the null value and leave the attribute value as it is.

Related Links