Skip to main content
Version: LOC v0.7 (legacy)

Release Note

LOC v0.7 has brought new features and improvements since v0.6.0, including breaking changes on SDK.

Release Versions

ComponentCurrent Version
Corev0.7.1
Studio v1.2.1
CLIv0.7.0
SDKv0.7.0-2

Major New Features

Summary

New FeatureSummary
Agent ConfigurationSetup and load secrets (confidential user information) for HTTP, database, file storage and mail agents. See the added docs in Tutorial, Studio and CLI.
Execution HistoryBrowse and inspect execution logs, including task logs, trigger payload and results in Studio.
License MechanismDisplay and update a LOC environment's license status, agreements and restrictions in Studio or CLI.
SDK and CLI Breaking changesSee demonstration of breaking changes for details.

Detailed List

  • Core/Studio/CLI: adds support for Agent Configuration for setup secrets used by HTTP, database, file storage and mail agents.
  • Core/Studio/CLI: adds support for Logic Variable Agent and logic variables (environment variable).
  • Studio: adds Execution History panel in Data Discovery which shows payload, result and logging of executions and tasks.
  • Studio: adds License panel which can be used to view and update LOC distribution license.
  • Studio: add default SDK import code in logic. All logic functions also have to be exported (with keyword export).
  • CLI: adds commands for listing and uploading LOC distribution license.
  • CLI: adds command for deleting deployed data processes quickly with the project name.
  • CLI: new data process templates now contain default error handling codes.
  • SDK: agents are now moved out of data context (ctx) and have to be explicitly imported from SDK, in both JavaScript and TypeScript projects.
  • SDK: logic payload in logic can now be lazy-loaded with ctx.payload().
  • SDK: local storage agent's timeout parameter now have default value of 300 seconds and the upper limit of 86400 seconds (1 day).
  • Core/SDK: event store agent's search and searchWithPattern (search sequences of events) now have simplified condition syntax.

Improvements

  • Core/CLI: Trigger of scheduler is renamed to Schedule and SMTP agent is renamed to Mail agent.
  • Core: improves local simple runtime error logging.
  • CLI: repackage environment variables to logic variable agent.

Breaking Changes Demonstration

There are a number of breaking changes in SDK API, most notably the way to import agents and load payloads, as well as different event store agent search/pattern search APIs. You'll need to modify your data processes for them to work on LOC v0.7.0.

Import and Invoke Agents

// import logging agent from SDK
import { LoggingAgent } from "@fstnetwork/loc-logic-sdk";

export async function run(ctx) {
LoggingAgent.info("Hello World!");
}

Functions have to be exported in both Studio v1.2.1 and CLI v0.7.0.

note

From v0.7.0 the run and handleError functions in Studio have to be exported too (with export keyword).

Payload Lazy Loading

export async function run(ctx) {
const payload = await ctx.payload(); // only loads when you call this
}

Simplified Event Search Condition API

const requests = {
queries: [
{
field: "label_name",
type: "match",
value: "event name to be matched",
},
],
excludes: [],
filters: [],
sorts: [],
aggregation: [],
from: 0,
size: 1000,
};

const query = await EventAgent.search(requests);

See the examples in Event Store Agent for details.

Logic Variable

const data = LogicVariable.get("data");

The variables can be set in Studio (while editing each logic) or in CLI (config.yaml of each project).

CLI Single Data Process Execution

./loc dp run-init
./loc dp run -f <run-task.yaml>

The data process permanent IDs must be specified in run-task.yaml.


What's New in LOC-Doc?

  • Adds docs for Core/CLI/SDK v0.7.x and Studio v1.2.x.
  • Various improvements and fixes (including v0.6.0 docs).
  • Adds System FAQs.
  • Studio Guide is expanded with more content.
  • Category Agent Reference is now renamed to SDK Reference (including v0.6.0 docs).
  • Adds SDK TypeDoc, an auto-generated docs based on SDK v0.7.0.