openflow

build from source

Developer setup

Install VSCode, NodeJS 12, mongoDB and RabbitMQ

Clone this repo into a folder, in a shell type

git clone https://github.com/open-rpa/openflow.git

go to the folder with openflow

cd openflow

Install gulp and typescript globally

npm i gulp typescript browserify tsify -g

install packages for openflow api/web

npm i

install packages for NodeRED by

cd OpenFlowNodeRED npm i

cd ..

Now open in VS code

code OpenFlow.code-workspace

at the top level create a folder called config and inside create a file called .env ( notice it starting with a dot)

and add this content to the file

nodered_id=nodered1
nodered_sa=nodered1
auto_create_user_from_jwt=true
port=80
nodered_port=1880
tls_crt=
tls_key=
tls_ca=

signing_crt=LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURqRENDQW5TZ0F3SUJBZ0lKQUp5N0tIMTE1dkQ4TUEwR0NTcUdTSWIzRFFFQkN3VUFNRnN4Q3pBSkJnTlYKQkFZVEFrUkxNUk13RVFZRFZRUUlEQXBUYjIxbExWTjBZWFJsTVNFd0h3WURWUVFLREJoSmJuUmxjbTVsZENCWAphV1JuYVhSeklGQjBlU0JNZEdReEZEQVNCZ05WQkFNTUMzTnBaMjVwYm1kalpYSjBNQjRYRFRFNU1EUXdOekUwCk5ETXpORm9YRFRJNU1EUXdOREUwTkRNek5Gb3dXekVMTUFrR0ExVUVCaE1DUkVzeEV6QVJCZ05WQkFnTUNsTnYKYldVdFUzUmhkR1V4SVRBZkJnTlZCQW9NR0VsdWRHVnlibVYwSUZkcFpHZHBkSE1nVUhSNUlFeDBaREVVTUJJRwpBMVVFQXd3TGMybG5ibWx1WjJObGNuUXdnZ0VpTUEwR0NTcUdTSWIzRFFFQkFRVUFBNElCRHdBd2dnRUtBb0lCCkFRQy9JSkdEaGxLTU9SWkoycXQwSWpjSDZOWUFtZDVxQzQ4dkNJRE54QWZCbmQxQnN4WlVjWkl5dkFlT28yNDcKM3I0eTYwNDgxRHVUS2JaMTBTNjRqRU05aW1XTXB1TFlJRnVyQ3BWNzVEWWhxMS85Q0FJVHJqNjlmVDluSkptcw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3BWR1RnNEdzTnBJQ3VNTEJUaXJ6M0ZRV25UNFNZbzkrREVoalhEeVQKWlVOMERtUkJVNjNjWjRLSUlXd2xWUTA9Ci0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K
NODE_ENV=development

saml_federation_metadata=http://localhost.openiap.io/issue/FederationMetadata/2007-06/FederationMetadata.xml
saml_issuer=uri:localhost.openiap.io
# saml_entrypoint=http://localhost.openiap.io/issue
# saml_baseurl=http://localhost.openiap.io:1880/

allow_personal_nodered=false
allow_user_registration=true
# mongodb_url=mongodb://localhost:27017
# mongodb_db=openflow

# api_bypass_perm_check=true
update_acl_based_on_groups=true
multi_tenant=false

websocket_max_package_count=1048576

api_ws_url=ws://localhost.openiap.io
domain=localhost.openiap.io
protocol=http
amqp_url=amqp://localhost
aes_secret=7TXsxf7cn9EkUqm5h4MEWGjzkxkNCk2K
auto_create_users=true
auto_create_domains=
skip_history_collections=audit,jslog

Next you need to allow powershell scripts to run, i don’t know what is the recommended setting, i normally just go with bypass

Set-ExecutionPolicy Bypass -Force

Now you can run this by going to run ( Ctrl+Shit+D) and selecting OpenFlow in the dropdown box and press play button, select OpenFlowNodeRed in the dropdown and press play again

Now, this will serve an empty webpage, so we need to build the stylesheets and copy the compiled files to the dist folder, so go to the Terminal tab and add a new shelll, then type

gulp sass

Lastly we can bundle and minify the asserts to the dist folder, by typing

gulp

doing developerment, you can run the bundle without the minifyer by typing

gulp watch

You can now access openflow web on http://localhost.openiap.io and nodered on http://localhost.openiap.io:1880

Before starting nodered you either need to signin to openflow and create a user with username nodered1 or add auto_create_user_from_jwt=true to the .env file

For further help or education contact OpenIAP for a support agreement