Define Simulator Template

A simulator template enables you to generate mock data using which you can test your business flows and identify potential issues.

Oracle Intelligent Track and Trace enables this simulation functionality by providing you a mechanism to define a simulator template for each document type in your business flow. In a simulator template, you specify a list of values for the JSON schema attributes, using which the application generates mock documents. You can specify values for all the JSON schema attributes, or can choose a few important ones which are essential for metadata template and schema generation.

To facilitate the generation of mock data, Oracle Intelligent Track and Trace provides a list of attribute types which you can use to assign random values to the JSON attributes in the simulator template.

Note: All the parameters specified in the column Type Definition/Syntax are mandatory unless specified explicitly.
Type Type Definition/Syntax Example
Constant
{
"type" : "CONSTANT",
"name" : "<propery name"> ,
"label" : "<string>",
"value" : "<string>"
}

"#/properties/OrderHeader/properties/ProcurementBusinessUnit" :
{
"type" : "CONSTANT",
"name" : "#/properties/OrderHeader/properties/ProcurementBusinessUnit",
"label" : "Creator_Org",
"value" : "Alpha Chemicals"
}

To support "CONSTANT_DATE", specify "values" : "<YYYY-MM-DD>T<HH:MM:SS>. For example: "values":2018-06-20T21:42:02.0Z

Random Date
{
"type" : "RANDOM_DATE",
"name" : "<property name>",
"label" : "<string>",
"value" : "[PAST|CURRENT|FUTURE]",
"valueThresholdInDays" : <number>,
"format" : "[date-time|date]"
}

valueThresholdInDays is optional. It puts a limit on how much back / forward the generated value can be. Default value is 5

format is optional. Default value is "date".

Example:
"#/properties/OrderHeader/properties/OrderDate" :
{
"type" : "RANDOM_DATE",
"name" : "#/properties/OrderHeader/properties/OrderDate",
"label" : "Timestamp",
"value" : "PAST",
"valueThresholdInDays" : 3,
"format" : "date-time"
}
Random Number
{
"type" : "RANDOM_NUMBER",
"name" : "<property name>",
"label" : "string",
"lowLimit" : <number>,
"highLimit" : <number>
}

lowLimit is inclusive while highLimit is exclusive

Example:

"#/properties/OrderHeader/properties/POHeaderId" :
{
"type" : "RANDOM_NUMBER",
"name" : "#/properties/OrderHeader/properties/POHeaderId",
"label" : "OrderNumber",
"lowLimit" : 1,
"highLimit" : 5000
}

decimals is optional and specifies maximum number of digits after the decimal point. If specified, random numbers with decimals are generated.

Random From List
{
"type" : "RANDOM_FROM_LIST",
"name" : "<property name>",
"label" : "<string>",
"values" : [ <array of strings> ]
}
Example:
"#/properties/OrderHeader/properties/Supplier" :
{
"type" : "RANDOM_FROM_LIST",
"name" : "#/properties/OrderHeader/properties/Supplier",
"label" : "Supplier",
"values" : [ "Alpha Chemicals", "Beta Chemicals", "Gamma Chemicals" ]
}

To support "Random Boolean from List", specify "values" : [ "true", "false" ]

Random Money
{
"type" : "RANDOM_MONEY",
"name" : "<property_name>",
"label" : "<string>",
"minValue" : <number>,
"maxValue" : <number>,
"decimals" : <number>,
"currencies" : [<array of allowed standard currency codes>]
}
"#/properties/OrderHeader/properties/InvoiceValue" :
{
"type" : "RANDOM_MONEY",
"name" : "#/properties/OrderHeader/properties/InvoiceValue",
"label" : "TransactionAmount",
"minValue" : 100,
"maxValue" : 5000,
"decimals" : 2,
"currencies" : [ "USD", "GBP", "EUR" ]
}

Decimals is optional. If not specified, only whole numbers (i.e, non-fractional) are generated.

Random Measure

{
"type" : "RANDOM_MEASURE",
"name" : "<property_name>",
"label" : "<string>",
"minValue" : <number>,
"maxValue" : <number>,
"decimals" : <number>,
"measures" : [<array of strings>]
}
Example:
"#/properties/OrderHeader/properties/Quantity" :
{
"type" : "RANDOM_MEASURE",
"name" : "#/properties/OrderHeader/properties/Quantity",
"label" : "TransactionQuantity",
"minValue" : 100,
"maxValue" : 5000,
"decimals" : 2,
"measures" : [ "KG", "LB" ]
}

