Code Monkey home page Code Monkey logo

holistic's Introduction

 Encapsule Project

HomepageGitHubDiscussionTwitter

Encapsule Project is a quest to define a universal protocol for domain-specific software models + infrastructure to support composition of distributed apps & services.

 Holistic App Platform v0.4.4-colfaxpeak

Package: @encapsule/holistic v0.4.4-colfaxpeak build ID "cOPp4PdPRXKyaPt5tQTCqQ"
Sources: @encapsule/holodev#e2ac2697de97dbe7b68722e9de19e7f6d6e282cc
Created: 2022-06-11T19:59:25.000Z // License: MIT
Purpose: tools // Environment: Node.js

@encapsule/holistic distribution package contains the Holistic App Platform's consituent runtime libraries, and the 'appgen' command-line tool used to create derived JavaScript projects and keep them up-to-date.

 Contents

 @encapsule/holistic

TODO: Briefly explain the contents of the @encapsule/holistic distribution package and explain how it relates to the Holistic App Platform.

 Prerequisites

▴ Top

To get started you will need the following tools installed and available in your development environment:

With these base prerequisites satisfied, you will be able to install the @encapsule/holistic distribution package. And, then leverage the appgen command line utility to create/update your Holistic App Platform application service.

 Installation

▴ Top

TODO: Add some notes on installation once the package is published to npm.

 Usage

▴ Top

TODO: Add a brief introduction to how this package is used along with a link to the appgen section of this README.

 Holistic App Platform

▴ Top

 Overview

▴ Top

A holistic application service is a developer-maintained Node.js package git repository initialized and subsequently updated with the appgen command-line utility.

All holistic application services maintained with appgen have the same basic structure and base-level feature set.

  • Base-level directory structure and entry module file naming conventions.
    • Base-level directory structure is prescriptive and required.
    • Developers can extend the directory / file structure:
      • Extend existing directory branches.
      • Create new directory trees rooted in the root directory.
  • The package.json in derived holistic application packages is code-generated and owned appgen.
    • After first appgen run developers should edit holistic-app.json and not the code-generated package.json.
      • devDependencies is managed by appgen and is developer-extensible via holistic-app.json.
      • scripts is managed by appgen and is developer-extensible via holistic-app.json. Platform-defined scripts include:
        • build - build the holistic application by calling make application.
        • clean - remove the previous application build.
        • debug-server - build and start the Node.js HTTP app server on localhost under Node.js inspector.
        • holodeck - execute your application's @encapsule/holodeck test runner.
        • iruts - generate a batch of v4 UUID-derived IRUT-format identifier strings.
        • reset - scrub and additionally clear your local npm cache forcing complete re-stage on npm install.
        • server - build and start the Node.js HTTP app server on localhost.
        • scrub - clean and additionally delete node_modules directory.
        • start - launch a previously built Node.js HTTP app server on localhost.
  • Core application build is automated by an appgen-generated Makefile.
    • Abstracts building a holistic application so that you can launch the Node.js HTTP app server. And, service the bundled client application.
    • Does not abstract the application-specific details required to:
      • Test your holistic application.
      • Package your application for distribution (e.g. further source transformation, Dockerfile generation...).
      • Deploy your application to a cloud service provider.
    • Developers can define application-specific test, packaging, and deployment targets in Makefile-App.
    • Holistic application build depends on [eslint], [babel], and [webpack].
      • Configuration for these tools is imposed by appgen and is not currently developer-extensible.

 appgen CLI Tool

▴ Top

The appgen utility is a code generation tool used by developers to initialize and maintain holistic applications.

Both initialization and maintenance operations are performed using the same simple command line:

$ path_to_holistic/appgen --appRepoDir path_to_your_app_repo

