Static
createCreates an Arvo orchestration subject from detailed content parameters. The content is validated, compressed using zlib, and encoded in base64 format.
Detailed orchestration subject content following the ArvoOrchestrationSubjectContent structure
A base64 encoded string containing the compressed orchestration subject data
Static
fromCreates a new orchestration subject string from an existing parent subject. This method parses the parent subject, merges its metadata with new metadata (if available), and creates a new subject with updated orchestrator information while maintaining the relationship to the parent context.
Configuration object for creating a new subject from a parent
Optional
meta?: Record<string, string>Optional additional metadata to merge with the parent's metadata
Name identifier of the new orchestrator
Base64 encoded string of the parent orchestration subject
Version of the new orchestrator. If null, defaults to WildCardArvoSemanticVersion
A new base64 encoded string containing the compressed orchestration subject data
Error if the parent subject is invalid or if the new parameters result in invalid subject content
// Create a parent subject
const parentSubject = ArvoOrchestrationSubject.new({
orchestator: "parentProcess",
version: "1.0.0",
initiator: "systemA",
meta: { environment: "production" }
});
// Create a new subject from the parent
const childSubject = ArvoOrchestrationSubject.from({
orchestator: "childProcess",
version: "2.0.0",
subject: parentSubject,
meta: { step: "processing" } // Will be merged with parent's metadata
});
Static
isValidates if a string represents a valid Arvo orchestration subject. A valid subject must:
Use this method for validating subjects before processing them in orchestration workflows or when receiving subjects from external sources.
The string to validate as an orchestration subject
boolean - True if string is a valid orchestration subject, false otherwise
Static
newCreates a new Arvo orchestration subject with basic required parameters. This is a convenience method that wraps the more detailed create method.
Configuration object for the orchestration subject
Identifier of the entity initiating the orchestration
Optional
meta?: Record<string, string>Optional metadata key-value pairs for additional orchestration context
Name identifier of the orchestrator
Version of the orchestrator. If null, defaults to WildCardArvoSemanticVersion
A base64 encoded string containing the compressed orchestration subject data
const subject = ArvoOrchestrationSubject.new({
orchestator: "mainProcess",
version: "1.0.0",
initiator: "systemA"
});
// With metadata
const subjectWithMeta = ArvoOrchestrationSubject.new({
orchestator: "com.company.mainProcess",
version: "1.0.0",
initiator: "com.company.systemA",
meta: {
priority: "high",
environment: "production"
}
});
Static
parseParses a base64 encoded orchestration subject string back into its structured content form. Performs decompression, JSON parsing, and validation of the subject content.
Base64 encoded string representing the compressed orchestration subject
The decoded and validated ArvoOrchestrationSubjectContent
Handles the creation and parsing of Arvo orchestration subjects.