Skip to content

Predicates ​

Declare and evaluate bounded conditions for workflows and other authorized consumers. A predicate computes a result; it must not smuggle a mutation into a query callback.

Contract: nexa.predicates/100. API index.

Typical sequence ​

Register the input schema and handler or supported expression, then evaluate with matching inputs. The runtime supports a closed expression grammar rather than arbitrary source evaluation.

Behavior and limits ​

Treat an evaluation failure separately from false. A missing capability, bad schema or retired handler is not evidence that the business condition is false.

The recorded Host maps 3 of 3 operations in this group. A mapping is subject to permission, phase, scope, platform and business preconditions. Host snapshot identifies the source revision; negotiate against the actual installed Host.

Operations ​

Register · Evaluate · Describe

Register ​

PredicateDefinition → RegistrationRef

PropertyContract
Local SDK method ID1
KindRegistration
Permissionnexa.predicates.write
Legal phasesInitialize
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
IdQualifiedIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.
InputSchemaRefStructured SchemaRef value; follow its linked field contract.
Handlerulong?Callback identifier registered by this plugin. A handler alone is not a public action or provider registration. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.
ExpressionAbiValueDomain value named by this field; additional accepted values and bounds are determined by the operation and Host policy.

Successful result

Retain the registration identity for the permitted update/release operation. Staged registrations become visible only at group activation.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Predicates_Register(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Predicates_Register_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

Evaluate ​

PredicateRequest → PredicateResult

PropertyContract
Local SDK method ID2
KindQuery
Permissionnexa.predicates.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
IdQualifiedIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.
InputsAbiValueTyped input value encoded under the declared input schema.
ConsistencyRevisionIdentity or revision in this model’s domain; preserve ownership and exact spelling.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Predicates_Evaluate(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Predicates_Evaluate_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

Describe ​

QualifiedRequest → PredicateDefinition

PropertyContract
Local SDK method ID3
KindQuery
Permissionnexa.predicates.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
IdQualifiedIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Predicates_Describe(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Predicates_Describe_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.


Source: NexaCL-Plugin-SDK · Apache-2.0.

Site documentation: CC BY-SA 4.0. Imported SDK documents: Apache-2.0 as marked.