Decimals is optional. If not specified, only whole numbers (i.e, non-fractional) are generated.

Random String

{
"type" : "RANDOM_STRING",
"name" : "<property name>",
"label" : "<string>",
"prefix" : "<string>",
"suffix" : "<string>"
"minLength" : <number>,
"maxLength" : <number>
}
Example:

"#/properties/OrderHeader/properties/SenderName" :
{
"type" : "RANDOM_STRING",
"name" : "#/properties/OrderHeader/properties/SenderName",
"label" : "Sender",
"prefix" : "S-",
"suffix" : "-ORG"
"minLength" : 8,
"maxLength" : 12
}
  • For a random string of fixed length, specify the same value for "minLength" and "maxLength".
  • The length fields (minLength, maxLength) include the prefix and suffix.
  • To generate numbers as filling characters, "numeric" doesn't need to be specified (by default, it's true).
  • To generate characters (both lower and upper case included) as filling characters, specify → "numeric" : false

Usage Example

This is an example of the simulator template for document type QA Inspection:
{
	"attributes": [
		{
			"field": "#/properties/IpEventId",
			"label": "IpEventId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
              {
               	"field": "#/properties/weightInKilograms" : {
                      "label": "weightInKilograms",
			  "modelDefault": {
                             "type": "RANDOM_NUMBER",
  				"lowLimit": 72,
				  "highLimit": 80.5,
				  "decimals": 3
				}
		},
		{
			"field": "#/properties/EventType",
			"label": "EventType",
			"modelDefault": {
				"type": "RANDOM_FROM_LIST",
				"values": [
					"MANUFACTURING",
					"RECEIVING",
					"STANDALONE"
				]
			}
		},
		{
			"field": "#/properties/InspectionPlanId",
			"label": "InspectionPlanId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/InspectionLevelId",
			"label": "InspectionLevelId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/IpCriteriaId",
			"label": "IpCriteriaId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/SourceLineQty",
			"label": "SourceLineQty",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/UomCode",
			"label": "UomCode",
			"modelDefault": {
				"type": "RANDOM_STRING",
				"minLength": 10,
				"maxLength": 20,
				"numeric": false,
				"prefix": null,
				"suffix": null
			}
		},
		{
			"field": "#/properties/QtyRequested",
			"label": "QtyRequested",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/SamplingQty",
			"label": "SamplingQty",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/QtyInspected",
			"label": "QtyInspected",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/QtyAccepted",
			"label": "QtyAccepted",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/QtyRejected",
			"label": "QtyRejected",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/OriginalDisposition",
			"label": "OriginalDisposition",
			"modelDefault": {
				"type": "RANDOM_STRING",
				"minLength": 10,
				"maxLength": 20,
				"numeric": false,
				"prefix": null,
				"suffix": null
			}
		},
		{
			"field": "#/properties/InspectionStatus",
			"label": "InspectionStatus",
			"modelDefault": {
				"type": "RANDOM_STRING",
				"minLength": 10,
				"maxLength": 20,
				"numeric": false,
				"prefix": null,
				"suffix": null
			}
		},
		{
			"field": "#/properties/InlineFlag",
			"label": "InlineFlag",
			"modelDefault": {
				"type": "RANDOM_STRING",
				"minLength": 10,
				"maxLength": 20,
				"numeric": false,
				"prefix": null,
				"suffix": null
			}
		},
		{
			"field": "#/properties/DraftFlag",
			"label": "DraftFlag",
			"modelDefault": {
				"type": "RANDOM_STRING",
				"minLength": 10,
				"maxLength": 20,
				"numeric": false,
				"prefix": null,
				"suffix": null
			}
		},
		{
			"field": "#/properties/InspectedBy",
			"label": "InspectedBy",
			"modelDefault": {
				"type": "RANDOM_STRING",
				"minLength": 10,
				"maxLength": 20,
				"numeric": false,
				"prefix": null,
				"suffix": null
			}
		},
		{
			"field": "#/properties/InspectionDate",
			"label": "InspectionDate",
			"modelDefault": {
				"type": "RANDOM_DATE",
				"value": "PAST"
			}
		},
		{
			"field": "#/properties/DispositionDate",
			"label": "DispositionDate",
			"modelDefault": {
				"type": "RANDOM_DATE",
				"value": "PAST"
			}
		},
		{
			"field": "#/properties/InventoryItemId",
			"label": "InventoryItemId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/OrganizationId",
			"label": "OrganizationId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/RevisionId",
			"label": "RevisionId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/ItemRevision",
			"label": "ItemRevision",
			"modelDefault": {
				"type": "RANDOM_STRING",
				"minLength": 10,
				"maxLength": 20,
				"numeric": false,
				"prefix": null,
				"suffix": null
			}
		},
		{
			"field": "#/properties/CategorySetId",
			"label": "CategorySetId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/CategoryId",
			"label": "CategoryId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/WorkOrderId",
			"label": "WorkOrderId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/WoOperationId",
			"label": "WoOperationId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/OperationSeqNumber",
			"label": "OperationSeqNumber",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/DispatchStatus",
			"label": "DispatchStatus",
			"modelDefault": {
				"type": "RANDOM_STRING",
				"minLength": 10,
				"maxLength": 20,
				"numeric": false,
				"prefix": null,
				"suffix": null
			}
		},
		{
			"field": "#/properties/WorkCenterId",
			"label": "WorkCenterId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/WorkAreaId",
			"label": "WorkAreaId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/ResourceId",
			"label": "ResourceId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/SubinventoryCode",
			"label": "SubinventoryCode",
			"modelDefault": {
				"type": "RANDOM_STRING",
				"minLength": 10,
				"maxLength": 20,
				"numeric": false,
				"prefix": null,
				"suffix": null
			}
		},
		{
			"field": "#/properties/LocatorId",
			"label": "LocatorId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/LotNumber",
			"label": "LotNumber",
			"modelDefault": {
				"type": "RANDOM_STRING",
				"minLength": 10,
				"maxLength": 20,
				"numeric": false,
				"prefix": null,
				"suffix": null
			}
		},
		{
			"field": "#/properties/TransactionType",
			"label": "TransactionType",
			"modelDefault": {
				"type": "RANDOM_STRING",
				"minLength": 10,
				"maxLength": 20,
				"numeric": false,
				"prefix": null,
				"suffix": null
			}
		},
		{
			"field": "#/properties/SourceOrgId",
			"label": "SourceOrgId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/SupplierId",
			"label": "SupplierId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/SupplierSiteId",
			"label": "SupplierSiteId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/CustomerId",
			"label": "CustomerId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/DocType",
			"label": "DocType",
			"modelDefault": {
				"type": "RANDOM_STRING",
				"minLength": 10,
				"maxLength": 20,
				"numeric": false,
				"prefix": null,
				"suffix": null
			}
		},
		{
			"field": "#/properties/DocNumber",
			"label": "DocNumber",
			"modelDefault": {
				"type": "RANDOM_STRING",
				"minLength": 10,
				"maxLength": 20,
				"numeric": false,
				"prefix": null,
				"suffix": null
			}
		},
		{
			"field": "#/properties/DocLineNumber",
			"label": "DocLineNumber",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/DocScheduleNumber",
			"label": "DocScheduleNumber",
			"modelDefault": {
				"type": "RANDOM_STRING",
				"minLength": 10,
				"maxLength": 20,
				"numeric": false,
				"prefix": null,
				"suffix": null
			}
		},
		{
			"field": "#/properties/ReceiptNum",
			"label": "ReceiptNum",
			"modelDefault": {
				"type": "RANDOM_STRING",
				"minLength": 10,
				"maxLength": 20,
				"numeric": false,
				"prefix": null,
				"suffix": null
			}
		},
		{
			"field": "#/properties/ShipmentHeaderId",
			"label": "ShipmentHeaderId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/ShipmentLineId",
			"label": "ShipmentLineId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/SupplierLotNum",
			"label": "SupplierLotNum",
			"modelDefault": {
				"type": "RANDOM_STRING",
				"minLength": 10,
				"maxLength": 20,
				"numeric": false,
				"prefix": null,
				"suffix": null
			}
		},
		{
			"field": "#/properties/InterfaceTransactionId",
			"label": "InterfaceTransactionId",
			"modelDefault": {
				"type": "RANDOM_NUMBER",
				"lowLimit": 10,
				"highLimit": 100000
			}
		},
		{
			"field": "#/properties/CreatedBy",
			"label": "CreatedBy",
			"modelDefault": {
				"type": "RANDOM_STRING",
				"minLength": 10,
				"maxLength": 20,
				"numeric": false,
				"prefix": null,
				"suffix": null
			}
		},
		{
			"field": "#/properties/CreationDate",
			"label": "CreationDate",
			"modelDefault": {
				"type": "RANDOM_DATE",
				"value": "PAST"
			}
		}
	],
	"fixedValues": []
}