Here is what happens when you execute appgen on your_app_repo:

  • Reads or creates a default holistic-app.json file.
  • Read your project's package.json.
  • Remove previously installed platform runtime libraries (RTL's).
  • Install new platform RTL's.
  • Register platform RTL dependencies.
  • Merge application and platform-defined package dependencies.
  • De-duplicate and error check finalized dependencies.
  • Merge platform-defined npm integrations (e.g. run targets) with app-specific integrations.
  • Merge changes back into package.json.
  • Rewrite derived app's package.json.
  • Initialize or recreate core project directory structure.
  • Synthesize core GNU Makefile and Makefile-App files.
  • Synthesize tool configuration files required by Makefile targets.
  • Execute npm install to update dependencies per rewritten package.json.

 Platform Runtime Libraries

▴ Top

All platform runtime libraries (RTLs) are distributed via the @encapsule/holistic distribution package. And are copied into, and registered for use in derived projects via appgen.

◰ This package contains the Data-Driven React Router (d2r2) component factory extension for React. And, the ComponentRouter dynamic view compositor packaged as a generic React component. Used to build extensible view templates, and decoupled view libraries.

◰ This package contains a collection of re-usable d2r2 React components for use with the d2r2 ComponentRouter dynamic view compositor.

◰ Cellular process modeling and runtime engine for Node.js and browser.

◰ This package contains the Holistic App Platform's core re-usable CellModel library.

◰ This package contains an experimental HTTP 1.1 application server and REST framework derived from the Node.js HTTP API's and the @encapsule/arccore filter RTL. This provides developers with a simple mechanism to define and re-use backend operations as plug-in service filters hosted by the holism server RTL. The package is intended for use in derived applications and services.

◰ This package contains an extensible framework for defining application-specific metadata - i.e. data about your app. It is intended for use in derived apps/services and is typically used in conjunction with @encapsule/holism integration plug-in filters to satisfy queries re: publishing organization, application, page, route, hashroute, resource, operation...

◰ This package contains re-usable service filter plug-ins for use with the @encapsule/holism app server package.

◰ This package contains a collection of optional application and service models that may be resused to build holistic-powered runtimes.

◰ Exports the HolisticAppClient CellModel library for use in derived HTML5 applications.

◰ Exports the HolisticAppServer CellModel for use in derived @encapsule/holistic applications/services.

◰ Exports the HolisticAppCommon CellModel library for use in derived HolisticAppServer and HolisticAppClient CellModels.

◰ This package contains the holodeck test runner and test harness plug-in filter factory infrastructure. Holodeck functions like a medical imaging system for your code that bombards it with queries and captures the results to disk. Comparison of git diff's is often all that's required to verify the correct and expected behavior of updated app/service code tracked in this way.

◰ This package contains re-usable test runners, harnesses, and vectors for use in conjunction with @encapsule/holodeck test infrastructure package.

◰ This package contains arccore.filter wrappers for XMLHttpRequest (browser) and the request module (Node.js server). Provides a mechanism to ensure the runtime fidelity of HTTP GET/POST communication between the client and server. And, between the server and other backend REST service integrations.

 Issues

▴ Top

Please post bug reports to one of the follow issue queues depending on topic:

  • @encapsule/holistic GitHub Issues - Holistic platform RTL + appgen issues.

  • @encapsule/arccore GitHub Issues - Core data RTL issues.

  • @encapsule/arctools GitHub Issue - Core data tools and RTL issues.

 Discussion

▴ Top

Join the Holistic App Platform Discussion (Google Group) -- A group for discussion of Holistic App Platform runtime libraries, tools, design patterns, service architecture, and related topics.


Encapsule Project

Copyright © 2022 Chris Russell Seattle, Washington USA

Published under MIT license by Encapsule Project

Please follow @Encapsule on Twitter for news and updates.

holistic's People

Contributors

chrisrus avatar

Stargazers

 avatar  avatar

Watchers

 avatar

holistic's Issues

Add TransitionOperator support for OCD arrays and dictionary namespaces

Follow the same general pattern used in OCD value comparison I think. i.e. provide a single TransitionOperator that provides logical operations over an array namespace. This can start out with a small set of operations and grow as there are quite a few variants that we might want to support inside of a single TransitionOperator vs forcing developers to chain together multiple discrete array operations (less efficient). But, we'll see. Baseline is pretty easy and we'll start there.

ocd writeNamespace filter throw on attempt to write to an empty map entry

Build info:

appgen": "@encapsule/holistic v0.0.46 crossroads KdclOLg3SyqYSF6u2YUbDg 8e52b7dc753f874256a631b2244721553e41a5dd 2020-09-29T18:58:04.000Z",

If in an ocd namespace you have a map declared:

myMap: { ____types: "jsObject", ____asMap: true, ____defaultValue: {} key: {____accept: "jsObject"} }

If you attempt to write to a key in the map that doesn't exist such as:
( "key1" is not in the map)

ocd.writeNamespace("~...myMap.key1", {foo: "bar"})

Then the writeNamespace filter will throw an exception instead of returning an error as it should.

CellProcess Proxy Connect throws exception if appdsl apm is missing.

Build info:

"appgen": "@encapsule/holistic v0.0.46 crossroads KdclOLg3SyqYSF6u2YUbDg 8e52b7dc753f874256a631b2244721553e41a5dd 2020-09-29T18:58:04.000Z",

When using cell process process connect: e.g.

holarchy: { CellProcessProxy: { connect: { proxyPath: "#.something" localCellProcess: { apmID: "foobar", } } } }

If the namespace defined by "proxyPath" does not have "____appdsl: apm: " ....", an error should be returned.

However instead of an error being returned and uncaught exception is thrown: "Handled exception during controller action dispatch: Cannot read property 'apm' of undefined"

The root cause of the exception is here:

https://github.com/Encapsule/holistic/blob/v0.0.46-crossroads/PACKAGES/holarchy/lib/intrinsics/CellProcessProxy/lib/cpp-get-status-filter.js#L82

Because in the expression the second condition throws and error because proxyMemorySpec.____appdsl will be undefined.

Add cardinality transition operator to holarchy core logic.

This is a feature request to add cardinality transition operator along with the other logical operators in Holarchy core logic.

The cardinality operator will return true/false based on the cardinality of a passed set of other transition operators being true or false. So the request signature might be something like:

cardinality: { ____types: "jsObject", isTrue: { ____types: "jsArray", operandOperatorVariant: { ____accept: "jsObject" } }, equalTo: { ____accept: "jsNumber" } }

CellProcessor process create action throws exception when it should be returning an error.

Build info:

"appgen": "@encapsule/holistic v0.0.46 crossroads mbeyCaeHSLyoGtX19yvb2g
a87610edbc4589e47c01266c401f8e2abe79a053 2020-10-02T04:29:48.000Z",

An unhandled exception is being throw when calling

actionRequest: { holarchy: { CellProcessor: { process: { create ....

Error thrown:

Filter [PgH0_QIhSs2c6nsw53uCjQ::OPC Act Filter] failed while performing main operation. Handled exception during controller action dispatch: apmBindiingPath is not defined

From:

https://github.com/Encapsule/holistic/blob/v0.0.46-crossroads/PACKAGES/holarchy/lib/intrinsics/CellProcessManager/ControllerAction-cpm-process-create.js#L152

AppClientDisplayAdapter should provide a ControllerAction which will allow changing the renderPath and renderContext used.

Build info:

"appgen": "@encapsule/holistic v0.0.46 crossroads 8Ei6heL7RE66YL0q5jkslw 450d4fe4c7db0085ce31b323b0d4eb70fff1eac6 2020-09-26T22:55:07.000Z",

Currently, the AppClientDisplayAdapter only exposes a single ControllerAction:

https://github.com/Encapsule/holistic/blob/v0.0.46-crossroads/PACKAGES/holistic-app-client-cm/AppClientDisplayAdapter/ControllerAction-react-render-client-view.js

The Controller action does not allow consumers to update the renderPath or renderContext used. The renderPath and renderContext can be updated by writing directly to the OCD for the AppClientDisplay adapter, but that pattern in less than ideal.

Cell Process Proxy RTL: Cell Process Proxy Transition Operator throws Exception.

Build info:

"appgen": "@encapsule/holistic v0.0.47 alexandrite oew_jzCXQrS65IlpoGuTEw 209d536ee6c3d769de0f59d643dd4eb25da7624a 2020-11-14T17:19:56.000Z",

The cell process proxy transition operator throws a an exception instead of returning an error.

" .... repsonse is not defined"

From line:

https://github.com/Encapsule/holistic/blob/v0.0.47-alexandrite/PACKAGES/holarchy/lib/intrinsics/CellProcessProxy/TransitionOperator-cpp-proxy-operator.js#L55

Holism RTL: "contentType" in binding for a service filter is required yet ignored.

Build info:

"appgen": "@encapsule/holistic v0.0.47 alexandrite Jvp9FcdjQNuiXkE2zcUjJA 4854c0117a5fa5e257006b334d52368e1997cfc0 2020-11-01T16:38:28.000Z",

Suppose I have a service filter that serves content of type "application/json" as shown below:

let factoryResponse = httpServiceFilterFactory.create({
    id: "TxTaBMnjRAGUkRuf7rwUlg",
    name: "Demo JSON service filter",
    description: "A sample of a service filter that returns JSON as content.",
    constraints: {
         request: {
            content: { encoding: "utf8", type: "text/plain" },
            query_spec: { ____opaque: true },
            request_spec: { ____opaque: true },
            options_spec: { ____opaque: true }
        },
        response: {
            content: { encoding: "utf8", type: "application/json" },
            error_context_spec: { ____opaque: true },
            result_spec: { ____opaque: true }
        }
    },
    handlers: {
        request_handler: (request_) => {
            request_.response_filters.result.request({
                streams: request_.streams,
                integrations: request_.integrations,
                request_descriptor: request_.request_descriptor,
                response_descriptor: {
                    http: { code: 200 },
                    content: { encoding: "utf8", type: "application/json" },
                    data: {foo: "bar"}
                }
            });
            return {result: undefined};
        }
    }
});

if (factoryResponse.error) throw new Error(factoryResponse.error);
const demoJSONServiceFilter = factoryResponse.result;

The value of what will be the "content-type" header in the response is clearly "application/json"

When binding that service filter to a route in the config.services object used when constructing the holism server, I am also required to specify the "contentType"

{
    authentication: { required: false },
    filter: demoAsyncServiceFilter,
    request_bindings: { method: "GET", uris: [ "/demoasync" ] },
    response_properties: { contentEncoding: "utf8", contentType: "application/json" },
}

So I have now specified the "content-type" in 2 places, so which value is actually used?

If I change the "contentType" in the binding to something else e.g. "text/html" then the value I actually see when making the request remains "application/json", so clearly the value in the binding is not being used. If I remove, the contentType from "response_properties" then an exception from a filter error for the missing contentType member is thrown and server start fails.

The conclusion is that the "contentType" in the binding is not actually used for the "content-type" header in the response, yet I am still required to provide it.

Include client.js from appGen script when creating a new derived repo.

Build info:

"appgen": "@encapsule/holistic v0.0.46 crossroads CfA9bf7rR6WKBhqnhjgKWw 99ccf316fd664cd9fd66c9c624a3524ae95158cd 2020-09-23T21:44:33.000Z",

To reproduce:

  1. Create a new git repo by running yarn init and git init.
  2. Run holistic appgen with appRepoDir set to the new local repo directory,
  3. Add and commit all files in the derived repo.
  4. Run yarn build on the derived repo.

The following error will result:

ERROR in Entry module not found: Error: Can't resolve '/Users/viewpathuser/workspace2/holistic-bugs/BUILD/transpile-phase1/CLIENT/client.js' in '/Users/viewpathuser/workspace2/holistic-bugs' resolve '/Users/viewpathuser/workspace2/holistic-bugs/BUILD/transpile-phase1/CLIENT/client.js' in '/Users/viewpathuser/workspace2/holistic-bugs'

An empty or skeleton "client.js" should be included from appgen so that the derived repo will build initially.

cpm process query throws exception instead of returning error.

Build:

"appgen": "@encapsule/holistic v0.0.46 crossroads CfA9bf7rR6WKBhqnhjgKWw 99ccf316fd664cd9fd66c9c624a3524ae95158cd 2020-09-23T21:44:33.000Z",

An exception is thrown when using the cpm query controller action:

https://github.com/Encapsule/holistic/blob/v0.0.46-crossroads/PACKAGES/holarchy/lib/intrinsics/CellProcessManager/ControllerAction-cpm-process-query.js

If the query is unable to find the requested process, instead of returning an error an unhandled exception is encountered:

"ERROR in 4 ms: Handled exception during controller action dispatch: repsonse is not defined"

which is originating from here: https://github.com/Encapsule/holistic/blob/v0.0.46-crossroads/PACKAGES/holarchy/lib/intrinsics/CellProcessManager/lib/cpm-get-cell-process-descriptor.js#L64

cellProcessQuery does not find singleton instance unless "singleton" is explicitly passed.

Build info:

"appgen": "@encapsule/holistic v0.0.46 crossroads KdclOLg3SyqYSF6u2YUbDg 8e52b7dc753f874256a631b2244721553e41a5dd 2020-09-29T18:58:04.000Z",

When starting a cell process using:

holarchy: { CellProcessor: { process: { create: { apmID: "12345 ..." } } } }

A "cellProcessUniqueName" is not required, the name is defaulted to "singleton" by the cpm.

When I go to query for the same process, I have to pass in "singleton" for "cellProcesssUniqueName" or the query will not find the process. In other words:

holarchy: { CellProcessor: { process: { query: { queryCellProcess: { cellProcessNamespace: { apmID, //TODO this shouldn't be required after upgrading to the latest version of holistic. cellProcessUniqueName: "singleton" } } } } } }

Works whereas:

holarchy: { CellProcessor: { process: { query: { queryCellProcess: { cellProcessNamespace: { apmID, } } } } } }

does not.

If I am not required to pass in a unique name to create the process, I should not be required to pass in the uniqueName to query it. Getting the query to work requires me to know the default name that is being used by the CPM.

holarchy array isEmpty Transition operator throws exception.

Build info: "appgen": "@encapsule/holistic v0.0.46 crossroads t10PUwZHS3e8dhu3oBpMRA 10e623d9d2dbfb86af25bf3795dc8ec73e9af666 2020-10-08T18:50:20.000Z",

When attempting to use the holarchy arrayIsEmpty operator in an apm, for example:

holarchy: { cm: { operators: { ocd: { arrayIsEmpty: { path: "#.foo.bar..."

An exception is thrown:

OPC::evaluate <XSwV...> [4:0] TransitionOperator threw an illegal exception that was handled by OPC: Cannot read property 'path' of undefined

Error is originating here:

https://github.com/Encapsule/holistic/blob/v0.0.46-crossroads/PACKAGES/holarchy/lib/intrinsics/HolarchyCore/HolarchyCoreMemory/TransitionOperator-ocd-array-is-empty.js#L45

because line 43 should have "arrayIsEmpty" instead of "isArrayEmpty"

ComponentRouter React Component should not require context theme specific to ComponentRouter.

Build:

"appgen": "@encapsule/holistic v0.0.46 crossroads CfA9bf7rR6WKBhqnhjgKWw 99ccf316fd664cd9fd66c9c624a3524ae95158cd 2020-09-23T21:44:33.000Z",

ComponentRouter:

https://github.com/Encapsule/holistic/blob/v0.0.46-crossroads/PACKAGES/d2r2/lib/ComponentRouter.jsx#L168

Currently requires specific themes e.g. metadata.site.theme.ComponentRouterError... to be present in the render context to correctly render if an error occurs such as not finding a registered r2d2 component for the render message. In the absence of the correct theme in the render context, the ComponentRouter React component throws and renders nothing.

It is not reasonable for consumers of ComponentRouter to be aware and provide themes specific to ComponentRouter in the renderContext in order for it to properly handle errors.

readNamespace - Need a better facility for reading from proxied namespaces.

Inside the bodyFunction of a controller action, one may want to read from a sub namespace that is connected by a proxy. Using context.ocdi.readNamespace in a proxied namespace will yield a result like:

{
    CPPU-UPgS8eWiMap3Ixovg_private: {

        lcpConnect: "~.gFUcyA0qSrq7Z4Vpn1oIZA_CellProcesses.cellProcessMap.4ODg4BoaGhqkpKSkX19fXw"

        lcpRequest: {

            apmID: "gFUcyA0qSrq7Z4Vpn1oIZA",

            instanceName: "singleton"
   }
}

If I want to read from the actual proxied apm ocd, I can do something like this, to the the lcpConnect string and then use that as a path value to read the actual value from the proxy:

const lcpConnect = readResponse.result[Object.keys(readResponse.result)[0]].lcpConnect;
readResponse = context.ocdi.readNamespace(lcpConnect);

This is a very clunky implementation, either readNamespace needs to be able to sort out a proxied namespace, or we need some sort of wrapper function to do the same.

AppClientDisplayAdapter - Incorrect transition operator signature in apm.

Build info:

appgen": "@encapsule/holistic v0.0.46 crossroads 8Ei6heL7RE66YL0q5jkslw 450d4fe4c7db0085ce31b323b0d4eb70fff1eac6 2020-09-26T22:55:07.000Z",

Exception is being thrown on evaluation of transition operator in the apm declaration:

https://github.com/Encapsule/holistic/blob/v0.0.46-crossroads/PACKAGES/holistic-app-client-cm/AppClientDisplayAdapter/AbstractProcessModel-app-client-display-adapter.js#L297

The signature at the above line should be "cell" instead of "opmi"

queryCellProcess should not return an error if it can't find the process for the passed apmID

Build info: "appgen": "@encapsule/holistic v0.0.46 crossroads KdclOLg3SyqYSF6u2YUbDg 8e52b7dc753f874256a631b2244721553e41a5dd 2020-09-29T18:58:04.000Z",

Using cell processor query such as:

          `holarchy: {
                CellProcessor: {
                    process: {
                        query: {
                            queryCellProcess: {
                                cellProcessNamespace: {
                                    apmID: "foo"
                               }
                          }
                   }
             }
      }`

I want to find if a process is running (the process may or may not be running).

If the process is not running, then the query should return some sort of empty result. Instead I get an error and a big orange box logged to the console with text like:

"ControllerAction request was successfully parsed and routed to plug-in filter delegate [r-JgxABoS_a-mSE2c1nvKA::Cell Process Manager: Process Query]. But, the plug-in rejected the request with error: Filter [r-JgxABoS_a-mSE2c1nvKA::Cell Process Manager: Process Query] failed while performing main operation. Filter [CxS4tmxfRdSF6C7pljlm5Q::cpmLib: Get Cell Process Descriptor] failed while performing main operation. Invalid cellProcessID specified. No active cell process with ID 'zkhowzwqMaTMU8prQEM_yA'. From the perspective of this error handler it's difficult to say precisely what this error means given the broad semantics of ControllerAction plug-in filters. Here is a list of possible problems in decreasing order of liklihood: Your request format may be invalid above the point in the request data where the message router made its delegate selection and this error is the plug-in rejecting the request entirely. Or, the selected ControllerAction plug-in filter may implement some sort of additional input value validation that constrains the permissible input beyond what's examined by the message router and ControllerAction plug-in filters. And, you've violated API constraints. Or, you have made a valid request but applied the action to the wrong type of cell (i.e. you think you're acting on a cell bound to APM X but it's really bound to a Y). Or, the cell you're attempting to act upon is not in the correct process step or otherwise prepared to accept or take action on behalf of the caller. Or, there's a bug in the ControllerAction plug-in filter itself. If you track down the source of this error and it's not on this list please report it!" ....

I would normally expect the semantics of a query to be such that not finding the thing that I query would return an empty result not an error.

Modify generate runtime build tag to work with AWS Codepipeline

While building a holism derived Node server via AWS code pipeline, I encountered the following issue.

https://forums.aws.amazon.com/thread.jspa?threadID=251732

The summary of the issue is that the .git directory and hence any git commands are not available on the build server, and this causes the derived generate script: "generate-runtime-build-tag.js" to fail which fails the build. There is an environment variable available that contains the git hash of the commit being built. Therefore, to build a holism derived server on AWS Code Pipeline requires a small modification to the below file:

https://github.com/Encapsule/holistic/blob/master/PROJECT/GENERATOR/TEMPLATES/generate-runtime-buildtag.js.hbs

Which could look like this:

let commitHash;

if (process.env.CODEBUILD_RESOLVED_SOURCE_VERSION) {
    commitHash = process.env.CODEBUILD_RESOLVED_SOURCE_VERSION
} else {
    commitHash = childProcess.execSync('git rev-parse HEAD').toString('utf8').trim();
}

AppClientDisplayAdapter failing to initialize with TransitionOperator returning error.

Build info:

"appgen": "@encapsule/holistic v0.0.46 crossroads 8Ei6heL7RE66YL0q5jkslw 450d4fe4c7db0085ce31b323b0d4eb70fff1eac6 2020-09-26T22:55:07.000Z",

OPC::evaluate <gRyJ...> [2:1] TransitionOperator request was successfully parsed and routed to plug-in filter delegate [9tNY7o5GTUGH_xda2GhP-w::Cell Process In Step Operator]. But, the plug-in rejected the request with error: Filter [9tNY7o5GTUGH_xda2GhP-w::Cell Process In Step Operator] failed while performing main operation. Filter [RNUkdw8VT8WLz5H_i-SwYg::Data Path Resolve Filter] failed while performing main operation. Invalid dataPath '#.//.//.//.//' references namespace at or above the anonymous '~' namespace.

Offending code:

https://github.com/Encapsule/holistic/blob/v0.0.46-crossroads/PACKAGES/holistic-app-client-cm/AppClientDisplayAdapter/AbstractProcessModel-app-client-display-adapter.js#L96

Delegate not working for transition operators.

Build info: appgen": "@encapsule/holistic v0.0.47 alexandrite Jvp9FcdjQNuiXkE2zcUjJA 4854c0117a5fa5e257006b334d52368e1997cfc0 2020-11-01T16:38:28.000Z",

The delegate transition operator with signature:

CellProcessor: { cell: { cellCoordinates: "#.cell2Proxy", delegate: { ...

Does not work, the operator being dispatched does not get the correct apmBindingPath.

An example is in this branch: https://github.com/Viewpath/viewpath5/tree/delegate-bug

node
var cp = require("./SOURCES/CLIENT/delegate-test")

cp.toJSON().opc.toJSON().ocdi.toJSON().PKj0xsAzRkC9SR_TiS1ZrA_CellProcesses

{ cellProcessMap: { '4ODg4BoaGhqkpKSkX19fXw': { cell2Proxy: [Object], __apmiStep: 'waiting_for_cell_2' } }, revision: 1 }

The APM for cell1 " '4ODg4BoaGhqkpKSkX19fXw" should transition to ready state because cell2 " x7pM9bwcReupSRh0fcYTgw" is in ready state but no such transition occurs.

https://github.com/Viewpath/viewpath5/blob/delegate-bug/SOURCES/CLIENT/delegate-test/cellModel1/index.js#L54

Looking at the debugger it does not appear that the apmBindingPath is being resolved correctly in the proxy in the implementation for the delegate operator.

Include context from transition when an action is dispatched from opc.evaluate.

When an action signature is in an APM as an "enter" or "exit" action, it would be great to have some context from the transition included when that action is dispatched from opc.evaluate(). Currently, inside an action bodyFunction there is no way to tell what the target state of the APM is for the invocation. Actions currently have access to the "__apmiStep" from the ocdi, but that will contain the step that was last written to the ocdi and not the step that the APM will be (potentially) transitioning to.

Similarly it would be nice to know within a bodyFunction of an action whether the action was invoked by an external actor as opposed to opc.evaluate(), because most actions will be intended for one manner of invocation or the other, but not both and there is currently no way to distinguish them at runtime.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.