CompanionCompanion
Companion for Delivery
Companion for Business
Companion for Integration
Contact us
Log out
Companion for Delivery
Companion for Business
Companion for Integration
Contact us
  • Companion for Integration

    • Introduction
    • Getting Started
    • Configuration
    • Excel templating
    • How it works
  • YAML Configuration

    • Principles
    • Syntax
    • Validation
  • Custom Functions

    • Summary
    • arrayToJSON
    • bool
    • concatValueAndUnit
    • convertUnit
    • currentContextId
    • exportTime
    • eval
    • firstNonEmpty
    • getContextName
    • getEvents
    • getLastEventTime
    • getReferencesByAttributeGroup
    • getStoredValue
    • getWorkspaceId
    • hash
    • hasStoreKey
    • if
    • integer
    • join
    • mergeInheritedValues
    • multiValuesToJSON
    • number
    • nodeList
    • order
    • resolveUnitLabel
    • serializeAssetPushLocationsToJSON
    • serializeAttributeLinksToJSON
    • serializeContextReferenceToJSON
    • serializeContextReferencesToJSON
    • serializeContextValuesToJSON
    • serializeDataContainerToJSON
    • serializeDataContainersToJSON
    • serializeListOfValueValuesToJSON
    • serializeReferencesToJSON
    • serializeReferenceToJSON
    • serializeValuesToJSON
    • store
    • toXML
    • uppercase
  • Execution

    • Summary
    • Composite
    • From STEP
    • Standalone
    • Performance statistics
  • Configuration

    • ActiveMQ extension
    • Amazon AWS extension (SNS, SQS, Kinesis, S3)
    • ElasticSearch/OpenSearch extension
    • File extension (Excel, CSV, JSON, XML, JSONL, XMLL)
    • Kafka extension
    • Kafka Core extension
    • MongoDB/Cosmos DB extension
    • SQL extension
    • REST extension
    • Google Pub/Sub extension
  • c4i SaaS

    • Introduction
    • Managing jobs
    • Managing executions
    • Managing users
    • Changelog
  • Changelog

    • Core features changelog
    • ActiveMQ extension changelog
    • Amazon AWS extension changelog
    • Composite extension changelog
    • ElasticSearch extension changelog
    • File extension changelog
    • Kafka extension changelog
    • Kafka Core extension changelog
    • MongoDB/Cosmos DB extension changelog
    • SQL extension changelog
    • REST extension changelog
    • Google Pub/Sub extension changelog

hash

The hash function is used to hash the parameters that are provided

Syntax

c4i:hash(xPath1[, xPath2, ...])

Parameters

You can provide the hash function with the following parameters:

  • A XPath to one or more XML element(s)
    • The string representation of the XML will be hashed
  • The result of the evaluation of a custom function
    • The string representation of a JSON will be hashed
  • Any constant value (string, number, boolean)

Hashing is performed using Java Objects.hash function

Ideally, all of the mappings that are used to build the target message should be included in the parameters.

Return value

The hash of the provided parameters

Examples

The following mapping will hash all the attribute values of an object:

- c4i:hash(Values)

The following mapping will hash a single attribute value of an object:

- c4i:hash(Values/Value)

The following mapping will hash the whole of the XML of an object:

- c4i:hash(.)

The following mapping will hash the JSON representation of the attribute values of an object:

- c4i:hash(c4i:serializeValuesToJSON(Values))
Last Updated: 1/9/24, 10:47 AM
Prev
getWorkspaceId
Next
hasStoreKey