# tymly-core-plugin

Description

Provides low-level functions for Tymly

# State Resources

Name Description
availableResources Returns a list of currently available resources
availableStateMachines Returns a list of currently available state machines
awaitingExternalInput Awaits for an external input to advance the state-machine
clearConfiguredRegistryKey Clears a registry specific value
clearRegistryKey Clears a registry key value
configSetting Reads a config setting
deleteCacheItem Delete item from cache within Tymly
deletingById Deletes document by ID
finding Finds documents in a specified model that meet specified criteria and adds it to the tymly context
findingById Finds a single document that has the specified id and adds it to the tymly context
findingCount Counts documents with where clause from storage
findingOne Finds a single document in a specified model that meets the specified criteria, and adds it to the tymly context
generateUuid Generate UUID (Long or short!)
getCacheItem Get item from cache within Tymly
getConfiguredRegistryKey Gets a specific registry key value
getRegistryKey Gets a registry key value
launchStateMachine Launches another state machine, but does not wait for it to complete. The output of this state-resource is the execution description of the launched state machine. The description of the parent state machine is given as input to the launched state machine so it can, for example, send heart beats back.
logging Logs to the console via a template
resetCache Reset cache within Tymly
runFunction Run function from a blueprint
runStateMachine Run another state machine and wait for it to complete. The output of this state-resource is the output from the spawned state machine.
sendTaskHeartbeat Sends Task Heartbeat to another execution.
sendTaskSuccess Sends Task Success to another execution.
setClientMetaData No description! 😦
setConfiguredRegistryKey Sets a registry specific value
setContextData Sets the context data
setRegistryKey Sets an arbitrary registry key value
storageSearch Paginated search across documents from storage
timestamp Generates a timestamp
upserting Perists a document to storage

# Blueprint directories

Directory Description
/functions Blueprints are predominantly declarative - preferring JSON definitions over hand-coded functions. But for those times when only code will do, blueprints can supply supplemental Javascript functions too.
/models This sub-directory deals with the M portion of MVC - each JSON file in here defines a data model that can be subsequently used by a State Machine. Nested documents are supported along with a couple of extensions to help describe database indexes and primary keys. Tymly uses the JSON Schema standard for describing data models.
/registry-keys Consider a blueprint that defines a simple workflow that sends a Tweet - what Twitter username/password should be used? This is where Registry Keys come in useful... a simple key/value store inside Tymly, where keys are declared inside this sub-directory. To help conjure administrative screens and help validation, the required value content is described using JSON Schema.
/state-machines Each JSON file inside this sub-directory will be used to conjure a State Machine for orchestrating a workflow. Tymly uses the open Amazon State Language (opens new window) to describe State Machines.
/tags JSON files providing 'tags' which are used throughout Tymly to help categorise things and aid discovery

# Services

Name Description
blueprintDocs Allows tracking of documents created via blueprints, so they don't get reverted when Tymly restarts
caches Adds lru-cache (opens new window)-based caching to Tymly. Note defaults will be used if no caches configuration is provided.
categories Provides a generic mechanism to help tag/classify search results, tasks, forms etc.
functions Adds ability to run custom logic as defined in a blueprint
inventory Collates component information by scanning plugins. The results can then be used by tooling and documentation-generators
logger Tymly Logger Service
registry Provides a mechanism for states to refer to site-specific values
statebox Runs state machines defined in Amazon States Language
storage This is the default in-memory storage service that ships with Tymly. Useful for testing and not much else.
temp Helps configure and manage a temporary folder for Tymly to use
timestamp Tymly Time Service!
tymly Tymly Service
Last Updated: 9/10/2023, 11:30:14 AM