Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action doc #93

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,6 @@ tags
.idea
.build-cache
submodules/flogo-cicd/.build-cache
./Dockerfile
./Dockerfile

operations/utils
32 changes: 32 additions & 0 deletions action/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Introduction

This is a Flogo Action implementation of the CatalystMl Specification. It can also act as a standalone Go implementation of the CatalystMl. For more information about Flogo Action please visit `` .

# Implementation Details :

This Flogo Action creates a pipeline of the operations specified in JSON spec and executes it sequentially. One of the challenging aspect of the pipeline is resolving the data in the spec.
Mappers, Resolvers and Scope Interfaces provided by Project-Flogo core reposisotiry is used to simplify the resolution of data. For more information please visit [Project-flogo/core](https://github.com/project-flogo/core).

## Detailed Implementation:

The implementation of CML specification in Flogo can be divided into three steps:

* Configuration.
* Initialization.
* Execution.

### Configuration.

The CML JSON spec is unmarshalled into a [DefinitionConfig](pipeline/definition.go) struct .This struct is used to set up [Instance](pipeline/instance.go) of the
pipleine.

### Initialization.
During the initialization of pipeline instance [Mappers](https://github.com/project-flogo/core/blob/master/data/mapper/mapper.go) are set up for Input and Output of the CML.
[Operations](operation/operation.go) (defined in the CML spec) are also initialized. The Registered operations are fetched and initialized using
[factories](operation/registry.go). The mappers for input and output of each operation are also initialized.

### Execution.
After the initialization, when the action is called, the program iterates over each operation executing it. The input mappers of each operations is resolved before executing it. Only the inputs defined by the operation are sent over for the execution. There can be other variables in the pipeline scope that are not passed in execution of operation.
After the execution of operation, the output mappers are resolved and are added in the pipeline scope; even if not needed by further operations. For more information on how mappers and resolvers work Please visit [Mappers](https://github.com/project-flogo/core/blob/master/data/mapper/mapper.go)
, [Resolvers](https://github.com/project-flogo/core/blob/master/data/resolve/resolve.go), [Scope](https://github.com/project-flogo/core/blob/master/data/resolve/scope.go). The resolution of input and output is done using pipeline scope . The pipeline scope is nothing but the collection of all the variables, which are the output of each operations and input of CML, and its value
. After execution of all the operations the output of the CML is resolved and returned
15 changes: 0 additions & 15 deletions action/example/operation/go.mod

This file was deleted.

Binary file removed action/example/samplefps/bin/samplefps
Binary file not shown.
11 changes: 11 additions & 0 deletions examples/README.MD
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
# CatalystML-Flogo implementaion Examples

# Usage

## Standalone Flogo App with Catalyst Ml.


## Flogo App with Flogo Flow and Catalyst Ml.

## Go App as Flogo App and Catalyst Ml.

## Standalone Go App with Catalyst Ml.
9 changes: 9 additions & 0 deletions examples/operation/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module github.com/project-flogo/operation/math

go 1.12

require (
github.com/project-flogo/catalystml-flogo/action v0.0.0
)

replace github.com/project-flogo/catalystml-flogo/action => ../../action
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ require (

)

replace github.com/project-flogo/catalystml-flogo/action => ../../../
replace github.com/project-flogo/catalystml-flogo/action => ../../../action

replace github.com/project-flogo/operation/math => ../../operation
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ github.com/project-flogo/core v0.9.1 h1:c+nYS1Gf8F+asZmTZdLmKm2rd3phFealR3z30Oep
github.com/project-flogo/core v0.9.1/go.mod h1:QGWi7TDLlhGUaYH3n/16ImCuulbEHGADYEXyrcHhX7U=
github.com/project-flogo/core v0.9.2 h1:1j7d8e6ivwnhyRudeTRIZlr2XCNa+SERrmcrzKswr0Y=
github.com/project-flogo/core v0.9.2/go.mod h1:QGWi7TDLlhGUaYH3n/16ImCuulbEHGADYEXyrcHhX7U=
github.com/project-flogo/core v0.9.4-beta.2 h1:o2aWHasV6bJFALrYDW8S2x521bUfuJ1Ba4Be/uTqGVs=
github.com/project-flogo/core v0.9.4-beta.2/go.mod h1:QGWi7TDLlhGUaYH3n/16ImCuulbEHGADYEXyrcHhX7U=
github.com/project-flogo/flow v0.9.1 h1:SbfooB8AMd1lvIUA0mBf5RvvJPpH26OK7Mz8lKSgHlE=
github.com/project-flogo/flow v0.9.1/go.mod h1:ZvUloTpSwAFTBF8SFPerGRuvJ6DduOuW6UJ2pR3Kvdg=
Expand Down Expand Up @@ -52,6 +53,7 @@ go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/multierr v1.2.0 h1:6I+W7f5VwC5SV9dNrZ3qXrDB9mD0dyGOi/ZJmYw03T4=
go.uber.org/multierr v1.2.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o=
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
Expand Down
File renamed without changes.