0

Extract Data Objects from Data Log

  • updated 2 yrs ago

Description

In LogicNets, context is session memory that contains all data objects that can be managed by the logicnet in an application. The data log is the meta-data structure inside the session that contains meta data about the data-objects in the context. This part allows you to update the session context based on entries in a specified data-log variable (collection). It works hand-in-hand with the Generate Data-Log part you use to generate a data-log variable.

Note: In the LogicNets Designer this process step is displayed with the label generate_ctx_from_log.

Data Log Example

log = {
    ['mypath'] = {
        path = 'mypath'
        value = 1,
        data_type = 'number'
    },
    ['mypath2'] = {
        path = 'mypath2'
        value = { “a”, “b” },
        data_type = 'number'
    }
}

 

Node Type: This part is located in the Misc dropdown menu in the Process node.

Used With: You can use this part with all framework and non-framework projects.

Additional Details

Not all values present in the context are also in the data log.

  • By default the system only puts into the data log the values collected by a UI part, such as text-input, radio, dropdown, and checklist. 
  • Some parts, such as Set Data Object, have an additional Add to Log part parameter to add the process value to the data log. 

The indexes in a data-log collection can be represented as either alphanumeric (typical) or numeric. If the index is alphanumeric the index should be equal to the path value of the data-log entry.

The system uses the data type to ensure the value is set correctly. This conversion is required, because a data log may be serialized into an XML message and the value type is lost during this serialization. For example:

  • The value is converted to a number when the value in the data log is a string but the data type is a number.
  • The first value is written into the context when the value in the data log is a collection but the data type is a string.

You can also use this part to normalize log, forcing the indexes to be alphanumeric and the value types to be based on the data type.

Editor Fields

Configure this part using the following fields:

Field Name Description/Use Type/Option Optional/Mandatory
Mode The part behaves differently based on the mode you select.

Merge log values into context: The system merges the value in the given data log into the given context and correct the value type if needed.

Normalize log: The system normalizes the given data log:
  • Indexes are equal to the data-log-path
  • Value types are updated based on the data-type
Dropdown Mandatory
Context data-object For Merge log values into context, this is the location where the system writes the values in the data log. Object Mandatory
Merge with context data-object For Merge log values into context, the system clears the context data object before exporting the data log if this dropdown is set to No. Dropdown Optional
Log data-object This is the location of the input data log. Collection Mandatory
Result Log data-object For Normalize log, this is the location where the system stores the normalized datalog. Collection Mandatory
Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like Follow
  • 2 yrs agoLast active
  • 58Views
  • 3 Following

Home