├── client ├── static │ ├── .gitkeep │ ├── bpmn │ │ └── bpmn-js-properties-panel │ │ │ ├── index.js │ │ │ ├── lib │ │ │ ├── provider │ │ │ │ ├── bpmn │ │ │ │ │ ├── index.js │ │ │ │ │ └── parts │ │ │ │ │ │ ├── NameProps.js │ │ │ │ │ │ ├── implementation │ │ │ │ │ │ ├── SignalEventDefinition.js │ │ │ │ │ │ ├── MessageEventDefinition.js │ │ │ │ │ │ └── Name.js │ │ │ │ │ │ ├── IdProps.js │ │ │ │ │ │ ├── ExecutableProps.js │ │ │ │ │ │ └── LinkProps.js │ │ │ │ └── camunda │ │ │ │ │ ├── index.js │ │ │ │ │ ├── parts │ │ │ │ │ ├── InputOutputParameterProps.js │ │ │ │ │ ├── ListenerProps.js │ │ │ │ │ ├── InputOutputProps.js │ │ │ │ │ ├── ConnectorInputOutputParameterProps.js │ │ │ │ │ ├── ConnectorInputOutputProps.js │ │ │ │ │ ├── AsynchronousContinuationProps.js │ │ │ │ │ ├── ListenerFieldInjectionProps.js │ │ │ │ │ ├── FieldInjectionProps.js │ │ │ │ │ ├── StartEventInitiator.js │ │ │ │ │ ├── HistoryTimeToLiveProps.js │ │ │ │ │ ├── implementation │ │ │ │ │ │ ├── JobPriority.js │ │ │ │ │ │ ├── ExternalTaskPriority.js │ │ │ │ │ │ ├── HistoryTimeToLive.js │ │ │ │ │ │ ├── External.js │ │ │ │ │ │ └── ResultVariable.js │ │ │ │ │ ├── PropertiesProps.js │ │ │ │ │ ├── JobConfigurationProps.js │ │ │ │ │ ├── AddRoles.js │ │ │ │ │ ├── ExternalTaskConfigurationProps.js │ │ │ │ │ ├── VersionTagProps.js │ │ │ │ │ ├── MultiInstanceLoopProps.js │ │ │ │ │ ├── UserTaskProps.js │ │ │ │ │ └── ConnectorDetailProps.js │ │ │ │ │ └── element-templates │ │ │ │ │ ├── util │ │ │ │ │ └── validate.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── ElementTemplates.js │ │ │ │ │ └── cmd │ │ │ │ │ └── index.js │ │ │ ├── index.js │ │ │ ├── factory │ │ │ │ ├── EntryFieldDescription.js │ │ │ │ ├── TextBoxEntryFactory.js │ │ │ │ ├── LabelFactory.js │ │ │ │ ├── LinkEntryFactory.js │ │ │ │ └── ValidationAwareTextInput.js │ │ │ ├── helper │ │ │ │ ├── ElementHelper.js │ │ │ │ ├── ParticipantHelper.js │ │ │ │ └── MyConfigsHelper.js │ │ │ ├── cmd │ │ │ │ ├── index.js │ │ │ │ └── MultiCommandHandler.js │ │ │ └── PropertiesActivator.js │ │ │ └── styles │ │ │ ├── listeners.less │ │ │ ├── header.less │ │ │ ├── config.json │ │ │ ├── _mixins.less │ │ │ ├── groups.less │ │ │ └── tabs.less │ ├── img │ │ └── favicon.ico │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── main-fonts.eot │ │ ├── main-fonts.ttf │ │ ├── main-fonts.woff │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── bpmnpluginwatcher.js │ └── js │ │ ├── checkbox.js │ │ ├── radiobutton.js │ │ └── selectValue.js ├── .eslintignore ├── src │ ├── assets │ │ ├── styles │ │ │ └── index.less │ │ └── images │ │ │ ├── logo.png │ │ │ ├── mongo.png │ │ │ ├── nedb.png │ │ │ ├── rethink.png │ │ │ ├── Flowz-Icon.png │ │ │ ├── Flowz-logo.png │ │ │ └── elasticsearch.png │ ├── pages │ │ ├── user │ │ │ ├── processlist.vue │ │ │ └── viewSVG.vue │ │ └── flow │ │ │ ├── emailTemplate.js │ │ │ ├── viewSVG.vue │ │ │ └── own_assign.vue │ ├── masterLayout │ │ ├── Footer.vue │ │ └── Master.vue │ ├── area │ │ ├── Flow.vue │ │ ├── Schema.vue │ │ ├── Approval.vue │ │ └── DbSettings.vue │ ├── api │ │ ├── receiveform │ │ │ └── index.js │ │ ├── dataquery │ │ │ └── index.js │ │ ├── userlogin │ │ │ └── index.js │ │ ├── sendmail │ │ │ └── index.js │ │ ├── emailtemplate │ │ │ └── index.js │ │ ├── flowz │ │ │ └── index.js │ │ ├── flowzdata │ │ │ └── index.js │ │ ├── finstance │ │ │ └── index.js │ │ ├── dflowzdata │ │ │ └── index.js │ │ ├── authentication │ │ │ └── index.js │ │ ├── schema │ │ │ └── index.js │ │ └── bpmnplugins │ │ │ └── index.js │ ├── store │ │ ├── state.js │ │ ├── index.js │ │ ├── getters.js │ │ ├── mutations.js │ │ └── actions.js │ ├── bpmn-custom-module │ │ ├── viewindex.js │ │ └── index.js │ ├── components │ │ ├── configExpand.vue │ │ └── subscription.vue │ ├── mixins │ │ └── emitter.js │ ├── Utils │ │ └── index.js │ └── App.vue ├── .dockerignore ├── rethinkdb_data │ ├── metadata │ ├── 06f5cf1f-ac2a-4b54-a7b5-92a1b656ae05 │ ├── 18cab67f-fd0f-46c5-b123-7d8a45bfef91 │ ├── 1f699b4a-a454-4df6-bd3b-55a7e52abb25 │ ├── 1fadfd28-6b36-4f57-903c-43413e18280f │ ├── 23aa7208-02d5-4db8-b786-6bcf4f612bd6 │ ├── 430584e9-4df7-4347-8170-c3c8438385f9 │ ├── 579138a2-18bc-46fe-b79e-4c2e037c2767 │ ├── 7302ecfe-1554-4be3-9f7b-ba13e6734eb8 │ ├── c18ec04e-af0e-4408-81b8-585b8c4895d2 │ └── e372d55e-8221-4a84-aa52-762ce6a8c0f3 ├── test │ ├── unit │ │ ├── .eslintrc │ │ ├── specs │ │ │ └── Hello.spec.js │ │ ├── index.js │ │ └── karma.conf.js │ └── e2e │ │ ├── specs │ │ └── test.js │ │ ├── custom-assertions │ │ └── elementCount.js │ │ ├── runner.js │ │ └── nightwatch.conf.js ├── config │ ├── test.env.js │ ├── prod.env.js │ ├── dev.env.js │ └── index.js ├── .editorconfig ├── .postcssrc.js ├── .htaccess ├── .gitignore ├── build │ ├── dev-client.js │ ├── vue-loader.conf.js │ ├── build.js │ ├── webpack.test.conf.js │ ├── check-versions.js │ └── webpack.dev.conf.js ├── vhost.conf ├── .babelrc ├── debug.log ├── README.md ├── .eslintrc.js ├── vhost_ssl_staging.conf ├── index.html ├── vhost_ssl_qa.conf ├── vhost_ssl_develop.conf ├── vhost_ssl_master.conf ├── Dockerfile ├── privkey │ ├── privkey_staging.pem │ ├── privkey_master.pem │ ├── privkey_qa.pem │ └── privkey_develop.pem └── cert │ ├── cert_master.pem │ └── cert_develop.pem ├── JobQue ├── .vscode │ └── settings.json ├── mail │ ├── .gitignore │ ├── config.json │ └── package.json ├── .dockerignore ├── docs │ ├── capacity.png │ ├── lifeCycle.png │ ├── workflow.png │ └── README.md ├── twitter │ ├── mylog │ ├── .gitignore │ ├── package.json │ ├── config.json │ └── twitter.js ├── scheduler │ ├── logs │ ├── .gitignore │ ├── scheduler.js │ ├── config.js │ ├── package.json │ ├── ca.cer │ ├── default.json │ └── process.js ├── seneca-job-queue │ ├── runAll.js │ ├── worker-need.js │ ├── common.js │ ├── package.json │ ├── ca.cer │ └── job-web.js ├── docker-compose.yml ├── Dockerfile └── .gitignore ├── .directory ├── README.md ├── service ├── .dockerignore ├── public │ └── favicon.ico ├── config │ ├── custom-environment-variables.json │ ├── production.json │ └── default.json ├── Dockerfile ├── .editorconfig ├── src │ ├── services │ │ ├── flowz │ │ │ ├── flowz.filters.js │ │ │ ├── flowz.hooks.js │ │ │ └── flowz.service.js │ │ ├── schema │ │ │ ├── schema.filters.js │ │ │ ├── schema.hooks.js │ │ │ └── schema.service.js │ │ ├── bpmnplugins │ │ │ ├── bpmnplugins.filters.js │ │ │ ├── bpmnplugins.hooks.js │ │ │ └── bpmnplugins.service.js │ │ ├── emailtemplate │ │ │ ├── emailtemplate.filters.js │ │ │ ├── emailtemplate.hooks.js │ │ │ └── emailtemplate.service.js │ │ ├── dataquery │ │ │ ├── dataquery.filters.js │ │ │ ├── dataquery.class.js │ │ │ └── dataquery.service.js │ │ ├── sendmail │ │ │ ├── sendmail.filters.js │ │ │ ├── sendmail.hooks.js │ │ │ └── sendmail.service.js │ │ ├── dflowzdata │ │ │ ├── dflowzdata.filters.js │ │ │ └── dflowzdata.service.js │ │ ├── finstance │ │ │ ├── finstance.filters.js │ │ │ └── finstance.service.js │ │ ├── flowzdata │ │ │ ├── flowzdata.filters.js │ │ │ └── flowzdata.service.js │ │ ├── email-templates │ │ │ ├── email-templates.filters.js │ │ │ ├── email-templates.hooks.js │ │ │ └── email-templates.service.js │ │ ├── email-receive │ │ │ └── email-receive.hooks.js │ │ ├── config.js │ │ ├── index.js │ │ └── ca.crt │ ├── index.js │ ├── hooks │ │ └── logger.js │ ├── app.hooks.js │ ├── rethinkdb.js │ └── middleware │ │ └── index.js ├── test │ ├── services │ │ ├── schema.test.js │ │ ├── sendmail.test.js │ │ ├── dataquery.test.js │ │ ├── finstance.test.js │ │ ├── flowzdata.test.js │ │ ├── bpmnplugins.test.js │ │ └── emailtemplate.test.js │ └── app.test.js ├── .eslintrc.json ├── .npmignore ├── LICENSE └── README.md ├── finish_demo.sh ├── .vscode └── launch.json ├── netlify.toml ├── upgrade_demo.sh └── LICENSE /client/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /JobQue/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | } -------------------------------------------------------------------------------- /JobQue/mail/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /client/.eslintignore: -------------------------------------------------------------------------------- 1 | build/*.js 2 | config/*.js 3 | -------------------------------------------------------------------------------- /client/src/assets/styles/index.less: -------------------------------------------------------------------------------- 1 | @import "./custom"; -------------------------------------------------------------------------------- /.directory: -------------------------------------------------------------------------------- 1 | [Dolphin] 2 | Timestamp=2017,12,5,10,45,27 3 | Version=3 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flowz 2 | Flowz working on flow base programming 3 | 4 | -------------------------------------------------------------------------------- /JobQue/.dockerignore: -------------------------------------------------------------------------------- 1 | mail/ 2 | node_modules/ 3 | twitter/ 4 | .gitignore 5 | -------------------------------------------------------------------------------- /client/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .gitignore 3 | Dockerfile 4 | LICENSE 5 | -------------------------------------------------------------------------------- /service/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .gitignore 3 | Dockerfile 4 | LICENSE 5 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib'); 2 | -------------------------------------------------------------------------------- /JobQue/docs/capacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/JobQue/docs/capacity.png -------------------------------------------------------------------------------- /JobQue/docs/lifeCycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/JobQue/docs/lifeCycle.png -------------------------------------------------------------------------------- /JobQue/docs/workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/JobQue/docs/workflow.png -------------------------------------------------------------------------------- /service/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/service/public/favicon.ico -------------------------------------------------------------------------------- /JobQue/docs/README.md: -------------------------------------------------------------------------------- 1 | flowcharts related to scheduler and process flow of jobqueue can be found in this folder 2 | -------------------------------------------------------------------------------- /client/rethinkdb_data/metadata: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/rethinkdb_data/metadata -------------------------------------------------------------------------------- /client/src/pages/user/processlist.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/static/img/favicon.ico -------------------------------------------------------------------------------- /client/src/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/src/assets/images/logo.png -------------------------------------------------------------------------------- /client/src/assets/images/mongo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/src/assets/images/mongo.png -------------------------------------------------------------------------------- /client/src/assets/images/nedb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/src/assets/images/nedb.png -------------------------------------------------------------------------------- /client/static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /client/static/fonts/main-fonts.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/static/fonts/main-fonts.eot -------------------------------------------------------------------------------- /client/static/fonts/main-fonts.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/static/fonts/main-fonts.ttf -------------------------------------------------------------------------------- /client/static/fonts/main-fonts.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/static/fonts/main-fonts.woff -------------------------------------------------------------------------------- /client/src/assets/images/rethink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/src/assets/images/rethink.png -------------------------------------------------------------------------------- /client/src/assets/images/Flowz-Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/src/assets/images/Flowz-Icon.png -------------------------------------------------------------------------------- /client/src/assets/images/Flowz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/src/assets/images/Flowz-logo.png -------------------------------------------------------------------------------- /client/src/masterLayout/Footer.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/assets/images/elasticsearch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/src/assets/images/elasticsearch.png -------------------------------------------------------------------------------- /client/src/pages/flow/emailTemplate.js: -------------------------------------------------------------------------------- 1 | let sendemail = { 2 | sendInviteemail: 'Hello' 3 | } 4 | module.exports = sendemail 5 | -------------------------------------------------------------------------------- /client/static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /client/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /client/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /client/static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /service/config/custom-environment-variables.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": "PORT", 3 | "host": "HOST", 4 | "rdb_host": "RDB_HOST", 5 | "rdb_port": "RDB_PORT" 6 | } -------------------------------------------------------------------------------- /client/test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "mocha": true 4 | }, 5 | "globals": { 6 | "expect": true, 7 | "sinon": true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /finish_demo.sh: -------------------------------------------------------------------------------- 1 | curl -u ""$RANCHER_USER":"$RANCHER_PASS"" \ 2 | -X POST \ 3 | 'http://rancher.flowz.com:8080/v2-beta/projects/1a29/services/1s316?action=finishupgrade' 4 | -------------------------------------------------------------------------------- /client/rethinkdb_data/06f5cf1f-ac2a-4b54-a7b5-92a1b656ae05: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/rethinkdb_data/06f5cf1f-ac2a-4b54-a7b5-92a1b656ae05 -------------------------------------------------------------------------------- /client/rethinkdb_data/18cab67f-fd0f-46c5-b123-7d8a45bfef91: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/rethinkdb_data/18cab67f-fd0f-46c5-b123-7d8a45bfef91 -------------------------------------------------------------------------------- /client/rethinkdb_data/1f699b4a-a454-4df6-bd3b-55a7e52abb25: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/rethinkdb_data/1f699b4a-a454-4df6-bd3b-55a7e52abb25 -------------------------------------------------------------------------------- /client/rethinkdb_data/1fadfd28-6b36-4f57-903c-43413e18280f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/rethinkdb_data/1fadfd28-6b36-4f57-903c-43413e18280f -------------------------------------------------------------------------------- /client/rethinkdb_data/23aa7208-02d5-4db8-b786-6bcf4f612bd6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/rethinkdb_data/23aa7208-02d5-4db8-b786-6bcf4f612bd6 -------------------------------------------------------------------------------- /client/rethinkdb_data/430584e9-4df7-4347-8170-c3c8438385f9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/rethinkdb_data/430584e9-4df7-4347-8170-c3c8438385f9 -------------------------------------------------------------------------------- /client/rethinkdb_data/579138a2-18bc-46fe-b79e-4c2e037c2767: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/rethinkdb_data/579138a2-18bc-46fe-b79e-4c2e037c2767 -------------------------------------------------------------------------------- /client/rethinkdb_data/7302ecfe-1554-4be3-9f7b-ba13e6734eb8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/rethinkdb_data/7302ecfe-1554-4be3-9f7b-ba13e6734eb8 -------------------------------------------------------------------------------- /client/rethinkdb_data/c18ec04e-af0e-4408-81b8-585b8c4895d2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/rethinkdb_data/c18ec04e-af0e-4408-81b8-585b8c4895d2 -------------------------------------------------------------------------------- /client/rethinkdb_data/e372d55e-8221-4a84-aa52-762ce6a8c0f3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlowzPlatform/workflow/HEAD/client/rethinkdb_data/e372d55e-8221-4a84-aa52-762ce6a8c0f3 -------------------------------------------------------------------------------- /JobQue/twitter/mylog: -------------------------------------------------------------------------------- 1 | {"level":30,"time":1514979348816,"msg":"Approval Type Job completed","pid":14667,"hostname":"OBLAP-51","fId":"1d54ad55-3606-4a22-af98-29895fa4e0c8","v":1} 2 | -------------------------------------------------------------------------------- /client/config/test.env.js: -------------------------------------------------------------------------------- 1 | var merge = require('webpack-merge') 2 | var devEnv = require('./dev.env') 3 | 4 | module.exports = merge(devEnv, { 5 | NODE_ENV: '"testing"' 6 | }) 7 | -------------------------------------------------------------------------------- /JobQue/scheduler/logs: -------------------------------------------------------------------------------- 1 | {"level":30,"time":1532702300476,"msg":"End Process","pid":18901,"hostname":"OBLAP-28","fId":"c8fe645b-4d59-4b08-9f9f-4fbb079c9fe3","jobId":"EndEvent_0f72gx5","v":1} 2 | -------------------------------------------------------------------------------- /client/src/area/Flow.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /client/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /client/src/api/receiveform/index.js: -------------------------------------------------------------------------------- 1 | import api from '../../api' 2 | let model = 'receive-form' 3 | export default { 4 | post: (data) => { 5 | return api.request('post', '/' + model, data) 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /client/src/area/Schema.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/bpmn/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | __init__: [ 'propertiesProvider' ], 3 | propertiesProvider: [ 'type', require('./BpmnPropertiesProvider') ] 4 | }; -------------------------------------------------------------------------------- /client/src/area/Approval.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /client/src/area/DbSettings.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /service/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8.1.2 2 | 3 | ADD . /usr/src/app/server 4 | 5 | WORKDIR /usr/src/app/server 6 | 7 | RUN npm install 8 | 9 | EXPOSE 3033 4033 10 | 11 | CMD NODE_ENV=production npm start 12 | -------------------------------------------------------------------------------- /JobQue/seneca-job-queue/runAll.js: -------------------------------------------------------------------------------- 1 | const cp = require('child_process') 2 | cp.fork(`./symmetric-worker`) 3 | cp.fork(`./worker-need`) 4 | cp.fork(`./worker-web`) 5 | cp.fork(`./job-web`) 6 | cp.fork(`../scheduler/scheduler`) 7 | -------------------------------------------------------------------------------- /client/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | // to edit target browsers: use "browserslist" field in package.json 6 | "autoprefixer": {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /client/config/prod.env.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | NODE_ENV: '"production"', 3 | accesskey: JSON.stringify(process.env.accesskey), 4 | secretkey: JSON.stringify(process.env.secretkey), 5 | domainKey: JSON.stringify(process.env.domainKey) 6 | } 7 | -------------------------------------------------------------------------------- /client/src/api/dataquery/index.js: -------------------------------------------------------------------------------- 1 | import api from '../../api' 2 | let model = 'dataquery' 3 | export default { 4 | get: (id = null, params = null, headers = null) => { 5 | return api.request('get', '/' + model, null, params, headers) 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /client/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine On 3 | RewriteBase / 4 | RewriteRule ^index\.html$ - [L] 5 | RewriteCond %{REQUEST_FILENAME} !-f 6 | RewriteCond %{REQUEST_FILENAME} !-d 7 | RewriteRule . /index.html [L] 8 | 9 | -------------------------------------------------------------------------------- /client/src/api/userlogin/index.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | import config from '../../config' 3 | let model = config.loginURL 4 | export default { 5 | post: (data) => { 6 | let method = 'post' 7 | return axios({ method, model, data }) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /client/config/dev.env.js: -------------------------------------------------------------------------------- 1 | var merge = require('webpack-merge') 2 | var prodEnv = require('./prod.env') 3 | 4 | module.exports = merge(prodEnv, { 5 | NODE_ENV: '"development"', 6 | accesskey: JSON.stringify(process.env.accesskey), 7 | secretkey: JSON.stringify(process.env.secretkey) 8 | }) 9 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | __depends__: [ 3 | require('./cmd'), 4 | require('diagram-js/lib/i18n/translate') 5 | ], 6 | __init__: ['propertiesPanel'], 7 | propertiesPanel: ['type', require('./PropertiesPanel')] 8 | }; -------------------------------------------------------------------------------- /service/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /service/src/services/flowz/flowz.filters.js: -------------------------------------------------------------------------------- 1 | /* eslint no-console: 1 */ 2 | // console.warn('You are using the default filter for the flowz service.'); // eslint-disable-line no-console 3 | module.exports = function(data, connection, hook) { // eslint-disable-line no-unused-vars 4 | return data; 5 | }; -------------------------------------------------------------------------------- /client/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | test/unit/coverage 8 | test/e2e/reports 9 | selenium-debug.log 10 | rethinkdb_data 11 | 12 | # Editor directories and files 13 | .idea 14 | *.suo 15 | *.ntvs* 16 | *.njsproj 17 | *.sln 18 | -------------------------------------------------------------------------------- /client/build/dev-client.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | require('eventsource-polyfill') 3 | var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true') 4 | 5 | hotClient.subscribe(function (event) { 6 | if (event.action === 'reload') { 7 | window.location.reload() 8 | } 9 | }) 10 | -------------------------------------------------------------------------------- /service/src/services/schema/schema.filters.js: -------------------------------------------------------------------------------- 1 | /* eslint no-console: 1 */ 2 | // console.warn('You are using the default filter for the schema service.'); // eslint-disable-line no-console 3 | 4 | module.exports = function (data, connection, hook) { // eslint-disable-line no-unused-vars 5 | return data; 6 | }; 7 | -------------------------------------------------------------------------------- /JobQue/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | 4 | Seneca_Jobqueue_Flowz: 5 | image: obdev/seneca_jobqueue_flowz 6 | ports: 7 | - 3004:3000 8 | - 3005:5000 9 | - 3006:9000 10 | environment: 11 | - host=enter rethinkdb host 12 | - port=28015 13 | restart: always 14 | -------------------------------------------------------------------------------- /JobQue/scheduler/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | test/unit/coverage 8 | test/e2e/reports 9 | selenium-debug.log 10 | package-lock.json 11 | 12 | # Editor directories and files 13 | .idea 14 | *.suo 15 | *.ntvs* 16 | *.njsproj 17 | *.sln 18 | -------------------------------------------------------------------------------- /JobQue/twitter/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | test/unit/coverage 8 | test/e2e/reports 9 | selenium-debug.log 10 | package-lock.json 11 | 12 | # Editor directories and files 13 | .idea 14 | *.suo 15 | *.ntvs* 16 | *.njsproj 17 | *.sln 18 | -------------------------------------------------------------------------------- /service/src/services/bpmnplugins/bpmnplugins.filters.js: -------------------------------------------------------------------------------- 1 | /* eslint no-console: 1 */ 2 | // console.warn('You are using the default filter for the bpmnplugins service.'); // eslint-disable-line no-console 3 | 4 | module.exports = function (data, connection, hook) { // eslint-disable-line no-unused-vars 5 | return data; 6 | }; 7 | -------------------------------------------------------------------------------- /client/vhost.conf: -------------------------------------------------------------------------------- 1 | 2 | ServerName http://engine.flowz.com 3 | ServerAlias *.flowzcluster.tk 4 | DocumentRoot "/var/www/html/" 5 | 6 | Options Indexes FollowSymLinks 7 | AllowOverride All 8 | Require all granted 9 | 10 | 11 | -------------------------------------------------------------------------------- /service/src/services/emailtemplate/emailtemplate.filters.js: -------------------------------------------------------------------------------- 1 | /* eslint no-console: 1 */ 2 | // console.warn('You are using the default filter for the emailtemplate service.'); // eslint-disable-line no-console 3 | 4 | module.exports = function (data, connection, hook) { // eslint-disable-line no-unused-vars 5 | return data; 6 | }; 7 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | __depends__: [ 3 | require('./element-templates'), 4 | require('diagram-js/lib/i18n/translate') 5 | ], 6 | __init__: [ 'propertiesProvider' ], 7 | propertiesProvider: [ 'type', require('./CamundaPropertiesProvider') ] 8 | }; 9 | -------------------------------------------------------------------------------- /service/test/services/schema.test.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert'); 2 | const app = require('../../src/app'); 3 | 4 | describe('\'schema\' service', () => { 5 | it('registered the service', () => { 6 | const service = app.service('schema'); 7 | 8 | assert.ok(service, 'Registered the service'); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /service/test/services/sendmail.test.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert'); 2 | const app = require('../../src/app'); 3 | 4 | describe('\'sendmail\' service', () => { 5 | it('registered the service', () => { 6 | const service = app.service('sendmail'); 7 | 8 | assert.ok(service, 'Registered the service'); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /service/test/services/dataquery.test.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert'); 2 | const app = require('../../src/app'); 3 | 4 | describe('\'dataquery\' service', () => { 5 | it('registered the service', () => { 6 | const service = app.service('dataquery'); 7 | 8 | assert.ok(service, 'Registered the service'); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /service/test/services/finstance.test.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert'); 2 | const app = require('../../src/app'); 3 | 4 | describe('\'finstance\' service', () => { 5 | it('registered the service', () => { 6 | const service = app.service('finstance'); 7 | 8 | assert.ok(service, 'Registered the service'); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /service/test/services/flowzdata.test.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert'); 2 | const app = require('../../src/app'); 3 | 4 | describe('\'flowzdata\' service', () => { 5 | it('registered the service', () => { 6 | const service = app.service('flowzdata'); 7 | 8 | assert.ok(service, 'Registered the service'); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /JobQue/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mhart/alpine-node:8 2 | 3 | RUN mkdir -p /usr/src/app 4 | 5 | WORKDIR /usr/src/app 6 | 7 | COPY . /usr/src/app 8 | 9 | WORKDIR /usr/src/app/scheduler 10 | RUN npm install 11 | 12 | 13 | WORKDIR /usr/src/app/seneca-job-queue 14 | RUN npm install 15 | 16 | 17 | EXPOSE 4001 4002 4003 18 | 19 | CMD node runAll.js 20 | -------------------------------------------------------------------------------- /service/test/services/bpmnplugins.test.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert'); 2 | const app = require('../../src/app'); 3 | 4 | describe('\'bpmnplugins\' service', () => { 5 | it('registered the service', () => { 6 | const service = app.service('bpmnplugins'); 7 | 8 | assert.ok(service, 'Registered the service'); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /service/test/services/emailtemplate.test.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert'); 2 | const app = require('../../src/app'); 3 | 4 | describe('\'emailtemplate\' service', () => { 5 | it('registered the service', () => { 6 | const service = app.service('emailtemplate'); 7 | 8 | assert.ok(service, 'Registered the service'); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /JobQue/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | test/unit/coverage 8 | test/e2e/reports 9 | selenium-debug.log 10 | package-lock.json 11 | worker/ 12 | example/worker/ 13 | seneca-job-queue/logs 14 | 15 | # Editor directories and files 16 | .idea 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | -------------------------------------------------------------------------------- /JobQue/scheduler/scheduler.js: -------------------------------------------------------------------------------- 1 | const app = require('./config') 2 | const cxnOptions = app.rethinkdb 3 | const qOptions = app.qOptions 4 | const serviceURL = app. serviceURL 5 | const jobURL = app.jobURL 6 | 7 | const scheduler = require('./index') 8 | const main_scheduler = new scheduler({ 9 | cxnOptions: cxnOptions, 10 | qOptions: qOptions, 11 | serviceURL: serviceURL, 12 | jobURL: jobURL 13 | }) 14 | -------------------------------------------------------------------------------- /client/test/unit/specs/Hello.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Hello from '@/components/Hello' 3 | 4 | describe('Hello.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(Hello) 7 | const vm = new Constructor().$mount() 8 | expect(vm.$el.querySelector('.hello h1').textContent) 9 | .to.equal('Welcome to Your Vue.js App') 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /service/src/services/dataquery/dataquery.filters.js: -------------------------------------------------------------------------------- 1 | /* eslint no-console: 1 */ 2 | console.warn('You are using the default filter for the dataquery service. For more information about event filters see https://docs.feathersjs.com/api/events.html#event-filtering'); // eslint-disable-line no-console 3 | 4 | module.exports = function (data, connection, hook) { // eslint-disable-line no-unused-vars 5 | return data; 6 | }; 7 | -------------------------------------------------------------------------------- /service/src/services/sendmail/sendmail.filters.js: -------------------------------------------------------------------------------- 1 | /* eslint no-console: 1 */ 2 | console.warn('You are using the default filter for the sendmail service. For more information about event filters see https://docs.feathersjs.com/api/events.html#event-filtering'); // eslint-disable-line no-console 3 | 4 | module.exports = function (data, connection, hook) { // eslint-disable-line no-unused-vars 5 | return data; 6 | }; 7 | -------------------------------------------------------------------------------- /service/src/services/dflowzdata/dflowzdata.filters.js: -------------------------------------------------------------------------------- 1 | /* eslint no-console: 1 */ 2 | console.warn('You are using the default filter for the sendmail service. For more information about event filters see https://docs.feathersjs.com/api/events.html#event-filtering'); // eslint-disable-line no-console 3 | 4 | module.exports = function (data, connection, hook) { // eslint-disable-line no-unused-vars 5 | return data; 6 | }; 7 | -------------------------------------------------------------------------------- /service/src/services/finstance/finstance.filters.js: -------------------------------------------------------------------------------- 1 | /* eslint no-console: 1 */ 2 | // console.warn('You are using the default filter for the finstance service. For more information about event filters see https://docs.feathersjs.com/api/events.html#event-filtering'); // eslint-disable-line no-console 3 | 4 | module.exports = function (data, connection, hook) { // eslint-disable-line no-unused-vars 5 | return data; 6 | }; 7 | -------------------------------------------------------------------------------- /service/src/services/flowzdata/flowzdata.filters.js: -------------------------------------------------------------------------------- 1 | /* eslint no-console: 1 */ 2 | // console.warn('You are using the default filter for the flowzdata service. For more information about event filters see https://docs.feathersjs.com/api/events.html#event-filtering'); // eslint-disable-line no-console 3 | 4 | module.exports = function (data, connection, hook) { // eslint-disable-line no-unused-vars 5 | return data; 6 | }; 7 | -------------------------------------------------------------------------------- /client/src/pages/user/viewSVG.vue: -------------------------------------------------------------------------------- 1 | 6 | 14 | -------------------------------------------------------------------------------- /client/src/store/state.js: -------------------------------------------------------------------------------- 1 | export default { 2 | user: null, 3 | token: null, 4 | role: null, 5 | schema: [], 6 | flowz: [], 7 | Cache: {}, 8 | sidenavtoggle: true, 9 | sidenavpin: true, 10 | mappingTemp: [], 11 | BPMNxml: '', 12 | isLoggedIn: false, 13 | limitPage: 5, 14 | subscription: '', 15 | updateView: '', 16 | registerResources: {}, 17 | registerRoles: {}, 18 | userDetails: {} 19 | } 20 | -------------------------------------------------------------------------------- /client/static/bpmnpluginwatcher.js: -------------------------------------------------------------------------------- 1 | // let async = require('asyncawait/async'); 2 | // let await = require('asyncawait/await'); 3 | var axios = require('axios'); 4 | var fs = require('fs'); 5 | var path = require('path'); 6 | var chokidar = require('chokidar'); 7 | var config = require('config') 8 | 9 | chokidar.watch(path.join(__dirname, '../bpmnPlugin'), { ignored: /(^|[\/\\])\../ }).on('addDir', function (path) { 10 | }) 11 | -------------------------------------------------------------------------------- /service/src/services/email-templates/email-templates.filters.js: -------------------------------------------------------------------------------- 1 | /* eslint no-console: 1 */ 2 | console.warn('You are using the default filter for the email-templates service. For more information about event filters see https://docs.feathersjs.com/api/events.html#event-filtering'); // eslint-disable-line no-console 3 | 4 | module.exports = function (data, connection, hook) { // eslint-disable-line no-unused-vars 5 | return data; 6 | }; 7 | -------------------------------------------------------------------------------- /JobQue/mail/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "pino": { 3 | "timestamp": false, 4 | "prettyPrint": { 5 | "forceColor": true 6 | } 7 | }, 8 | "rethinkdb": { 9 | "host": "aws-us-east-1-portal.30.dblayer.com", 10 | "port": 16868, 11 | "db": "mailservice" 12 | }, 13 | "table": "emails", 14 | "cxnOptions": { 15 | "host": "localhost", 16 | "port": 28015, 17 | "db": "Flowz" 18 | }, 19 | "users": "users" 20 | } 21 | -------------------------------------------------------------------------------- /client/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-runtime"], 12 | // "plugins": ["transform-vue-jsx"], 13 | "env": { 14 | "test": { 15 | "presets": ["env", "stage-2"], 16 | "plugins": ["istanbul"] 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /service/src/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | const logger = require('winston'); 3 | const app = require('./app'); 4 | const port = app.get('port'); 5 | const server = app.listen(port); 6 | 7 | process.on('unhandledRejection', (reason, p) => 8 | logger.error('Unhandled Rejection at: Promise ', p, reason) 9 | ); 10 | 11 | server.on('listening', () => 12 | logger.info(`Feathers application started on ${app.get('host')}:${port}`) 13 | ); 14 | -------------------------------------------------------------------------------- /service/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "es6": true, 4 | "node": true, 5 | "mocha": true 6 | }, 7 | "extends": "eslint:recommended", 8 | "rules": { 9 | "indent": [ 10 | "error", 11 | 2 12 | ], 13 | "linebreak-style": [ 14 | "error", 15 | "unix" 16 | ], 17 | "quotes": [ 18 | "error", 19 | "single" 20 | ], 21 | "semi": [ 22 | "error", 23 | "always" 24 | ] 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "node", 9 | "request": "launch", 10 | "name": "Launch Program", 11 | "program": "${file}" 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/InputOutputParameterProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var inputOutputParameter = require('./implementation/InputOutputParameter'); 4 | 5 | var assign = require('lodash/object').assign; 6 | 7 | module.exports = function (group, element, bpmnFactory, options, translate) { 8 | 9 | group.entries = group.entries.concat(inputOutputParameter(element, bpmnFactory, assign({}, options), translate)); 10 | 11 | }; 12 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/element-templates/util/validate.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Validator = require('../Validator'); 4 | 5 | /** 6 | * Validate the given template descriptors and 7 | * return a list of errors. 8 | * 9 | * @param {Array} descriptors 10 | * 11 | * @return {Array} 12 | */ 13 | module.exports = function validate(descriptors) { 14 | 15 | return new Validator().addAll(descriptors).getErrors(); 16 | }; -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/ListenerProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var listener = require('./implementation/Listener'); 4 | 5 | module.exports = function(group, element, bpmnFactory, translate) { 6 | 7 | var listenerEntry = listener(element, bpmnFactory, {}, translate); 8 | 9 | group.entries = group.entries.concat(listenerEntry.entries); 10 | 11 | return { 12 | getSelectedListener: listenerEntry.getSelectedListener 13 | }; 14 | 15 | }; 16 | -------------------------------------------------------------------------------- /client/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | var utils = require('./utils') 2 | var config = require('../config') 3 | var isProduction = process.env.NODE_ENV === 'production' 4 | 5 | module.exports = { 6 | loaders: utils.cssLoaders({ 7 | sourceMap: isProduction 8 | ? config.build.productionSourceMap 9 | : config.dev.cssSourceMap, 10 | extract: isProduction 11 | }), 12 | transformToRequire: { 13 | video: 'src', 14 | source: 'src', 15 | img: 'src', 16 | image: 'xlink:href' 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/InputOutputProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var inputOutput = require('./implementation/InputOutput'); 4 | 5 | module.exports = function(group, element, bpmnFactory, translate) { 6 | 7 | var inputOutputEntry = inputOutput(element, bpmnFactory, {}, translate); 8 | 9 | group.entries = group.entries.concat(inputOutputEntry.entries); 10 | 11 | return { 12 | getSelectedParameter: inputOutputEntry.getSelectedParameter 13 | }; 14 | 15 | }; 16 | -------------------------------------------------------------------------------- /client/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import state from './state' 4 | import actions from './actions' 5 | import mutations from './mutations' 6 | import getters from './getters' 7 | import createPersistedState from 'vuex-persistedstate' 8 | 9 | Vue.use(Vuex) 10 | 11 | export default new Vuex.Store({ 12 | state, 13 | actions, 14 | mutations, 15 | getters, 16 | plugins: [createPersistedState()] 17 | }) 18 | // plugins: [createPersistedState({ storage: window.sessionStorage })] 19 | -------------------------------------------------------------------------------- /client/src/bpmn-custom-module/viewindex.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | __depends__: [ 3 | require('diagram-js-direct-editing'), 4 | require('diagram-js/lib/features/context-pad'), 5 | require('diagram-js/lib/features/selection'), 6 | require('diagram-js/lib/features/connect'), 7 | require('diagram-js/lib/features/create') 8 | // require('../popup-menu') 9 | ], 10 | __init__: ['customRenderer'], 11 | customRenderer: ['type', require('./draw/CustomRenderer')] 12 | // __init__: ['customPaletteProvider'], 13 | } 14 | -------------------------------------------------------------------------------- /client/test/unit/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.config.productionTip = false 4 | 5 | // require all test files (files that ends with .spec.js) 6 | const testsContext = require.context('./specs', true, /\.spec$/) 7 | testsContext.keys().forEach(testsContext) 8 | 9 | // require all src files except main.js for coverage. 10 | // you can also change this to match only the subset of files that 11 | // you want coverage for. 12 | const srcContext = require.context('../../src', true, /^\.\/(?!main(\.js)?$)/) 13 | srcContext.keys().forEach(srcContext) 14 | -------------------------------------------------------------------------------- /service/src/services/emailtemplate/emailtemplate.hooks.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | before: { 3 | all: [], 4 | find: [], 5 | get: [], 6 | create: [], 7 | update: [], 8 | patch: [], 9 | remove: [] 10 | }, 11 | after: { 12 | all: [], 13 | find: [], 14 | get: [], 15 | create: [], 16 | update: [], 17 | patch: [], 18 | remove: [] 19 | }, 20 | error: { 21 | all: [], 22 | find: [], 23 | get: [], 24 | create: [], 25 | update: [], 26 | patch: [], 27 | remove: [] 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/element-templates/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | __depends__: [ 3 | require('./cmd'), 4 | require('diagram-js/lib/i18n/translate') 5 | ], 6 | __init__: [ 7 | 'customElementsPropertiesActivator', 8 | 'elementTemplatesLoader' 9 | ], 10 | customElementsPropertiesActivator: [ 'type', require('./CustomElementsPropertiesActivator') ], 11 | elementTemplates: [ 'type', require('./ElementTemplates') ], 12 | elementTemplatesLoader: [ 'type', require('./ElementTemplatesLoader') ] 13 | }; 14 | -------------------------------------------------------------------------------- /service/src/services/sendmail/sendmail.hooks.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | module.exports = { 4 | before: { 5 | all: [], 6 | find: [], 7 | get: [], 8 | create: [], 9 | update: [], 10 | patch: [], 11 | remove: [] 12 | }, 13 | 14 | after: { 15 | all: [], 16 | find: [], 17 | get: [], 18 | create: [], 19 | update: [], 20 | patch: [], 21 | remove: [] 22 | }, 23 | 24 | error: { 25 | all: [], 26 | find: [], 27 | get: [], 28 | create: [], 29 | update: [], 30 | patch: [], 31 | remove: [] 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /service/src/services/email-receive/email-receive.hooks.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | module.exports = { 4 | before: { 5 | all: [], 6 | find: [], 7 | get: [], 8 | create: [], 9 | update: [], 10 | patch: [], 11 | remove: [] 12 | }, 13 | 14 | after: { 15 | all: [], 16 | find: [], 17 | get: [], 18 | create: [], 19 | update: [], 20 | patch: [], 21 | remove: [] 22 | }, 23 | 24 | error: { 25 | all: [], 26 | find: [], 27 | get: [], 28 | create: [], 29 | update: [], 30 | patch: [], 31 | remove: [] 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/ConnectorInputOutputParameterProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var assign = require('lodash/object').assign; 4 | 5 | var inputOutputParameter = require('./implementation/InputOutputParameter'); 6 | 7 | module.exports = function (group, element, bpmnFactory, options, translate) { 8 | 9 | options = assign({ 10 | idPrefix: 'connector-', 11 | insideConnector: true 12 | }, options); 13 | 14 | group.entries = group.entries.concat(inputOutputParameter(element, bpmnFactory, options, translate)); 15 | 16 | }; 17 | -------------------------------------------------------------------------------- /service/src/services/email-templates/email-templates.hooks.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | module.exports = { 4 | before: { 5 | all: [], 6 | find: [], 7 | get: [], 8 | create: [], 9 | update: [], 10 | patch: [], 11 | remove: [] 12 | }, 13 | 14 | after: { 15 | all: [], 16 | find: [], 17 | get: [], 18 | create: [], 19 | update: [], 20 | patch: [], 21 | remove: [] 22 | }, 23 | 24 | error: { 25 | all: [], 26 | find: [], 27 | get: [], 28 | create: [], 29 | update: [], 30 | patch: [], 31 | remove: [] 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /JobQue/mail/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flowz-mail-worker", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "axios": "^0.17.1", 13 | "body-parser": "^1.18.2", 14 | "cors": "^2.8.4", 15 | "express": "^4.16.2", 16 | "express-fileupload": "^0.3.0", 17 | "lodash": "^4.17.4", 18 | "multer": "^1.3.0", 19 | "pino": "^4.10.1", 20 | "rethinkdbdash": "^2.3.31" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/ConnectorInputOutputProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var inputOutput = require('./implementation/InputOutput'); 4 | 5 | module.exports = function(group, element, bpmnFactory, translate) { 6 | 7 | var inputOutputEntry = inputOutput(element, bpmnFactory, { 8 | idPrefix: 'connector-', 9 | insideConnector: true 10 | }, translate); 11 | 12 | group.entries = group.entries.concat(inputOutputEntry.entries); 13 | 14 | return { 15 | getSelectedParameter: inputOutputEntry.getSelectedParameter 16 | }; 17 | 18 | }; 19 | -------------------------------------------------------------------------------- /client/debug.log: -------------------------------------------------------------------------------- 1 | [0119/103136.934:ERROR:process_info.cc(632)] range at 0xf341917000000000, size 0x1ef fully unreadable 2 | [0119/103136.935:ERROR:process_info.cc(632)] range at 0xf34191d200000000, size 0x1ef fully unreadable 3 | [0119/103136.935:ERROR:process_info.cc(632)] range at 0x0, size 0x1ef fully unreadable 4 | [0202/111642.994:ERROR:process_info.cc(632)] range at 0xd4c8926000000000, size 0x18f fully unreadable 5 | [0202/111642.995:ERROR:process_info.cc(632)] range at 0xd4c892c200000000, size 0x18f fully unreadable 6 | [0202/111642.995:ERROR:process_info.cc(632)] range at 0x0, size 0x18f fully unreadable 7 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/bpmn/parts/NameProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var nameEntryFactory = require('./implementation/Name'), 4 | is = require('bpmn-js/lib/util/ModelUtil').is; 5 | 6 | module.exports = function(group, element, translate) { 7 | 8 | if (!is(element, 'bpmn:Collaboration')) { 9 | 10 | var options; 11 | if (is(element, 'bpmn:TextAnnotation')) { 12 | options = { modelProperty: 'text' }; 13 | } 14 | 15 | // name 16 | group.entries = group.entries.concat(nameEntryFactory(element, options, translate)); 17 | 18 | } 19 | 20 | }; 21 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/styles/listeners.less: -------------------------------------------------------------------------------- 1 | .cam-add-listener { 2 | > button { 3 | position: relative; 4 | margin-left: 10px; 5 | } 6 | } 7 | 8 | [data-list-entry-container] > .bpp-listener-area { 9 | border: 1px solid @bpp-color-gray-light; 10 | margin: 10px 1px; 11 | padding: 10px; 12 | } 13 | 14 | .bpp-listener-area { 15 | position: relative; 16 | > button { 17 | position: absolute; 18 | right: 0; 19 | top: 0; 20 | border: none; 21 | background: none; 22 | } 23 | } 24 | 25 | .bpp-listener-area + .bpp-listener-area { 26 | margin-top: 20px; 27 | } 28 | -------------------------------------------------------------------------------- /JobQue/twitter/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pluginwatcher", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "start", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "nikitam", 10 | "license": "ISC", 11 | "dependencies": { 12 | "asyncawait": "^1.0.6", 13 | "axios": "^0.17.1", 14 | "jquery": "^3.2.1", 15 | "json-daex": "0.0.13", 16 | "lodash": "^4.17.4", 17 | "mjml": "^3.3.5", 18 | "pino": "^4.10.1", 19 | "rethinkdb": "^2.3.3", 20 | "rethinkdb-job-queue": "^3.1.4", 21 | "rethinkdbdash": "^2.3.31" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /client/src/store/getters.js: -------------------------------------------------------------------------------- 1 | export default { 2 | allSchema (state) { 3 | // console.log('allSchema', state.schema) 4 | return state.schema 5 | }, 6 | allSettings (state) { 7 | return state.settings 8 | }, 9 | TabData (state) { 10 | return state.tabdata 11 | }, 12 | flowzData (state) { 13 | return state.flowz 14 | }, 15 | MapTemp (state) { 16 | // console.log('state.mappingTemp', state.mappingTemp) 17 | return state.mappingTemp 18 | }, 19 | getXML (state) { 20 | return state.BPMNxml 21 | } 22 | // getActiveFlow (state) { 23 | // return state.activeFlow 24 | // } 25 | } 26 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/AsynchronousContinuationProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject, 4 | is = require('bpmn-js/lib/util/ModelUtil').is, 5 | asyncContinuation = require('./implementation/AsyncContinuation'); 6 | 7 | module.exports = function(group, element, bpmnFactory, translate) { 8 | 9 | if (is(element, 'camunda:AsyncCapable')) { 10 | 11 | group.entries = group.entries.concat(asyncContinuation(element, bpmnFactory, { 12 | getBusinessObject: getBusinessObject 13 | }, translate)); 14 | 15 | } 16 | }; -------------------------------------------------------------------------------- /client/test/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // For authoring Nightwatch tests, see 2 | // http://nightwatchjs.org/guide#usage 3 | 4 | module.exports = { 5 | 'default e2e tests': function (browser) { 6 | // automatically uses dev Server port from /config.index.js 7 | // default: http://localhost:8080 8 | // see nightwatch.conf.js 9 | const devServer = browser.globals.devServerURL 10 | 11 | browser 12 | .url(devServer) 13 | .waitForElementVisible('#app', 5000) 14 | .assert.elementPresent('.hello') 15 | .assert.containsText('h1', 'Welcome to Your Vue.js App') 16 | .assert.elementCount('img', 1) 17 | .end() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /JobQue/scheduler/config.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | module.exports = { 3 | rethinkdb: { 4 | host: process.env.host || "47.254.27.134", 5 | port: process.env.port || 28015, 6 | db: process.env.db || "FlowzEngine", 7 | authKey: process.env.authDB, 8 | ssl: process.env.cert ? { ca: fs.readFileSync('./ca.cer') } : null 9 | }, 10 | qOptions: { 11 | name: process.env.scheduler || "scheduler", 12 | masterInterval: 60000, 13 | changeFeed: true, 14 | concurrency: 1, 15 | removeFinishedJobs: false 16 | }, 17 | serviceURL: process.env.serviceURL || "http://localhost:4002", 18 | jobURL: process.env.jobURL || "http://localhost:4001" 19 | } -------------------------------------------------------------------------------- /service/src/services/sendmail/sendmail.service.js: -------------------------------------------------------------------------------- 1 | // Initializes the `sendmail` service on path `/sendmail` 2 | const createService = require('./sendmail.class.js'); 3 | const hooks = require('./sendmail.hooks'); 4 | 5 | module.exports = function () { 6 | const app = this; 7 | const paginate = app.get('paginate'); 8 | 9 | const options = { 10 | name: 'sendmail', 11 | paginate 12 | }; 13 | 14 | // Initialize our service with any options it requires 15 | app.use('/sendmail', createService(options)); 16 | 17 | // Get our initialized service so that we can register hooks and filters 18 | const service = app.service('sendmail'); 19 | 20 | service.hooks(hooks); 21 | }; 22 | -------------------------------------------------------------------------------- /client/README.md: -------------------------------------------------------------------------------- 1 | # flowz-schema 2 | 3 | > A Vue.js project 4 | 5 | ## Build Setup 6 | 7 | ``` bash 8 | # install dependencies 9 | npm install 10 | 11 | # serve with hot reload at localhost:8080 12 | npm run dev 13 | 14 | # build for production with minification 15 | npm run build 16 | 17 | # build for production and view the bundle analyzer report 18 | npm run build --report 19 | 20 | # run unit tests 21 | npm run unit 22 | 23 | # run e2e tests 24 | npm run e2e 25 | 26 | # run all tests 27 | npm test 28 | ``` 29 | 30 | For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 31 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/ListenerFieldInjectionProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var assign = require('lodash/object').assign; 4 | 5 | var fieldInjection = require('./implementation/FieldInjection'); 6 | 7 | module.exports = function (group, element, bpmnFactory, options, translate) { 8 | 9 | options = assign({ 10 | idPrefix: 'listener-', 11 | insideListener: true 12 | }, options); 13 | 14 | var fieldInjectionEntry = fieldInjection(element, bpmnFactory, translate, options); 15 | 16 | if (fieldInjectionEntry && fieldInjectionEntry.length > 0) { 17 | group.entries = group.entries.concat(fieldInjectionEntry); 18 | } 19 | 20 | }; 21 | -------------------------------------------------------------------------------- /service/src/hooks/logger.js: -------------------------------------------------------------------------------- 1 | // A hook that logs service method before, after and error 2 | const logger = require('winston'); 3 | 4 | module.exports = function () { 5 | return function (hook) { 6 | let message = `${hook.type}: ${hook.path} - Method: ${hook.method}`; 7 | 8 | if (hook.type === 'error') { 9 | message += `: ${hook.error.message}`; 10 | } 11 | 12 | logger.info(message); 13 | logger.debug('hook.data', hook.data); 14 | logger.debug('hook.params', hook.params); 15 | 16 | if (hook.result) { 17 | logger.debug('hook.result', hook.result); 18 | } 19 | 20 | if (hook.error) { 21 | logger.error(hook.error); 22 | } 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /service/config/production.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "localhost", 3 | "port": 3033, 4 | "public": "../public/", 5 | "paginate": { 6 | "default": 10, 7 | "max": 50 8 | }, 9 | "scheduler_table": "scheduler", 10 | "qJobTimeout": 3600000, 11 | "qJobRetryMax": 5, 12 | "instance_table": "flowzinstance", 13 | "approvar_table": "approvalClass", 14 | "system_logs_table": "system_logs", 15 | "rdb_host": "RDB_HOST", 16 | "rdb_port": "RDB_PORT", 17 | "rdb_user": "", 18 | "rdb_password": "", 19 | "rdb_db": "FlowzEngine", 20 | "registerWokerAPI": "http://api.flowz.com/jobqueue1/upload-worker-process", 21 | "registerProcessAPI": "http://api.flowz.com/jobqueue3/register-jobtype/" 22 | } 23 | -------------------------------------------------------------------------------- /service/src/services/bpmnplugins/bpmnplugins.hooks.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | before: { 3 | all: [], 4 | find: [], 5 | get: [], 6 | create: [ 7 | hook => beforeCreate(hook) 8 | ], 9 | update: [], 10 | patch: [], 11 | remove: [] 12 | }, 13 | after: { 14 | all: [], 15 | find: [], 16 | get: [], 17 | create: [], 18 | update: [], 19 | patch: [], 20 | remove: [] 21 | }, 22 | error: { 23 | all: [], 24 | find: [], 25 | get: [], 26 | create: [], 27 | update: [], 28 | patch: [], 29 | remove: [] 30 | } 31 | }; 32 | 33 | function beforeCreate (hook) { 34 | hook.data['createdOn'] = new Date().toISOString() 35 | } 36 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/factory/EntryFieldDescription.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var MARKDOWN_LINK_REGEX = /\[([^\)]+)\]\(([^\]]+)\)/g; 4 | 5 | /** 6 | * Replace MarkDown Link Syntax with HTML Link Syntax 7 | * [myLink](http://www.myLink.de) -> myLink 8 | * 9 | * @param {String} value 10 | * 11 | * @return {String} 12 | */ 13 | function linkify(text) { 14 | return text.replace(MARKDOWN_LINK_REGEX, '$1'); 15 | } 16 | 17 | module.exports = function entryFieldDescription(description) { 18 | description = linkify(description); 19 | 20 | return '
' + description + '
'; 21 | }; 22 | -------------------------------------------------------------------------------- /client/src/api/sendmail/index.js: -------------------------------------------------------------------------------- 1 | import api from '../../api' 2 | let model = 'sendmail' 3 | export default { 4 | get: (id = null, params = null) => { 5 | if (id === null) { 6 | return api.request('get', '/' + model, null, params) 7 | } else { 8 | return api.request('get', '/' + model + '/' + id, params) 9 | } 10 | }, 11 | post: (data) => { 12 | return api.request('post', '/' + model, data) 13 | }, 14 | put: (id, data) => { 15 | return api.request('put', '/' + model + '/' + id, data) 16 | }, 17 | patch: (id, data) => { 18 | return api.request('patch', '/' + model + '/' + id, data) 19 | }, 20 | delete: (id) => { 21 | return api.request('delete', '/' + model + '/' + id) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /service/.npmignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | 16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 17 | .grunt 18 | 19 | # Compiled binary addons (http://nodejs.org/api/addons.html) 20 | build/Release 21 | 22 | # Dependency directory 23 | # Commenting this out is preferred by some people, see 24 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- 25 | node_modules 26 | 27 | # Users Environment Variables 28 | .lock-wscript 29 | 30 | data/ 31 | -------------------------------------------------------------------------------- /client/src/bpmn-custom-module/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | __depends__: [ 3 | require('diagram-js-direct-editing'), 4 | require('diagram-js/lib/features/context-pad'), 5 | require('diagram-js/lib/features/selection'), 6 | require('diagram-js/lib/features/connect'), 7 | require('diagram-js/lib/features/create') 8 | // require('../popup-menu') 9 | ], 10 | __init__: ['customRenderer', 'customContextPad', 'customPaletteProvider'], 11 | customContextPad: ['type', require('./contextPad/CustomContextPadProvider')], 12 | customPaletteProvider: ['type', require('./palette/CustomPaletteProvider')], 13 | customRenderer: ['type', require('./draw/CustomRenderer')] 14 | // __init__: ['customPaletteProvider'], 15 | } 16 | -------------------------------------------------------------------------------- /client/src/api/emailtemplate/index.js: -------------------------------------------------------------------------------- 1 | import api from '../../api' 2 | let model = 'emailtemplate' 3 | export default { 4 | get: (id = null, params = null) => { 5 | if (id === null) { 6 | return api.request('get', '/' + model, null, params) 7 | } else { 8 | return api.request('get', '/' + model + '/' + id, params) 9 | } 10 | }, 11 | post: (data) => { 12 | return api.request('post', '/' + model, data) 13 | }, 14 | put: (id, data) => { 15 | return api.request('put', '/' + model + '/' + id, data) 16 | }, 17 | patch: (id, data) => { 18 | return api.request('patch', '/' + model + '/' + id, data) 19 | }, 20 | delete: (id) => { 21 | return api.request('delete', '/' + model + '/' + id) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/FieldInjectionProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var ImplementationTypeHelper = require('../../../helper/ImplementationTypeHelper'); 4 | 5 | var fieldInjection = require('./implementation/FieldInjection'); 6 | 7 | module.exports = function(group, element, bpmnFactory, translate) { 8 | 9 | var bo = ImplementationTypeHelper.getServiceTaskLikeBusinessObject(element); 10 | 11 | if (!bo) { 12 | return; 13 | } 14 | 15 | var fieldInjectionEntry = fieldInjection(element, bpmnFactory, translate, { businessObject: bo }); 16 | 17 | if (fieldInjectionEntry && fieldInjectionEntry.length > 0) { 18 | group.entries = group.entries.concat(fieldInjectionEntry); 19 | } 20 | 21 | }; 22 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/styles/header.less: -------------------------------------------------------------------------------- 1 | .bpp-properties-header { 2 | padding: 15px; 3 | padding-bottom: 5px; 4 | 5 | > .label { 6 | font-size: 120%; 7 | font-weight: bolder; 8 | } 9 | 10 | > .search { 11 | display: none; 12 | margin-top: 5px; 13 | position: relative; 14 | 15 | input { 16 | position: relative; 17 | border-radius: 15px; 18 | width: 100%; 19 | z-index: 1; 20 | } 21 | 22 | button { 23 | position: absolute; 24 | top: 0; 25 | bottom: 0; 26 | right: 0; 27 | border: none; 28 | background-color: transparent; 29 | z-index: 2; 30 | &:before { 31 | content: '\E805'; 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/StartEventInitiator.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../factory/EntryFactory'), 4 | is = require('bpmn-js/lib/util/ModelUtil').is, 5 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject; 6 | 7 | 8 | module.exports = function(group, element, translate) { 9 | 10 | var bo = getBusinessObject(element); 11 | 12 | if (!bo) { 13 | return; 14 | } 15 | 16 | if ( is(element, 'camunda:Initiator') && !is(element.parent, 'bpmn:SubProcess') ) { 17 | group.entries.push(entryFactory.textField({ 18 | id: 'initiator', 19 | label: translate('Initiator'), 20 | modelProperty: 'initiator' 21 | })); 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /service/src/services/finstance/finstance.service.js: -------------------------------------------------------------------------------- 1 | // Initializes the `finstance` service on path `/finstance` 2 | const createService = require('feathers-rethinkdb'); 3 | const hooks = require('./finstance.hooks'); 4 | 5 | module.exports = function () { 6 | const app = this; 7 | const Model = app.get('rethinkdbClient'); 8 | const paginate = app.get('paginate'); 9 | 10 | const options = { 11 | name: 'finstance', 12 | Model, 13 | paginate 14 | }; 15 | 16 | // Initialize our service with any options it requires 17 | app.use('/finstance', createService(options)); 18 | 19 | // Get our initialized service so that we can register hooks and filters 20 | const service = app.service('finstance'); 21 | 22 | service.hooks(hooks); 23 | }; 24 | -------------------------------------------------------------------------------- /service/src/services/flowzdata/flowzdata.service.js: -------------------------------------------------------------------------------- 1 | // Initializes the `flowzdata` service on path `/flowzdata` 2 | const createService = require('feathers-rethinkdb'); 3 | const hooks = require('./flowzdata.hooks'); 4 | 5 | module.exports = function () { 6 | const app = this; 7 | const Model = app.get('rethinkdbClient'); 8 | const paginate = app.get('paginate'); 9 | 10 | const options = { 11 | name: 'flowzdata', 12 | Model, 13 | paginate 14 | }; 15 | 16 | // Initialize our service with any options it requires 17 | app.use('/flowzdata', createService(options)); 18 | 19 | // Get our initialized service so that we can register hooks and filters 20 | const service = app.service('flowzdata'); 21 | 22 | service.hooks(hooks); 23 | }; 24 | -------------------------------------------------------------------------------- /client/.eslintrc.js: -------------------------------------------------------------------------------- 1 | // http://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parser: 'babel-eslint', 6 | parserOptions: { 7 | sourceType: 'module' 8 | }, 9 | env: { 10 | browser: true, 11 | }, 12 | // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style 13 | extends: 'standard', 14 | // required to lint *.vue files 15 | plugins: [ 16 | 'html' 17 | ], 18 | // add your custom rules here 19 | 'rules': { 20 | // allow paren-less arrow functions 21 | 'arrow-parens': 0, 22 | // allow async-await 23 | 'generator-star-spacing': 0, 24 | // allow debugger during development 25 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /service/src/services/emailtemplate/emailtemplate.service.js: -------------------------------------------------------------------------------- 1 | // Initializes the `emailtemplate` service on path `/emailtemplate` 2 | const createService = require('feathers-rethinkdb'); 3 | const hooks = require('./emailtemplate.hooks'); 4 | 5 | module.exports = function () { 6 | const app = this; 7 | const Model = app.get('rethinkdbClient'); 8 | const paginate = app.get('paginate'); 9 | 10 | const options = { 11 | name: 'emailtemplate', 12 | Model, 13 | paginate 14 | }; 15 | // Initialize our service with any options it requires 16 | app.use('/emailtemplate', createService(options)); 17 | // Get our initialized service so that we can register hooks and filters 18 | const service = app.service('emailtemplate'); 19 | service.hooks(hooks); 20 | }; 21 | -------------------------------------------------------------------------------- /service/src/services/bpmnplugins/bpmnplugins.service.js: -------------------------------------------------------------------------------- 1 | // Initializes the `bpmnplugins` service on path `/bpmnplugins` 2 | const createService = require('feathers-rethinkdb'); 3 | const hooks = require('./bpmnplugins.hooks'); 4 | 5 | module.exports = function () { 6 | const app = this; 7 | const Model = app.get('rethinkdbClient'); 8 | const paginate = app.get('paginate'); 9 | 10 | const options = { 11 | name: 'bpmnplugins', 12 | Model, 13 | paginate 14 | }; 15 | 16 | // Initialize our service with any options it requires 17 | app.use('/bpmnplugins', createService(options)); 18 | 19 | // Get our initialized service so that we can register hooks and filters 20 | const service = app.service('bpmnplugins'); 21 | 22 | service.hooks(hooks); 23 | }; 24 | -------------------------------------------------------------------------------- /service/src/services/config.js: -------------------------------------------------------------------------------- 1 | const config = require('config'); 2 | const fs = require('fs'); 3 | // console.log('USER', config.get('rdb_user').trim()); 4 | let ssl = process.env.cert ? { ca: fs.readFileSync(__dirname + process.env.cert) } : null 5 | let rauth = process.env.rauth ? process.env.rauth : null 6 | var rethinkdb = { 7 | rethinkdb: { 8 | db: 'FlowzEngine', 9 | servers: [{ 10 | host: config.get('rdb_host').trim(), 11 | port: config.get('rdb_port').trim() 12 | // authKey: rauth, 13 | // ssl: ssl 14 | }] 15 | } 16 | }; 17 | if (config.get('rdb_user').trim() !== '') { 18 | rethinkdb.rethinkdb.servers.user = config.get('rdb_user').trim(); 19 | rethinkdb.rethinkdb.servers.password = config.get('rdb_password').trim() 20 | } 21 | module.exports = rethinkdb; -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/helper/ElementHelper.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var ElementHelper = {}; 4 | module.exports = ElementHelper; 5 | 6 | /** 7 | * Creates a new element and set the parent to it 8 | * 9 | * @method ElementHelper#createElement 10 | * 11 | * @param {String} elementType of the new element 12 | * @param {Object} properties of the new element in key-value pairs 13 | * @param {moddle.object} parent of the new element 14 | * @param {BpmnFactory} factory which creates the new element 15 | * 16 | * @returns {djs.model.Base} element which is created 17 | */ 18 | ElementHelper.createElement = function(elementType, properties, parent, factory) { 19 | var element = factory.create(elementType, properties); 20 | element.$parent = parent; 21 | 22 | return element; 23 | }; 24 | -------------------------------------------------------------------------------- /client/vhost_ssl_staging.conf: -------------------------------------------------------------------------------- 1 | 2 | ServerName www.engine.flowzstaging.tk 3 | ServerAlias *.flowzstaging.tk 4 | DocumentRoot "/var/www/html/" 5 | 6 | Options Indexes FollowSymLinks 7 | AllowOverride All 8 | Require all granted 9 | 10 | SSLEngine On 11 | SSLCertificateFile /etc/ssl/cert/cert_staging.pem 12 | SSLCertificateKeyFile /etc/ssl/privkey/privkey_staging.pem 13 | 14 | 15 | 16 | 17 | ServerName www.engine.flowzstaging.tk 18 | ServerAlias *.flowzstaging.tk 19 | #Redirect / https://www.engine.flowzdigital.com 20 | DocumentRoot "/var/www/html/" 21 | 22 | Options Indexes FollowSymLinks 23 | AllowOverride All 24 | Require all granted 25 | 26 | 27 | -------------------------------------------------------------------------------- /client/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Workflow 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /JobQue/scheduler/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flowz-scheduler", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1", 7 | "start": "node scheduler.js" 8 | }, 9 | "author": "bhumilsarvaiya", 10 | "license": "ISC", 11 | "dependencies": { 12 | "axios": "^0.17.0", 13 | "child_process": "^1.0.2", 14 | "chokidar": "^1.7.0", 15 | "fs": "0.0.1-security", 16 | "lodash": "^4.17.4", 17 | "pino": "^4.7.2", 18 | "request": "^2.83.0", 19 | "request-promise": "^4.2.2", 20 | "rethinkdb": "^2.3.3", 21 | "rethinkdb-job-queue": "^3.1.4", 22 | "twit": "^2.2.9", 23 | "underscore": "^1.8.3", 24 | "vm": "^0.1.0" 25 | }, 26 | "devDependencies": { 27 | "webpack": "^3.5.6" 28 | }, 29 | "description": "" 30 | } 31 | -------------------------------------------------------------------------------- /service/config/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "localhost", 3 | "port": 3030, 4 | "public": "../public/", 5 | "paginate": { 6 | "default": 10, 7 | "max": 50 8 | }, 9 | "scheduler_table": "scheduler", 10 | "qJobTimeout": 3600000, 11 | "qJobRetryMax": 5, 12 | "instance_table": "flowzinstance", 13 | "approvar_table": "approvalClass", 14 | "system_logs_table": "system_logs", 15 | "rdb_host": "RDB_HOST", 16 | "rdb_port": "RDB_PORT", 17 | "rdb_user": "", 18 | "rdb_password": "", 19 | "rdb_db": "FlowzEngine", 20 | "registerWokerAPI": "http://localhost:4001/upload-worker-process", 21 | "registerProcessAPI": "http://localhost:4003/register-jobtype/", 22 | "rethinkdb": { 23 | "db": "service", 24 | "servers": [ 25 | { 26 | "host": "localhost", 27 | "port": "28015" 28 | } 29 | ] 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /service/src/services/dflowzdata/dflowzdata.service.js: -------------------------------------------------------------------------------- 1 | // Initializes the `sendmail` service on path `/sendmail` 2 | const createService = require('./dflowzdata.class.js'); 3 | const hooks = require('./dflowzdata.hooks'); 4 | 5 | module.exports = function () { 6 | const app = this; 7 | const paginate = app.get('paginate'); 8 | const Model = app.get('rethinkdbClient'); 9 | 10 | const options = { 11 | name: 'dflowzdata', 12 | paginate, 13 | Model 14 | }; 15 | 16 | // Initialize our service with any options it requires 17 | app.use('/dflowzdata', createService(options)); 18 | 19 | // Get our initialized service so that we can register hooks and filters 20 | const service = app.service('dflowzdata'); 21 | service.watch = false; 22 | service.hooks(hooks); 23 | // console.log('=======',Object.keys(app.services),'========='); 24 | }; 25 | -------------------------------------------------------------------------------- /client/build/build.js: -------------------------------------------------------------------------------- 1 | require('./check-versions')() 2 | 3 | process.env.NODE_ENV = 'production' 4 | 5 | var ora = require('ora') 6 | var rm = require('rimraf') 7 | var path = require('path') 8 | var chalk = require('chalk') 9 | var webpack = require('webpack') 10 | var config = require('../config') 11 | var webpackConfig = require('./webpack.prod.conf') 12 | 13 | var spinner = ora('building for production...') 14 | spinner.start() 15 | 16 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 17 | if (err) throw err 18 | webpack(webpackConfig, function (err, stats) { 19 | spinner.stop() 20 | if (err) throw err 21 | process.stdout.write(stats.toString({ 22 | colors: true, 23 | modules: false, 24 | children: false, 25 | chunks: false, 26 | chunkModules: false 27 | }) + '\n\n') 28 | }) 29 | }) 30 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [Settings] 2 | ID = "Develop-I" 3 | [build] 4 | # This will be your default build command 5 | base = "client/" 6 | command = "npm run build" 7 | publish = "client/dist" 8 | 9 | #[[redirects]] 10 | # from = "/" 11 | # to = "/index.html" 12 | # status = 200 13 | # force = true 14 | 15 | #[[redirects]] 16 | # from = "/*" 17 | # to = "/index.html" 18 | # status = 301 19 | # force = true 20 | [[redirects]] 21 | from = "/:page/:page/:page/:page" 22 | to = "/index.html" 23 | status = 200 24 | force = true 25 | 26 | [[redirects]] 27 | from = "/:page/:page/:page" 28 | to = "/index.html" 29 | status = 200 30 | force = true 31 | 32 | [[redirects]] 33 | from = "/:page/:page" 34 | to = "/index.html" 35 | status = 200 36 | force = true 37 | 38 | [[redirects]] 39 | from = "/:page" 40 | to = "/index.html" 41 | status = 200 42 | force = true 43 | -------------------------------------------------------------------------------- /client/src/api/flowz/index.js: -------------------------------------------------------------------------------- 1 | import api from '../../api' 2 | let model = 'flowz' 3 | // import store from '@/store' 4 | export default { 5 | get: (id = null, params = null, headers = null) => { 6 | if (id === null) { 7 | return api.request('get', '/' + model, null, params, headers) 8 | } else { 9 | return api.request('get', '/' + model + '/' + id, null, params, headers) 10 | } 11 | }, 12 | getCustom: (string) => { 13 | return api.request('get', '/' + model + string) 14 | }, 15 | post: (data) => { 16 | return api.request('post', '/' + model, data) 17 | }, 18 | put: (id, data) => { 19 | return api.request('put', '/' + model + '/' + id, data) 20 | }, 21 | patch: (id, data) => { 22 | return api.request('patch', '/' + model + '/' + id, data) 23 | }, 24 | delete: (id) => { 25 | return api.request('delete', '/' + model + '/' + id) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /client/test/e2e/custom-assertions/elementCount.js: -------------------------------------------------------------------------------- 1 | // A custom Nightwatch assertion. 2 | // the name of the method is the filename. 3 | // can be used in tests like this: 4 | // 5 | // browser.assert.elementCount(selector, count) 6 | // 7 | // for how to write custom assertions see 8 | // http://nightwatchjs.org/guide#writing-custom-assertions 9 | exports.assertion = function (selector, count) { 10 | this.message = 'Testing if element <' + selector + '> has count: ' + count 11 | this.expected = count 12 | this.pass = function (val) { 13 | return val === this.expected 14 | } 15 | this.value = function (res) { 16 | return res.value 17 | } 18 | this.command = function (cb) { 19 | var self = this 20 | return this.api.execute(function (selector) { 21 | return document.querySelectorAll(selector).length 22 | }, [selector], function (res) { 23 | cb.call(self, res) 24 | }) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /client/vhost_ssl_qa.conf: -------------------------------------------------------------------------------- 1 | # 2 | #ServerName www.engine.flowzqa.tk 3 | #ServerAlias *.flowzqa.tk 4 | #Redirect / https://www.engine.flowzqa.tk 5 | # 6 | 7 | 8 | ServerName www.engine.flowzqa.tk 9 | ServerAlias *.flowzqa.tk 10 | DocumentRoot "/var/www/html/" 11 | 12 | Options Indexes FollowSymLinks 13 | AllowOverride All 14 | Require all granted 15 | 16 | SSLEngine on 17 | SSLCertificateFile /etc/ssl/cert/cert_qa.pem 18 | SSLCertificateKeyFile /etc/ssl/privkey/privkey_qa.pem 19 | 20 | 21 | 22 | 23 | ServerName www.engine.flowzqa.tk 24 | ServerAlias *.flowzqa.tk 25 | #Redirect / https://www.engine.flowzqa.tk 26 | DocumentRoot "/var/www/html/" 27 | 28 | Options Indexes FollowSymLinks 29 | AllowOverride All 30 | Require all granted 31 | 32 | 33 | -------------------------------------------------------------------------------- /service/src/services/email-templates/email-templates.service.js: -------------------------------------------------------------------------------- 1 | // Initializes the `email-templates` service on path `/email-templates` 2 | const createService = require('feathers-rethinkdb'); 3 | const hooks = require('./email-templates.hooks'); 4 | const filters = require('./email-templates.filters'); 5 | 6 | module.exports = function () { 7 | const app = this; 8 | const Model = app.get('rethinkdbClient'); 9 | const paginate = app.get('paginate'); 10 | 11 | const options = { 12 | name: 'email_templates', 13 | Model, 14 | paginate 15 | }; 16 | 17 | // Initialize our service with any options it requires 18 | app.use('/email-templates', createService(options)); 19 | 20 | // Get our initialized service so that we can register hooks and filters 21 | const service = app.service('email-templates'); 22 | 23 | service.hooks(hooks); 24 | 25 | if (service.filter) { 26 | service.filter(filters); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /client/src/api/flowzdata/index.js: -------------------------------------------------------------------------------- 1 | import api from '../../api' 2 | let model = 'flowzdata' 3 | export default { 4 | get: (id = null, params = null, headers = null) => { 5 | if (id === null) { 6 | return api.request('get', '/' + model, null, params, headers).then(response => { 7 | return response.data 8 | }) 9 | } else { 10 | return api.request('get', '/' + model + '/' + id, null, params, headers) 11 | } 12 | }, 13 | // getThis: (id) => { 14 | // return api.request('get', '/' + model + '/' + id) 15 | // }, 16 | post: (data) => { 17 | return api.request('post', '/' + model, data) 18 | }, 19 | put: (id, data) => { 20 | return api.request('put', '/' + model + '/' + id, data) 21 | }, 22 | patch: (id, data) => { 23 | return api.request('patch', '/' + model + '/' + id, data) 24 | }, 25 | delete: (id) => { 26 | return api.request('delete', '/' + model + '/' + id) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /service/src/app.hooks.js: -------------------------------------------------------------------------------- 1 | // Application hooks that run for every service 2 | const logger = require('./hooks/logger'); 3 | 4 | module.exports = { 5 | before: { 6 | all: [], 7 | find: [ 8 | hook => beforeFind(hook) 9 | ], 10 | get: [], 11 | create: [], 12 | update: [], 13 | patch: [], 14 | remove: [] 15 | }, 16 | 17 | after: { 18 | all: [ logger() ], 19 | find: [], 20 | get: [], 21 | create: [], 22 | update: [], 23 | patch: [], 24 | remove: [] 25 | }, 26 | 27 | error: { 28 | all: [ logger() ], 29 | find: [], 30 | get: [], 31 | create: [], 32 | update: [], 33 | patch: [], 34 | remove: [] 35 | } 36 | }; 37 | 38 | function beforeFind(hook) { 39 | if (hook.params.query && hook.params.query.$paginate) { 40 | hook.params.paginate = hook.params.query.$paginate === 'false' || hook.params.query.$paginate === false; 41 | delete hook.params.query.$paginate; 42 | } 43 | } -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/bpmn/parts/implementation/SignalEventDefinition.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var eventDefinitionReference = require('./EventDefinitionReference'), 4 | elementReferenceProperty = require('./ElementReferenceProperty'); 5 | 6 | 7 | module.exports = function(group, element, bpmnFactory, signalEventDefinition) { 8 | 9 | group.entries = group.entries.concat(eventDefinitionReference(element, signalEventDefinition, bpmnFactory, { 10 | label: 'Signal', 11 | elementName: 'signal', 12 | elementType: 'bpmn:Signal', 13 | referenceProperty: 'signalRef', 14 | newElementIdPrefix: 'Signal_' 15 | })); 16 | 17 | 18 | group.entries = group.entries.concat(elementReferenceProperty(element, signalEventDefinition, bpmnFactory, { 19 | id: 'signal-element-name', 20 | label: 'Signal Name', 21 | referenceProperty: 'signalRef', 22 | modelProperty: 'name', 23 | shouldValidate: true 24 | })); 25 | 26 | }; 27 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/HistoryTimeToLiveProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var is = require('bpmn-js/lib/util/ModelUtil').is, 4 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject; 5 | 6 | var historyTimeToLive = require('./implementation/HistoryTimeToLive'); 7 | 8 | module.exports = function(group, element, bpmnFactory, translate) { 9 | var businessObject = getBusinessObject(element); 10 | 11 | if (is(element, 'camunda:Process') || 12 | is(element, 'bpmn:Participant') && businessObject.get('processRef')) { 13 | 14 | group.entries = group.entries.concat(historyTimeToLive(element, bpmnFactory, { 15 | getBusinessObject: function(element) { 16 | var bo = getBusinessObject(element); 17 | 18 | if (!is(bo, 'bpmn:Participant')) { 19 | return bo; 20 | } 21 | 22 | return bo.get('processRef'); 23 | } 24 | }, translate)); 25 | 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /client/build/webpack.test.conf.js: -------------------------------------------------------------------------------- 1 | // This is the webpack config used for unit tests. 2 | 3 | var utils = require('./utils') 4 | var webpack = require('webpack') 5 | var merge = require('webpack-merge') 6 | var baseConfig = require('./webpack.base.conf') 7 | 8 | var webpackConfig = merge(baseConfig, { 9 | // use inline sourcemap for karma-sourcemap-loader 10 | module: { 11 | rules: utils.styleLoaders() 12 | }, 13 | devtool: '#inline-source-map', 14 | resolveLoader: { 15 | alias: { 16 | // necessary to to make lang="scss" work in test when using vue-loader's ?inject option 17 | // see discussion at https://github.com/vuejs/vue-loader/issues/724 18 | 'scss-loader': 'sass-loader' 19 | } 20 | }, 21 | plugins: [ 22 | new webpack.DefinePlugin({ 23 | 'process.env': require('../config/test.env') 24 | }) 25 | ] 26 | }) 27 | 28 | // no need for app entry during tests 29 | delete webpackConfig.entry 30 | 31 | module.exports = webpackConfig 32 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/bpmn/parts/implementation/MessageEventDefinition.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var eventDefinitionReference = require('./EventDefinitionReference'), 4 | elementReferenceProperty = require('./ElementReferenceProperty'); 5 | 6 | 7 | module.exports = function(group, element, bpmnFactory, messageEventDefinition) { 8 | 9 | group.entries = group.entries.concat(eventDefinitionReference(element, messageEventDefinition, bpmnFactory, { 10 | label: 'Message', 11 | elementName: 'message', 12 | elementType: 'bpmn:Message', 13 | referenceProperty: 'messageRef', 14 | newElementIdPrefix: 'Message_' 15 | })); 16 | 17 | 18 | group.entries = group.entries.concat(elementReferenceProperty(element, messageEventDefinition, bpmnFactory, { 19 | id: 'message-element-name', 20 | label: 'Message Name', 21 | referenceProperty: 'messageRef', 22 | modelProperty: 'name', 23 | shouldValidate: true 24 | })); 25 | 26 | }; 27 | -------------------------------------------------------------------------------- /client/vhost_ssl_develop.conf: -------------------------------------------------------------------------------- 1 | # 2 | #ServerName www.engine.flowzcluster.tk 3 | #ServerAlias *.flowzcluster.tk 4 | #Redirect / https://www.engine.flowzcluster.tk 5 | # 6 | 7 | 8 | ServerName www.engine.flowzcluster.tk 9 | ServerAlias *.flowzcluster.tk 10 | DocumentRoot "/var/www/html/" 11 | 12 | Options Indexes FollowSymLinks 13 | AllowOverride All 14 | Require all granted 15 | 16 | SSLEngine On 17 | SSLCertificateFile /etc/ssl/cert/cert_develop.pem 18 | SSLCertificateKeyFile /etc/ssl/privkey/privkey_develop.pem 19 | 20 | 21 | 22 | 23 | ServerName www.engine.flowzflowzcluster.tk 24 | ServerAlias *.flowzcluster.tk 25 | #Redirect / https://www.engine.flowzcluster.tk 26 | DocumentRoot "/var/www/html/" 27 | 28 | Options Indexes FollowSymLinks 29 | AllowOverride All 30 | Require all granted 31 | 32 | 33 | -------------------------------------------------------------------------------- /client/vhost_ssl_master.conf: -------------------------------------------------------------------------------- 1 | # 2 | #ServerName www.engine.flowzdigital.com 3 | #ServerAlias *.flowzdigital.com 4 | #Redirect / https://www.engine.flowzdigital.com 5 | # 6 | 7 | 8 | ServerName www.engine.flowzdigital.com 9 | ServerAlias *.flowzdigital.com 10 | DocumentRoot "/var/www/html/" 11 | 12 | Options Indexes FollowSymLinks 13 | AllowOverride All 14 | Require all granted 15 | 16 | SSLEngine on 17 | SSLCertificateFile /etc/ssl/cert/cert_master.pem 18 | SSLCertificateKeyFile /etc/ssl/privkey/privkey_master.pem 19 | 20 | 21 | 22 | 23 | ServerName www.engine.flowzdigital.com 24 | ServerAlias *.flowzdigital.com 25 | #Redirect / https://www.engine.flowzdigital.com 26 | DocumentRoot "/var/www/html/" 27 | 28 | Options Indexes FollowSymLinks 29 | AllowOverride All 30 | Require all granted 31 | 32 | 33 | -------------------------------------------------------------------------------- /service/src/services/dataquery/dataquery.class.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-unused-vars */ 2 | class Service { 3 | constructor (options) { 4 | this.options = options || {}; 5 | } 6 | 7 | find (params) { 8 | return Promise.resolve([]); 9 | } 10 | 11 | get (id, params) { 12 | return Promise.resolve({ 13 | id, text: `A new message with ID: ${id}!` 14 | }); 15 | } 16 | 17 | create (data, params) { 18 | if (Array.isArray(data)) { 19 | return Promise.all(data.map(current => this.create(current))); 20 | } 21 | 22 | return Promise.resolve(data); 23 | } 24 | 25 | update (id, data, params) { 26 | return Promise.resolve(data); 27 | } 28 | 29 | patch (id, data, params) { 30 | return Promise.resolve(data); 31 | } 32 | 33 | remove (id, params) { 34 | return Promise.resolve({ id }); 35 | } 36 | } 37 | 38 | module.exports = function (options) { 39 | return new Service(options); 40 | }; 41 | 42 | module.exports.Service = Service; 43 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/bpmn/parts/implementation/Name.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../../factory/EntryFactory'); 4 | 5 | /** 6 | * Create an entry to modify the name of an an element. 7 | * 8 | * @param {djs.model.Base} element 9 | * @param {Object} options 10 | * @param {string} options.id the id of the entry 11 | * @param {string} options.label the label of the entry 12 | * 13 | * @return {Array} return an array containing 14 | * the entry to modify the name 15 | */ 16 | module.exports = function(element, options, translate) { 17 | 18 | options = options || {}; 19 | var id = options.id || 'name', 20 | label = options.label || translate('Name'), 21 | modelProperty = options.modelProperty || 'name'; 22 | 23 | var nameEntry = entryFactory.textBox({ 24 | id: id, 25 | label: label, 26 | modelProperty: modelProperty 27 | }); 28 | 29 | return [ nameEntry ]; 30 | 31 | }; 32 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/cmd/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var forEach = require('lodash/collection').forEach; 4 | 5 | var HANDLERS = { 6 | 'properties-panel.update-businessobject': require('./UpdateBusinessObjectHandler'), 7 | 'properties-panel.create-and-reference': require('./CreateAndReferenceHandler'), 8 | 'properties-panel.create-businessobject-list': require('./CreateBusinessObjectListHandler'), 9 | 'properties-panel.update-businessobject-list': require('./UpdateBusinessObjectListHandler'), 10 | 'properties-panel.multi-command-executor': require('./MultiCommandHandler') 11 | }; 12 | 13 | 14 | function CommandInitializer(eventBus, commandStack) { 15 | 16 | eventBus.on('diagram.init', function () { 17 | forEach(HANDLERS, function (handler, id) { 18 | commandStack.registerHandler(id, handler); 19 | }); 20 | }); 21 | } 22 | 23 | CommandInitializer.$inject = ['eventBus', 'commandStack']; 24 | 25 | module.exports = { 26 | __init__: [CommandInitializer] 27 | }; 28 | -------------------------------------------------------------------------------- /client/src/api/finstance/index.js: -------------------------------------------------------------------------------- 1 | import api from '../../api' 2 | let model = 'finstance' 3 | export default { 4 | get: (id = null, params = null, headers = null) => { 5 | if (id === null) { 6 | return api.request('get', '/' + model, null, params, headers) 7 | } else { 8 | return api.request('get', '/' + model + '/' + id, null, params, headers) 9 | } 10 | }, 11 | // getThis: (id) => { 12 | // return api.request('get', '/' + model + '/' + id) 13 | // }, 14 | post: (data, params = null, headers) => { 15 | return api.request('post', '/' + model, data, params, headers) 16 | }, 17 | put: (id, data, params = null, headers) => { 18 | return api.request('put', '/' + model + '/' + id, data, params, headers) 19 | }, 20 | patch: (id, data, params = null, headers) => { 21 | return api.request('patch', '/' + model + '/' + id, data, params, headers) 22 | }, 23 | delete: (id, params = null, headers) => { 24 | return api.request('delete', '/' + model + '/' + id, params, headers) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /client/src/components/configExpand.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 46 | 47 | 48 | 51 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/cmd/MultiCommandHandler.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var forEach = require('lodash/collection').forEach; 4 | 5 | /** 6 | * A handler that combines and executes multiple commands. 7 | * 8 | * All updates are bundled on the command stack and executed in one step. 9 | * This also makes it possible to revert the changes in one step. 10 | * 11 | * Example use case: remove the camunda:formKey attribute and in addition 12 | * add all form fields needed for the camunda:formData property. 13 | * 14 | * @class 15 | * @constructor 16 | */ 17 | function MultiCommandHandler(commandStack) { 18 | this._commandStack = commandStack; 19 | } 20 | 21 | MultiCommandHandler.$inject = ['commandStack']; 22 | 23 | module.exports = MultiCommandHandler; 24 | 25 | MultiCommandHandler.prototype.preExecute = function (context) { 26 | 27 | var commandStack = this._commandStack; 28 | 29 | forEach(context, function (command) { 30 | commandStack.execute(command.cmd, command.context); 31 | }); 32 | }; 33 | -------------------------------------------------------------------------------- /client/src/api/dflowzdata/index.js: -------------------------------------------------------------------------------- 1 | import api from '../../api' 2 | let model = 'dflowzdata' 3 | export default { 4 | get: (id = null, params = null, headers = null) => { 5 | if (id === null) { 6 | return api.request('get', '/' + model, null, params, headers) 7 | } else { 8 | return api.request('get', '/' + model + '/' + id, null, params, headers) 9 | } 10 | }, 11 | // getThis: (id) => { 12 | // return api.request('get', '/' + model + '/' + id) 13 | // }, 14 | post: (data, params = null, headers) => { 15 | return api.request('post', '/' + model, data, params, headers) 16 | }, 17 | put: (id, data, params = null, headers) => { 18 | return api.request('put', '/' + model + '/' + id, data, params, headers) 19 | }, 20 | patch: (id, data, params = null, headers) => { 21 | return api.request('patch', '/' + model + '/' + id, data, params, headers) 22 | }, 23 | delete: (id, params = null, headers) => { 24 | return api.request('delete', '/' + model + '/' + id, params, headers) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /JobQue/seneca-job-queue/worker-need.js: -------------------------------------------------------------------------------- 1 | const config = require('./config') 2 | const cp = require('child_process') 3 | const pino = require('pino') 4 | const PINO = config.pino 5 | const symmetricWorker = config.symmetricWorker 6 | 7 | function executeChildProcessAsWorker (jobType, options) { 8 | try { 9 | let strOptions = JSON.stringify(options) 10 | let n = cp.fork(`${__dirname}/${symmetricWorker.childProcessFile}`, [jobType, strOptions]) 11 | n.on('message', (m) => { 12 | pino(PINO).info('PARENT got message:', m) 13 | }) 14 | } catch (e) { 15 | pino(PINO).error('Unable to load child process :', e) 16 | } 17 | } 18 | 19 | var socket = require('socket.io-client')(symmetricWorker.executeWorkerURL + symmetricWorker.executeWorkerService, {reconnect: true}) 20 | 21 | socket.on('connect', function () {pino(PINO).info('socket is connected')}) 22 | socket.on('worker', function (data) { 23 | executeChildProcessAsWorker(data.jobType, data.options) 24 | }) 25 | socket.on('disconnect', function () {pino(PINO).info('socket is disconnected')}) 26 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/implementation/JobPriority.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../../factory/EntryFactory'); 4 | 5 | var cmdHelper = require('../../../../helper/CmdHelper'); 6 | 7 | module.exports = function(element, bpmnFactory, options, translate) { 8 | 9 | var getBusinessObject = options.getBusinessObject; 10 | 11 | var jobPriorityEntry = entryFactory.textField({ 12 | id: 'jobPriority', 13 | label: translate('Job Priority'), 14 | modelProperty: 'jobPriority', 15 | 16 | get: function(element, node) { 17 | var bo = getBusinessObject(element); 18 | return { 19 | jobPriority: bo.get('camunda:jobPriority') 20 | }; 21 | }, 22 | 23 | set: function(element, values) { 24 | var bo = getBusinessObject(element); 25 | return cmdHelper.updateBusinessObject(element, bo, { 26 | 'camunda:jobPriority': values.jobPriority || undefined 27 | }); 28 | } 29 | 30 | }); 31 | 32 | return [ jobPriorityEntry ]; 33 | 34 | }; 35 | -------------------------------------------------------------------------------- /client/static/js/checkbox.js: -------------------------------------------------------------------------------- 1 | var ids= [] 2 | var name = [] 3 | var value = [] 4 | var element = [] 5 | $('checkbox').each(function () { 6 | ids.push(this.id) 7 | }) 8 | 9 | var html = $("#form").find(".checkbox").html() 10 | 11 | $("#form").find(".checkbox").html() 12 | // $("#form").find('#'+ids[i]).append('
') 13 | 14 | $('input[name="checkbox1"]').each(function () { 15 | element.push(this) 16 | }) 17 | for (var i = 0; i < ids.length; i++) { 18 | name.push($('#' + ids[i]).attr('name')) 19 | value.push($('#' + ids[i]).attr('value')) 20 | } 21 | for(var j=0;j
') 13 | 14 | $('input[name="radio1"]').each(function () { 15 | element.push(this) 16 | }) 17 | 18 | for (var i = 0; i < ids.length; i++) { 19 | name.push($('#' + ids[i]).attr('name')) 20 | value.push($('#' + ids[i]).attr('value')) 21 | } 22 | 23 | for(var j=0;j { 3 | const name = child.$options.name 4 | if (name === componentName) { 5 | child.$emit.apply(child, [eventName].concat(params)) 6 | } else { 7 | // Todo If params is an empty array, the received will be undefined 8 | broadcast.apply(child, [componentName, eventName].concat([params])) 9 | } 10 | }) 11 | } 12 | export default { 13 | methods: { 14 | dispatch (componentName, eventName, params) { 15 | let parent = this.$parent || this.$root 16 | let name = parent.$options.name 17 | while (parent && (!name || name !== componentName)) { 18 | parent = parent.$parent 19 | if (parent) { 20 | name = parent.$options.name 21 | } 22 | } 23 | if (parent) { 24 | parent.$emit.apply(parent, [eventName].concat(params)) 25 | } 26 | }, 27 | broadcast (componentName, eventName, params) { 28 | broadcast.call(this, componentName, eventName, params) 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/implementation/ExternalTaskPriority.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../../factory/EntryFactory'); 4 | 5 | var cmdHelper = require('../../../../helper/CmdHelper'); 6 | 7 | module.exports = function(element, bpmnFactory, options, translate) { 8 | 9 | var getBusinessObject = options.getBusinessObject; 10 | 11 | var externalTaskPriorityEntry = entryFactory.textField({ 12 | id: 'externalTaskPriority', 13 | label: translate('Task Priority'), 14 | modelProperty: 'taskPriority', 15 | 16 | get: function(element, node) { 17 | var bo = getBusinessObject(element); 18 | return { 19 | taskPriority: bo.get('camunda:taskPriority') 20 | }; 21 | }, 22 | 23 | set: function(element, values) { 24 | var bo = getBusinessObject(element); 25 | return cmdHelper.updateBusinessObject(element, bo, { 26 | 'camunda:taskPriority': values.taskPriority || undefined 27 | }); 28 | } 29 | 30 | }); 31 | 32 | return [ externalTaskPriorityEntry ]; 33 | 34 | }; 35 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/helper/ParticipantHelper.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var is = require('bpmn-js/lib/util/ModelUtil').is, 4 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject, 5 | cmdHelper = require('./CmdHelper'); 6 | 7 | 8 | var ParticipantHelper = {}; 9 | 10 | module.exports = ParticipantHelper; 11 | 12 | ParticipantHelper.modifyProcessBusinessObject = function(element, property, values) { 13 | if ( !is(element, 'bpmn:Participant') ) { 14 | return {}; 15 | } 16 | 17 | var bo = getBusinessObject(element).get('processRef'), 18 | properties = {}; 19 | 20 | properties[property] = values[property]; 21 | 22 | return cmdHelper.updateBusinessObject(element, bo, properties); 23 | }; 24 | 25 | ParticipantHelper.getProcessBusinessObject = function(element, propertyName) { 26 | if ( !is(element, 'bpmn:Participant') ) { 27 | return {}; 28 | } 29 | 30 | var bo = getBusinessObject(element).get('processRef'), 31 | properties = {}; 32 | 33 | properties[propertyName] = bo.get(propertyName); 34 | 35 | return properties; 36 | }; -------------------------------------------------------------------------------- /service/src/services/index.js: -------------------------------------------------------------------------------- 1 | const schema = require('./schema/schema.service.js'); 2 | const emailtemplate = require('./emailtemplate/emailtemplate.service.js'); 3 | const flowz = require('./flowz/flowz.service.js'); 4 | const bpmnplugins = require('./bpmnplugins/bpmnplugins.service.js'); 5 | const finstance = require('./finstance/finstance.service.js'); 6 | const flowzdata = require('./flowzdata/flowzdata.service.js'); 7 | const sendmail = require('./sendmail/sendmail.service.js'); 8 | const emailReceive = require('./email-receive/email-receive.service.js'); 9 | const dataquery = require('./dataquery/dataquery.service.js'); 10 | const dflowzdata = require('./dflowzdata/dflowzdata.service.js'); 11 | module.exports = function() { 12 | const app = this; // eslint-disable-line no-unused-vars 13 | app.configure(schema); 14 | app.configure(emailtemplate); 15 | app.configure(flowz); 16 | app.configure(bpmnplugins); 17 | app.configure(finstance); 18 | app.configure(flowzdata); 19 | app.configure(sendmail); 20 | app.configure(emailReceive); 21 | app.configure(dataquery); 22 | app.configure(dflowzdata); 23 | }; 24 | -------------------------------------------------------------------------------- /upgrade_demo.sh: -------------------------------------------------------------------------------- 1 | curl -u ""$RANCHER_USER":"$RANCHER_PASS"" \ 2 | -X POST \ 3 | -H 'Accept: application/json' \ 4 | -H 'Content-Type: application/json' \ 5 | -d '{ 6 | "inServiceStrategy":{"launchConfig": {"imageUuid":"docker:obdev/flowz_frontend_flowz:demo","kind": "container","labels":{"io.rancher.container.pull_image": "always","io.rancher.scheduler.affinity:host_label": "machine=engine-front","io.rancher.scheduler.affinity:container_label_soft_ne": "io.rancher.stack_service.name=front-flowz/engine-fronted-flowz"},"ports": ["80:80/tcp","443:443/tcp"],"version": "40f37569-31d5-4797-98e7-3765e0a7d31b","healthCheck": {"type": "instanceHealthCheck","healthyThreshold": 2,"initializingTimeout": 60000,"interval": 2000,"name": null,"port": 80,"recreateOnQuorumStrategyConfig": {"type": "recreateOnQuorumStrategyConfig","quorum": 1},"reinitializingTimeout": 60000,"requestLine": "GET \"http://localhost\" \"HTTP/1.0\"","responseTimeout": 60000,"strategy": "recreateOnQuorum","unhealthyThreshold": 3},"networkMode": "managed"}},"toServiceStrategy":null}' \ 7 | 'http://rancher.flowz.com:8080/v2-beta/projects/1a29/services/1s316?action=upgrade' 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 FlowzPlatform 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/bpmn/parts/IdProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../factory/EntryFactory'), 4 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject, 5 | utils = require('../../../Utils'), 6 | cmdHelper = require('../../../helper/CmdHelper'); 7 | 8 | module.exports = function(group, element, translate) { 9 | 10 | // Id 11 | group.entries.push(entryFactory.validationAwareTextField({ 12 | id: 'id', 13 | label: translate('Id'), 14 | modelProperty: 'id', 15 | getProperty: function(element) { 16 | return getBusinessObject(element).id; 17 | }, 18 | setProperty: function(element, properties) { 19 | 20 | element = element.labelTarget || element; 21 | 22 | return cmdHelper.updateProperties(element, properties); 23 | }, 24 | validate: function(element, values) { 25 | var idValue = values.id; 26 | 27 | var bo = getBusinessObject(element); 28 | 29 | var idError = utils.isIdValid(bo, idValue); 30 | 31 | return idError ? { id: idError } : {}; 32 | } 33 | })); 34 | 35 | }; 36 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/PropertiesProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var properties = require('./implementation/Properties'), 4 | elementHelper = require('../../../helper/ElementHelper'), 5 | cmdHelper = require('../../../helper/CmdHelper'); 6 | 7 | 8 | module.exports = function(group, element, bpmnFactory, translate) { 9 | 10 | var propertiesEntry = properties(element, bpmnFactory, { 11 | id: 'properties', 12 | modelProperties: [ 'name', 'value' ], 13 | labels: [ translate('Name'), translate('Value') ], 14 | 15 | getParent: function(element, node, bo) { 16 | return bo.extensionElements; 17 | }, 18 | 19 | createParent: function(element, bo) { 20 | var parent = elementHelper.createElement('bpmn:ExtensionElements', { values: [] }, bo, bpmnFactory); 21 | var cmd = cmdHelper.updateBusinessObject(element, bo, { extensionElements: parent }); 22 | return { 23 | cmd: cmd, 24 | parent: parent 25 | }; 26 | } 27 | }, translate); 28 | 29 | if (propertiesEntry) { 30 | group.entries.push(propertiesEntry); 31 | } 32 | 33 | }; 34 | -------------------------------------------------------------------------------- /client/test/unit/karma.conf.js: -------------------------------------------------------------------------------- 1 | // This is a karma config file. For more details see 2 | // http://karma-runner.github.io/0.13/config/configuration-file.html 3 | // we are also using it with karma-webpack 4 | // https://github.com/webpack/karma-webpack 5 | 6 | var webpackConfig = require('../../build/webpack.test.conf') 7 | 8 | module.exports = function (config) { 9 | config.set({ 10 | // to run in additional browsers: 11 | // 1. install corresponding karma launcher 12 | // http://karma-runner.github.io/0.13/config/browsers.html 13 | // 2. add it to the `browsers` array below. 14 | browsers: ['PhantomJS'], 15 | frameworks: ['mocha', 'sinon-chai', 'phantomjs-shim'], 16 | reporters: ['spec', 'coverage'], 17 | files: ['./index.js'], 18 | preprocessors: { 19 | './index.js': ['webpack', 'sourcemap'] 20 | }, 21 | webpack: webpackConfig, 22 | webpackMiddleware: { 23 | noInfo: true 24 | }, 25 | coverageReporter: { 26 | dir: './coverage', 27 | reporters: [ 28 | { type: 'lcov', subdir: '.' }, 29 | { type: 'text-summary' } 30 | ] 31 | } 32 | }) 33 | } 34 | -------------------------------------------------------------------------------- /client/src/store/mutations.js: -------------------------------------------------------------------------------- 1 | var _ = require('lodash') 2 | export default { 3 | SET_USER (state, user) { 4 | state.user = user 5 | }, 6 | GET_USER (state) { 7 | return state.user 8 | }, 9 | SET_TOKEN (state, token) { 10 | state.token = token 11 | }, 12 | SET_ROLE (state, role) { 13 | state.role = role 14 | }, 15 | SET_SCHEMA (state, schema) { 16 | state.schema = schema 17 | }, 18 | SET_FLOWZDATA (state, flowz) { 19 | state.flowz = flowz 20 | }, 21 | SET_MAPTEMP (state, data) { 22 | // console.log(_.find(state.mappingTemp, { 'producer': data.producer })) 23 | var status = _.find(state.mappingTemp, { 'producer': data.producer }) 24 | if (status !== undefined) { 25 | var inx = _.findIndex(state.mappingTemp, { 'producer': data.producer }) 26 | state.mappingTemp[inx] = data 27 | } else { 28 | state.mappingTemp.push(data) 29 | } 30 | }, 31 | SET_DELTHISMAPTEMP (state, data) { 32 | state.mappingTemp.splice(data.index, 1) 33 | }, 34 | SET_XML (state, data) { 35 | state.BPMNxml = data 36 | }, 37 | REMOVE_XML (state) { 38 | state.BPMNxml = '' 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /service/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Feathers 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/styles/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bpmn-js-pp", 3 | "css_prefix_text": "icon-", 4 | "css_use_suffix": false, 5 | "hinting": true, 6 | "units_per_em": 1000, 7 | "ascent": 850, 8 | "glyphs": [ 9 | { 10 | "uid": "7222571caa5c15f83dcfd447c58d68d9", 11 | "css": "search", 12 | "code": 59397, 13 | "src": "entypo" 14 | }, 15 | { 16 | "uid": "c709da589c923ba3c2ad48d9fc563e93", 17 | "css": "clear", 18 | "code": 59394, 19 | "src": "entypo" 20 | }, 21 | { 22 | "uid": "c759418c008e9562944080fee617fc76", 23 | "css": "clear-circled", 24 | "code": 59650, 25 | "src": "entypo" 26 | }, 27 | { 28 | "uid": "70370693ada58ef0a60fa0984fe8d52a", 29 | "css": "add", 30 | "code": 59395, 31 | "src": "entypo" 32 | }, 33 | { 34 | "uid": "a66cdc7278e6b33b8bd44a141f5e1a8d", 35 | "css": "add-circled", 36 | "code": 59651, 37 | "src": "entypo" 38 | }, 39 | { 40 | "uid": "97902f87200ce74d181044df02a0458d", 41 | "css": "attention", 42 | "code": 59398, 43 | "src": "entypo" 44 | } 45 | ] 46 | } -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/implementation/HistoryTimeToLive.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../../factory/EntryFactory'); 4 | 5 | var cmdHelper = require('../../../../helper/CmdHelper'); 6 | 7 | module.exports = function(element, bpmnFactory, options, translate) { 8 | 9 | var getBusinessObject = options.getBusinessObject; 10 | 11 | var historyTimeToLiveEntry = entryFactory.textField({ 12 | id: 'historyTimeToLive', 13 | label: translate('History Time To Live'), 14 | modelProperty: 'historyTimeToLive', 15 | 16 | get: function(element, node) { 17 | var bo = getBusinessObject(element); 18 | var historyTimeToLive = bo.get('camunda:historyTimeToLive'); 19 | 20 | return { 21 | historyTimeToLive: historyTimeToLive ? historyTimeToLive : '' 22 | }; 23 | }, 24 | 25 | set: function(element, values) { 26 | var bo = getBusinessObject(element); 27 | return cmdHelper.updateBusinessObject(element, bo, { 28 | 'camunda:historyTimeToLive': values.historyTimeToLive || undefined 29 | }); 30 | } 31 | 32 | }); 33 | 34 | return [ historyTimeToLiveEntry ]; 35 | }; 36 | -------------------------------------------------------------------------------- /client/test/e2e/runner.js: -------------------------------------------------------------------------------- 1 | // 1. start the dev server using production config 2 | process.env.NODE_ENV = 'testing' 3 | var server = require('../../build/dev-server.js') 4 | 5 | server.ready.then(() => { 6 | // 2. run the nightwatch test suite against it 7 | // to run in additional browsers: 8 | // 1. add an entry in test/e2e/nightwatch.conf.json under "test_settings" 9 | // 2. add it to the --env flag below 10 | // or override the environment flag, for example: `npm run e2e -- --env chrome,firefox` 11 | // For more information on Nightwatch's config file, see 12 | // http://nightwatchjs.org/guide#settings-file 13 | var opts = process.argv.slice(2) 14 | if (opts.indexOf('--config') === -1) { 15 | opts = opts.concat(['--config', 'test/e2e/nightwatch.conf.js']) 16 | } 17 | if (opts.indexOf('--env') === -1) { 18 | opts = opts.concat(['--env', 'chrome']) 19 | } 20 | 21 | var spawn = require('cross-spawn') 22 | var runner = spawn('./node_modules/.bin/nightwatch', opts, { stdio: 'inherit' }) 23 | 24 | runner.on('exit', function (code) { 25 | server.close() 26 | process.exit(code) 27 | }) 28 | 29 | runner.on('error', function (err) { 30 | server.close() 31 | throw err 32 | }) 33 | }) 34 | -------------------------------------------------------------------------------- /client/test/e2e/nightwatch.conf.js: -------------------------------------------------------------------------------- 1 | require('babel-register') 2 | var config = require('../../config') 3 | 4 | // http://nightwatchjs.org/gettingstarted#settings-file 5 | module.exports = { 6 | src_folders: ['test/e2e/specs'], 7 | output_folder: 'test/e2e/reports', 8 | custom_assertions_path: ['test/e2e/custom-assertions'], 9 | 10 | selenium: { 11 | start_process: true, 12 | server_path: require('selenium-server').path, 13 | host: '127.0.0.1', 14 | port: 4444, 15 | cli_args: { 16 | 'webdriver.chrome.driver': require('chromedriver').path 17 | } 18 | }, 19 | 20 | test_settings: { 21 | default: { 22 | selenium_port: 4444, 23 | selenium_host: 'localhost', 24 | silent: true, 25 | globals: { 26 | devServerURL: 'http://localhost:' + (process.env.PORT || config.dev.port) 27 | } 28 | }, 29 | 30 | chrome: { 31 | desiredCapabilities: { 32 | browserName: 'chrome', 33 | javascriptEnabled: true, 34 | acceptSslCerts: true 35 | } 36 | }, 37 | 38 | firefox: { 39 | desiredCapabilities: { 40 | browserName: 'firefox', 41 | javascriptEnabled: true, 42 | acceptSslCerts: true 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /service/src/services/flowz/flowz.hooks.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | before: { 3 | all: [], 4 | find: [ 5 | hook => beforeFind(hook) 6 | ], 7 | get: [], 8 | create: [ 9 | hook => beforeCreate(hook) 10 | ], 11 | update: [], 12 | patch: [], 13 | remove: [] 14 | }, 15 | after: { 16 | all: [], 17 | find: [], 18 | get: [], 19 | create: [ 20 | hook => afterCreate(hook) 21 | ], 22 | update: [], 23 | patch: [], 24 | remove: [] 25 | }, 26 | error: { 27 | all: [], 28 | find: [], 29 | get: [], 30 | create: [], 31 | update: [], 32 | patch: [], 33 | remove: [] 34 | } 35 | }; 36 | 37 | let beforeFind = function(hook) { 38 | if (hook.params.query && hook.params.query.$paginate) { 39 | hook.params.paginate = hook.params.query.$paginate === 'false' || hook.params.query.$paginate === false; 40 | delete hook.params.query.$paginate; 41 | } 42 | } 43 | 44 | let beforeCreate = function (hook) { 45 | hook.params.done = true 46 | } 47 | 48 | let afterCreate = function (hook) { 49 | if (hook.result.id && hook.params.done) { 50 | hook.service.options.r.db(hook.service.options.db).tableCreate(hook.result.id.replace(/-/g, '_')).run() 51 | } 52 | } -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/JobConfigurationProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var is = require('bpmn-js/lib/util/ModelUtil').is, 4 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject; 5 | 6 | var jobPriority = require('./implementation/JobPriority'), 7 | jobRetryTimeCycle = require('./implementation/JobRetryTimeCycle'); 8 | 9 | module.exports = function(group, element, bpmnFactory, translate) { 10 | var businessObject = getBusinessObject(element); 11 | 12 | if (is(element, 'camunda:JobPriorized') || 13 | is(element, 'bpmn:Participant') && businessObject.get('processRef')) { 14 | 15 | group.entries = group.entries.concat(jobPriority(element, bpmnFactory, { 16 | getBusinessObject: function(element) { 17 | var bo = getBusinessObject(element); 18 | 19 | if (!is(bo, 'bpmn:Participant')) { 20 | return bo; 21 | } 22 | 23 | return bo.get('processRef'); 24 | } 25 | }, translate)); 26 | } 27 | 28 | if (is(element, 'camunda:AsyncCapable')) { 29 | group.entries = group.entries.concat(jobRetryTimeCycle(element, bpmnFactory, { 30 | getBusinessObject: getBusinessObject 31 | }, translate)); 32 | } 33 | 34 | }; 35 | -------------------------------------------------------------------------------- /service/src/services/flowz/flowz.service.js: -------------------------------------------------------------------------------- 1 | // Initializes the `emailtemplate` service on path `/emailtemplate` 2 | const createService = require('feathers-rethinkdb'); 3 | const hooks = require('./flowz.hooks'); 4 | module.exports = function () { 5 | const app = this; 6 | const Model = app.get('rethinkdbClient'); 7 | const paginate = app.get('paginate'); 8 | const options = { 9 | name: 'flowz', 10 | Model, 11 | paginate 12 | }; 13 | // Initialize our service with any options it requires 14 | app.use('/flowz', createService(options)); 15 | // Get our initialized service so that we can register hooks and filters 16 | const service = app.service('flowz'); 17 | service.hooks(hooks); 18 | service.hooks({ 19 | before: { 20 | find(context) { 21 | if (context.params.query.$useremail) { 22 | let useremail = context.params.query.$useremail; 23 | delete context.params.query.$useremail; 24 | const query = this.createQuery(context.params.query); 25 | context.params.rethinkdb = query.filter((row) => { 26 | return row('allowedusers').setIntersection( 27 | [useremail] 28 | ).count().ge(1); 29 | }); 30 | } 31 | } 32 | } 33 | }); 34 | }; 35 | -------------------------------------------------------------------------------- /client/build/check-versions.js: -------------------------------------------------------------------------------- 1 | var chalk = require('chalk') 2 | var semver = require('semver') 3 | var packageConfig = require('../package.json') 4 | var shell = require('shelljs') 5 | function exec (cmd) { 6 | return require('child_process').execSync(cmd).toString().trim() 7 | } 8 | 9 | var versionRequirements = [ 10 | { 11 | name: 'node', 12 | currentVersion: semver.clean(process.version), 13 | versionRequirement: packageConfig.engines.node 14 | }, 15 | ] 16 | 17 | if (shell.which('npm')) { 18 | versionRequirements.push({ 19 | name: 'npm', 20 | currentVersion: exec('npm --version'), 21 | versionRequirement: packageConfig.engines.npm 22 | }) 23 | } 24 | 25 | module.exports = function () { 26 | var warnings = [] 27 | for (var i = 0; i < versionRequirements.length; i++) { 28 | var mod = versionRequirements[i] 29 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 30 | warnings.push(mod.name + ': ' + 31 | chalk.red(mod.currentVersion) + ' should be ' + 32 | chalk.green(mod.versionRequirement) 33 | ) 34 | } 35 | } 36 | 37 | if (warnings.length) { 38 | for (var i = 0; i < warnings.length; i++) { 39 | var warning = warnings[i] 40 | } 41 | process.exit(1) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /client/src/Utils/index.js: -------------------------------------------------------------------------------- 1 | import store from '@/store' 2 | const millisend = 1000 3 | 4 | let isCachedResultValid = (result, timeout = 3600) => { 5 | return (result && Date.now() - result.timestamp < timeout * millisend) 6 | } 7 | let setCached = (key, result) => { 8 | store.state.Cache[key] = {'result': result, 'timestamp': Date.now()} 9 | } 10 | 11 | let CachedRes = (key, timeout) => { 12 | return new Promise((resolve, reject) => { 13 | if (store.state === undefined) { 14 | console.log('state undefined....') 15 | } 16 | const cachedResult = store.state.Cache[key] 17 | // check cache key valid 18 | if (isCachedResultValid(cachedResult, timeout)) { 19 | return resolve(cachedResult['result']) 20 | } else { 21 | return resolve(false) 22 | } 23 | }) 24 | } 25 | 26 | let removeTimeOutKey = (timeout = 7200) => { // TODO: only delete the old 27 | if (Object.keys(store.state.Cache).length > 10000) { 28 | for (let key in Object.keys(Cache)) { 29 | if (!isCachedResultValid(store.state.Cache[key], timeout)) { 30 | delete store.state.Cache[key] 31 | } 32 | } 33 | } 34 | } 35 | 36 | setTimeout(removeTimeOutKey, 7200) 37 | 38 | export default { 39 | isCachedResultValid, 40 | CachedRes, 41 | setCached 42 | } 43 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/AddRoles.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | let $ = require('jquery') 4 | var entryFactory = require('../../../factory/EntryFactory'), 5 | cmdHelper = require('../../../helper/CmdHelper'), 6 | is = require('bpmn-js/lib/util/ModelUtil').is, 7 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject; 8 | let nameProps = require('../../bpmn/parts/NameProps'); 9 | /** 10 | * Generate a form field specific textField using entryFactory. 11 | * 12 | * @param {string} options.id 13 | * @param {string} options.label 14 | * @param {string} options.modelProperty 15 | * @param {function} options.validate 16 | * 17 | * @return {Object} an entryFactory.textField object 18 | */ 19 | module.exports = function (group, element, translate, options) { 20 | var bo = getBusinessObject(element); 21 | if (!bo) { 22 | return; 23 | } 24 | 25 | if (is(element, 'bpmn:Process') || is(element, 'bpmn:Participant') && bo.get('processRef')) { 26 | var versionTagEntry = entryFactory.textField({ 27 | id: 'addRoles', 28 | label: translate('Add Roles'), 29 | modelProperty: 'addedRoles' 30 | }); 31 | group.entries.push(versionTagEntry); 32 | } 33 | }; 34 | 35 | -------------------------------------------------------------------------------- /client/src/components/subscription.vue: -------------------------------------------------------------------------------- 1 | 8 | 36 | 37 | -------------------------------------------------------------------------------- /client/src/api/authentication/index.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | import config from '../../config' 3 | 4 | export default { 5 | login: (params) => { 6 | return axios({ 7 | method: 'post', 8 | url: config.loginURL + '/login', 9 | data: params 10 | }).then(response => { 11 | if (response) { 12 | return response.data 13 | } else { 14 | throw new Error('Network error!') 15 | } 16 | }).catch(error => { 17 | throw error 18 | }) 19 | }, 20 | social: (params) => { 21 | return axios({ 22 | method: 'post', 23 | url: config.loginURL + '/verifyemail', 24 | data: params 25 | }).then(response => { 26 | if (response) { 27 | return response.data 28 | } else { 29 | throw new Error('Network error!') 30 | } 31 | }).catch(error => { 32 | throw error 33 | }) 34 | }, 35 | register: (params) => { 36 | return axios({ 37 | method: 'post', 38 | url: config.loginURL + '/setup', 39 | data: params 40 | }).then(response => { 41 | if (response) { 42 | return response.data 43 | } else { 44 | throw new Error('Network error!') 45 | } 46 | }).catch(error => { 47 | throw error 48 | }) 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /JobQue/seneca-job-queue/common.js: -------------------------------------------------------------------------------- 1 | var seneca = require('seneca')({log:'silent'}) 2 | const config = require('./config') 3 | const pino = require('pino') 4 | 5 | const pluginCreate = config.plugins.createPattern 6 | const pluginFind = config.plugins.findPattern 7 | const pluginQueue = config.plugins.queuePattern 8 | const pluginUpdate = config.plugins.updatePattern 9 | 10 | module.exports.createJob = function (bodyData) { 11 | return new Promise((resolve, reject) => { 12 | seneca.use('job').act(pluginCreate, bodyData, (err, result) => { 13 | if (err) { 14 | reject(err) 15 | } else { 16 | resolve(result) 17 | } 18 | }) 19 | }) 20 | } 21 | 22 | module.exports.findJob = function (bodyData) { 23 | return new Promise((resolve, reject) => { 24 | seneca.use('job').act(pluginFind, bodyData, (err, result) => { 25 | if (err) { 26 | reject(err) 27 | } else { 28 | resolve(result) 29 | } 30 | }) 31 | }) 32 | } 33 | 34 | module.exports.getJobQueue = function (options) { 35 | return new Promise((resolve, reject) => { 36 | seneca.use('job').act(pluginQueue, options, (err, result) => { 37 | if (err) { 38 | reject(err) 39 | } else { 40 | resolve(result) 41 | } 42 | }) 43 | }) 44 | } 45 | -------------------------------------------------------------------------------- /JobQue/twitter/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "clientURI": "http://localhost:8000", 3 | "serverURI": "http://localhost:3030", 4 | "watcherPath": "../bpmnPlugin", 5 | "tweetCredential": { 6 | "consumer_key": "TcVuvcy0O0prffK7yDBQ7gp7Q", 7 | "consumer_secret": "Gqsa31Y2woRapitGucYKrJW5q4Kz6fqZ177gj73EILMRHOeZNP", 8 | "access_token": "342663682-nQsA685vZLjgJoDlaIEh9hWSNpE6MAsaVzJqhLEN", 9 | "access_token_secret": "nEFc1TQMdcJQRop4ByHHiSSz2d0A6a5ikV1QbbODB7Sc7" 10 | }, 11 | "flowid": "5eb46868-cf0e-41d4-9103-e06581b48009", 12 | "rethinkdb": { 13 | "host": "47.254.27.134", 14 | "port": "28015", 15 | "db": "FlowzEngine" 16 | }, 17 | "qOptions": { 18 | "name": "scheduler", 19 | "masterInterval": 60000, 20 | "changeFeed": true, 21 | "concurrency": 1, 22 | "removeFinishedJobs": false 23 | }, 24 | "login": "http://auth.flowz.com/api/login", 25 | "credential": { 26 | "email": "kmahera@officebrain.com", 27 | "password": "123456" 28 | }, 29 | "sendEmail": "http://api.flowz.com/vmailmicro/sendEmail", 30 | "login": "http://auth.flowz.com/api/login", 31 | "roleURI": "http://api.flowz.com/authldap/userslist/", 32 | "flowz_table": "flowzinstance", 33 | "scheduler_table": "scheduler", 34 | "qJobTimeout": 3600000, 35 | "qJobRetryMax": 0 36 | } 37 | -------------------------------------------------------------------------------- /client/src/api/schema/index.js: -------------------------------------------------------------------------------- 1 | import api from '../../api' 2 | let model = 'schema' 3 | let getAllEntity = async(id) => { 4 | let response = await api.request('get', '/' + model + '/' + id) 5 | for (let [index, item] of response.data.entity.entries()) { 6 | if (item.customtype) { 7 | response.data.entity[index]['entity'] = await getAllEntity(item.type) 8 | response.data.entity[index]['name'] = item.name 9 | } 10 | } 11 | return response.data 12 | } 13 | export default { 14 | get: (id = null, params = null) => { 15 | if (id === null) { 16 | return api.request('get', '/' + model, null, params) 17 | } else { 18 | return api.request('get', '/' + model + '/' + id) 19 | } 20 | }, 21 | getCustom: (string) => { 22 | // console.log('string', string) 23 | if (!string) { 24 | return api.request('get', '/' + model + '?isdeleted=false') 25 | } else { 26 | return api.request('get', '/' + model + string) 27 | } 28 | }, 29 | getAll: getAllEntity, 30 | getThis: (id) => { 31 | return api.request('get', '/' + model + '/' + id) 32 | }, 33 | post: (data) => { 34 | return api.request('post', '/' + model, data) 35 | }, 36 | put: (id, data) => { 37 | return api.request('put', '/' + model + '/' + id, data) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/factory/TextBoxEntryFactory.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFieldDescription = require('./EntryFieldDescription'); 4 | 5 | 6 | var textBox = function(options, defaultParameters) { 7 | 8 | var resource = defaultParameters, 9 | label = options.label || resource.id, 10 | canBeShown = !!options.show && typeof options.show === 'function', 11 | description = options.description; 12 | 13 | resource.html = 14 | '' + 17 | '
' + 20 | '
' + 22 | '
'; 23 | 24 | // add description below text box entry field 25 | if (description) { 26 | resource.html += entryFieldDescription(description); 27 | } 28 | 29 | if (canBeShown) { 30 | resource.isShown = function() { 31 | return options.show.apply(resource, arguments); 32 | }; 33 | } 34 | 35 | resource.cssClasses = ['bpp-textbox']; 36 | 37 | return resource; 38 | }; 39 | 40 | module.exports = textBox; 41 | -------------------------------------------------------------------------------- /JobQue/scheduler/ca.cer: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDbzCCAlegAwIBAgIEWiAURDANBgkqhkiG9w0BAQ0FADA5MTcwNQYDVQQDDC5G 3 | bG93eiBEaWdpdGFsLWUyZDAwMmFkMzA1NzI0NzZiYWQxOTRiNTk1MTdhYWFjMB4X 4 | DTE3MTEzMDE0MjMwMFoXDTM3MTEzMDE0MDAwMFowOTE3MDUGA1UEAwwuRmxvd3og 5 | RGlnaXRhbC1lMmQwMDJhZDMwNTcyNDc2YmFkMTk0YjU5NTE3YWFhYzCCASIwDQYJ 6 | KoZIhvcNAQEBBQADggEPADCCAQoCggEBAN1+3KkM9hzxjJCPJTX5a9MieM0IJfrC 7 | CUnaBD1Dlx8fzEYyg6+pKBcbMZ5jRe61vh0nE0KNqTTawQAo7sOZhezuHOsHuW+i 8 | njfAA2dJ/Rni6oSUBvYXIF/oep8gcriRWYMAx3erP4t2fR/UPsdxe8RN9no6utio 9 | yuAVCdkLix3tlI9/ezcJhhAS/viXYnkYShNn8LO1w38ZUbxodTGQab3YVCzvsmyH 10 | V8fQYJuTJTjYNY0nf1SI32t7h8ZDWM85MPsbdH+orcGK3DQ2Uukh6XC4H4fcwKlh 11 | T3OdNo5G09b6YuORMLEGImbHsbigi+gKJiI48zTCAHLAwvcopDTgAtsCAwEAAaN/ 12 | MH0wHQYDVR0OBBYEFHi2Xx/LpGqIVJXEE//sMBfOMQ4pMA4GA1UdDwEB/wQEAwIC 13 | BDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TBAUwAwEB/zAf 14 | BgNVHSMEGDAWgBR4tl8fy6RqiFSVxBP/7DAXzjEOKTANBgkqhkiG9w0BAQ0FAAOC 15 | AQEA0CHWo1t2QEsCmFpdOXJjuyY4t8ChGVxucz/yIyCgk1e/8Wt4HC1yWNnqxjmY 16 | GeHBqUzfGPDY5mpbufb2FeJwGfUp04PRvUqlmJUGEMaWSUtDxs4Orxrzvir8PsD4 17 | RCnAdgYfBeS7ryiBKFDHMsBGuAJLq2ILbz7HO5Wmbgt05hu99/cgR8XIReka1zuH 18 | 1O4bkD6iMBei9QuuFfjJMv1coWWIDjLaQDHswTWCh9+6mnEWeY3kqT7WIWuFri/E 19 | xtT9GtO5Id3WGjJLCdanOP3AUyf0spnALjvbHKuH7gpz03LpbmcR22dcpPI7HAsQ 20 | W0LD0cRNsBHnYTYMgW/ap9xWog== 21 | -----END CERTIFICATE----- 22 | -------------------------------------------------------------------------------- /JobQue/seneca-job-queue/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "seneca-job-queue", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "symmetric-worker.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "node symmetric-worker.js && node worker-web.js && node job-web.js && node worker-need.js", 9 | "symmetric:worker": "node symmetric-worker.js", 10 | "worker:web": "node worker-web.js", 11 | "job:web": "node job-web.js", 12 | "worker:need": "node worker-need.js" 13 | }, 14 | "author": "", 15 | "license": "ISC", 16 | "dependencies": { 17 | "axios": "^0.17.0", 18 | "child_process": "^1.0.2", 19 | "chokidar": "^1.7.0", 20 | "cors": "^2.8.4", 21 | "emailjs": "^2.2.0", 22 | "express": "^4.16.2", 23 | "express-fileupload": "^0.3.0", 24 | "fs": "0.0.1-security", 25 | "lodash": "^4.17.4", 26 | "pino": "^4.9.0", 27 | "request": "^2.83.0", 28 | "request-promise": "^4.2.2", 29 | "rethinkdb": "^2.3.3", 30 | "rethinkdb-job-queue": "^3.1.7", 31 | "rethinkdbdash": "^2.3.31", 32 | "seneca": "^3.4.3", 33 | "seneca-web": "^2.1.0", 34 | "seneca-web-adapter-express": "^1.0.2", 35 | "socket.io": "^2.0.4", 36 | "socket.io-client": "^2.0.4", 37 | "underscore": "^1.8.3", 38 | "vm": "^0.1.0" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /client/static/js/selectValue.js: -------------------------------------------------------------------------------- 1 | var NumberOfOptions_option = $("select").attr('NumberOfOptions'); 2 | var Name_option = $("select").attr('Name'); 3 | var select_html = $("select").html(); 4 | var html2 = ''; 5 | 6 | let arr = [] 7 | let finalHTML; 8 | 9 | // for (var i = NumberOfOptions_option - 1; i >= 0; i--) { 10 | // arr.push('
') 11 | // } 12 | 13 | // for(var i=0;i 0; 28 | }); 29 | 30 | for(var j=0;j { 21 | const service = app.service(path); 22 | if (typeof service.init === 'function') { 23 | promise = promise.then(() => service.init()); 24 | } 25 | }); 26 | // Access the initialization if you want to run queries 27 | // right away that depend on the database and tables being created 28 | this.set('rethinkInit', promise); 29 | promise.then(() => oldSetup.apply(this, args)); 30 | return this; 31 | }; 32 | }; -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/factory/LabelFactory.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * The label factory provides a label entry. For the label text 5 | * it expects either a string provided by the options.labelText 6 | * parameter or it could be generated programmatically using a 7 | * function passed as the options.get parameter. 8 | * 9 | * @param {Object} options 10 | * @param {string} options.id 11 | * @param {string} [options.labelText] 12 | * @param {Function} [options.get] 13 | * @param {Function} [options.showLabel] 14 | * @param {Boolean} [options.divider] adds a divider at the top of the label if true; default: false 15 | */ 16 | var label = function (options) { 17 | return { 18 | id: options.id, 19 | html: '', 23 | get: function (element, node) { 24 | if (typeof options.get === 'function') { 25 | return options.get(element, node); 26 | } 27 | return { label: options.labelText }; 28 | }, 29 | showLabel: function (element, node) { 30 | if (typeof options.showLabel === 'function') { 31 | return options.showLabel(element, node); 32 | } 33 | return true; 34 | } 35 | }; 36 | }; 37 | 38 | module.exports = label; 39 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/element-templates/ElementTemplates.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var values = require('lodash/object').values; 4 | 5 | /** 6 | * The guy knowing all configured element templates. 7 | * 8 | * This registry won't validate. Use the {@link Validator} 9 | * to verify a template is valid prior to adding it to 10 | * this registry. 11 | */ 12 | function ElementTemplates() { 13 | 14 | this._templates = {}; 15 | 16 | /** 17 | * Sets the known element templates. 18 | * 19 | * @param {Array} descriptors 20 | * 21 | * @return {ElementTemplates} 22 | */ 23 | this.set = function (descriptors) { 24 | 25 | var templates = this._templates = {}; 26 | 27 | descriptors.forEach(function (descriptor) { 28 | templates[descriptor.id] = descriptor; 29 | }); 30 | 31 | return this; 32 | }; 33 | 34 | /** 35 | * Get template descriptor with given id. 36 | * 37 | * @param {String} id 38 | * 39 | * @return {TemplateDescriptor} 40 | */ 41 | this.get = function (id) { 42 | return this._templates[id]; 43 | }; 44 | 45 | /** 46 | * Return all known template descriptors. 47 | * 48 | * @return {Array} 49 | */ 50 | this.getAll = function () { 51 | return values(this._templates); 52 | }; 53 | 54 | } 55 | 56 | module.exports = ElementTemplates; 57 | -------------------------------------------------------------------------------- /service/src/middleware/index.js: -------------------------------------------------------------------------------- 1 | const handler = require('@feathersjs/express/errors'); 2 | const notFound = require('feathers-errors/not-found'); 3 | const subscription = require('flowz-subscription'); 4 | const flowzError = require('flowz-error-handler'); 5 | 6 | module.exports = function () { 7 | // Add your custom middleware here. Remember, that 8 | // in Express the order matters 9 | const app = this; // eslint-disable-line no-unused-vars 10 | 11 | app.use(function(req, res, next) { req.feathers.headers= req.headers; next(); }) 12 | 13 | subscription.moduleResource.moduleName = 'workflow'; 14 | let registerAppModule = { 15 | 'flowz': ['create','update', 'patch', 'remove'], 16 | 'finstance': ['create','update', 'remove'], 17 | 'flowzdata': ['update', 'patch'], 18 | 'schema': ['create','update', 'patch', 'remove'], 19 | 'bpmnplugins': ['create','update', 'patch', 'remove'], 20 | 'emailtemplate': ['create','update', 'patch', 'remove'], 21 | 'dflowzdata': ['create','update', 'patch', 'remove'] 22 | }; 23 | 24 | subscription.moduleResource.registerAppModule = registerAppModule; 25 | subscription.moduleResource.appRoles = ['Superadmin', 'Admin', 'Manager', 'Team-Lead','Client', 'CSR']; 26 | subscription.registeredAppModulesRole(); 27 | subscription.registerDynamicHooks(app, registerAppModule); 28 | 29 | app.use(flowzError()); 30 | app.use(notFound()); 31 | app.use(handler()); 32 | }; 33 | -------------------------------------------------------------------------------- /client/build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | var utils = require('./utils') 2 | var webpack = require('webpack') 3 | var config = require('../config') 4 | var merge = require('webpack-merge') 5 | var baseWebpackConfig = require('./webpack.base.conf') 6 | var HtmlWebpackPlugin = require('html-webpack-plugin') 7 | var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 8 | 9 | // add hot-reload related code to entry chunks 10 | Object.keys(baseWebpackConfig.entry).forEach(function (name) { 11 | baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name]) 12 | }) 13 | 14 | module.exports = merge(baseWebpackConfig, { 15 | module: { 16 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap }) 17 | }, 18 | // cheap-module-eval-source-map is faster for development 19 | devtool: '#cheap-module-eval-source-map', 20 | plugins: [ 21 | new webpack.DefinePlugin({ 22 | 'process.env': config.dev.env 23 | }), 24 | new webpack.EnvironmentPlugin(['domainKey']), 25 | // https://github.com/glenjamin/webpack-hot-middleware#installation--usage 26 | new webpack.HotModuleReplacementPlugin(), 27 | new webpack.NoEmitOnErrorsPlugin(), 28 | // https://github.com/ampedandwired/html-webpack-plugin 29 | new HtmlWebpackPlugin({ 30 | filename: 'index.html', 31 | template: 'index.html', 32 | inject: true 33 | }), 34 | new FriendlyErrorsPlugin() 35 | ] 36 | }) 37 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/bpmn/parts/ExecutableProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var is = require('bpmn-js/lib/util/ModelUtil').is, 4 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject; 5 | 6 | var entryFactory = require('../../../factory/EntryFactory'); 7 | 8 | var participantHelper = require('../../../helper/ParticipantHelper'); 9 | 10 | module.exports = function(group, element, translate) { 11 | 12 | var bo = getBusinessObject(element); 13 | 14 | if (!bo) { 15 | return; 16 | } 17 | 18 | if (is(element, 'bpmn:Process') || (is(element, 'bpmn:Participant') && bo.get('processRef'))) { 19 | 20 | // var executableEntry = entryFactory.checkbox({ 21 | // id: 'process-is-executable', 22 | // label: translate('Executable'), 23 | // modelProperty: 'isExecutable' 24 | // }); 25 | 26 | // // in participants we have to change the default behavior of set and get 27 | // if (is(element, 'bpmn:Participant')) { 28 | // executableEntry.get = function(element) { 29 | // return participantHelper.getProcessBusinessObject(element, 'isExecutable'); 30 | // }; 31 | 32 | // executableEntry.set = function(element, values) { 33 | // return participantHelper.modifyProcessBusinessObject(element, 'isExecutable', values); 34 | // }; 35 | // } 36 | 37 | // group.entries.push(executableEntry); 38 | } 39 | 40 | }; 41 | -------------------------------------------------------------------------------- /service/test/app.test.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert'); 2 | const rp = require('request-promise'); 3 | const app = require('../src/app'); 4 | 5 | describe('Feathers application tests', () => { 6 | before(function(done) { 7 | this.server = app.listen(3030); 8 | this.server.once('listening', () => done()); 9 | }); 10 | 11 | after(function(done) { 12 | this.server.close(done); 13 | }); 14 | 15 | it('starts and shows the index page', () => { 16 | return rp('http://localhost:3030').then(body => 17 | assert.ok(body.indexOf('') !== -1) 18 | ); 19 | }); 20 | 21 | describe('404', function() { 22 | it('shows a 404 HTML page', () => { 23 | return rp({ 24 | url: 'http://localhost:3030/path/to/nowhere', 25 | headers: { 26 | 'Accept': 'text/html' 27 | } 28 | }).catch(res => { 29 | assert.equal(res.statusCode, 404); 30 | assert.ok(res.error.indexOf('') !== -1); 31 | }); 32 | }); 33 | 34 | it('shows a 404 JSON error without stack trace', () => { 35 | return rp({ 36 | url: 'http://localhost:3030/path/to/nowhere', 37 | json: true 38 | }).catch(res => { 39 | assert.equal(res.statusCode, 404); 40 | assert.equal(res.error.code, 404); 41 | assert.equal(res.error.message, 'Page not found'); 42 | assert.equal(res.error.name, 'NotFound'); 43 | }); 44 | }); 45 | }); 46 | }); 47 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/ExternalTaskConfigurationProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var is = require('bpmn-js/lib/util/ModelUtil').is, 4 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject; 5 | 6 | var ImplementationTypeHelper = require('../../../helper/ImplementationTypeHelper'); 7 | 8 | var externalTaskPriority = require('./implementation/ExternalTaskPriority'); 9 | 10 | function getServiceTaskLikeBusinessObject(element) { 11 | var bo = ImplementationTypeHelper.getServiceTaskLikeBusinessObject(element); 12 | 13 | // if the element is not a serviceTaskLike element, fetch the normal business object 14 | // This avoids the loss of the process / participant business object 15 | if (!bo) { 16 | bo = getBusinessObject(element); 17 | } 18 | 19 | return bo; 20 | } 21 | 22 | module.exports = function(group, element, bpmnFactory, translate) { 23 | 24 | var bo = getServiceTaskLikeBusinessObject(element); 25 | 26 | if (!bo) { 27 | return; 28 | } 29 | 30 | if (is(bo, 'camunda:TaskPriorized') || (is(bo, 'bpmn:Participant')) && bo.get('processRef')) { 31 | group.entries = group.entries.concat(externalTaskPriority(element, bpmnFactory, { 32 | getBusinessObject: function(element) { 33 | if (!is(bo, 'bpmn:Participant')) { 34 | return bo; 35 | } 36 | return bo.get('processRef'); 37 | } 38 | }, translate)); 39 | } 40 | }; -------------------------------------------------------------------------------- /client/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM whiledo/letsencrypt-apache-ubuntu 2 | 3 | ARG accesskey 4 | ARG secretkey 5 | ARG domainKey 6 | 7 | #FROM ubuntu:16.04 8 | 9 | # install dependencies 10 | RUN apt-get update \ 11 | && apt-get install -y --no-install-recommends \ 12 | apache2 \ 13 | && rm -r /var/lib/apt/lists/* 14 | 15 | # Default command 16 | CMD ["apachectl", "-D", "FOREGROUND"] 17 | 18 | # Install Node.js 19 | RUN apt-get update \ 20 | && apt-get install --yes curl 21 | RUN curl --silent --location https://deb.nodesource.com/setup_8.x | bash - 22 | RUN apt-get install --yes nodejs 23 | RUN apt-get install --yes build-essential 24 | 25 | #create directory html 26 | RUN mkdir /var/www/html/dist 27 | RUN mkdir -p /opt/app 28 | 29 | # ssl certificate add 30 | ADD cert /etc/ssl/cert 31 | ADD privkey /etc/ssl/privkey 32 | 33 | #working directory 34 | WORKDIR /opt/app 35 | ADD . /opt/app 36 | RUN npm install 37 | 38 | #build application 39 | RUN npm run build 40 | RUN cp -a -f /opt/app/dist/* /var/www/html/ 41 | RUN cp /opt/app/.htaccess /var/www/html/ 42 | RUN cp /opt/app/vhost_ssl_master.conf /etc/apache2/sites-enabled/ 43 | RUN cp /opt/app/vhost_ssl_develop.conf /etc/apache2/sites-enabled/ 44 | RUN cp /opt/app/vhost_ssl_qa.conf /etc/apache2/sites-enabled/ 45 | RUN cp /opt/app/vhost_ssl_staging.conf /etc/apache2/sites-enabled/ 46 | RUN rm -rf /opt/app/* 47 | RUN a2enmod rewrite 48 | RUN a2enmod ssl 49 | RUN service apache2 restart 50 | 51 | 52 | # Ports 53 | EXPOSE 80 443 54 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/implementation/External.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../../factory/EntryFactory'), 4 | cmdHelper = require('../../../../helper/CmdHelper'); 5 | 6 | module.exports = function(element, bpmnFactory, options, translate) { 7 | 8 | var getImplementationType = options.getImplementationType, 9 | getBusinessObject = options.getBusinessObject; 10 | 11 | function isExternal(element) { 12 | return getImplementationType(element) === 'external'; 13 | } 14 | 15 | var topicEntry = entryFactory.textField({ 16 | id: 'externalTopic', 17 | label: translate('Topic'), 18 | modelProperty: 'externalTopic', 19 | 20 | get: function(element, node) { 21 | var bo = getBusinessObject(element); 22 | return { externalTopic: bo.get('camunda:topic') }; 23 | }, 24 | 25 | set: function(element, values, node) { 26 | var bo = getBusinessObject(element); 27 | return cmdHelper.updateBusinessObject(element, bo, { 28 | 'camunda:topic': values.externalTopic 29 | }); 30 | }, 31 | 32 | validate: function(element, values, node) { 33 | return isExternal(element) && !values.externalTopic ? { externalTopic: 'Must provide a value' } : {}; 34 | }, 35 | 36 | hidden: function(element, node) { 37 | return !isExternal(element); 38 | } 39 | 40 | }); 41 | 42 | return [ topicEntry ]; 43 | 44 | }; 45 | -------------------------------------------------------------------------------- /JobQue/seneca-job-queue/job-web.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | var seneca = require('seneca')({log: 'silent'}) 4 | const Web = require('seneca-web') 5 | const cors = require('cors') 6 | const webconfig = require('./config') 7 | var app = require('express')() 8 | const pino = require('pino') 9 | 10 | const pluginCreate = webconfig.plugins.createPattern 11 | const pluginFind = webconfig.plugins.findPattern 12 | const pluginUpdate = webconfig.plugins.updatePattern 13 | const PINO = webconfig.pino 14 | const webPort = webconfig.web_option.port 15 | const urlPrefix = webconfig.web_option.urlPrefix 16 | 17 | var Routes = [ 18 | { 19 | prefix: urlPrefix, 20 | pin: pluginCreate, 21 | map: { 22 | create: {GET: false, POST: true} 23 | } 24 | }, 25 | { 26 | prefix: urlPrefix, 27 | pin: pluginUpdate, 28 | map: { 29 | update: {GET: false, POST: true} 30 | } 31 | }, 32 | { 33 | prefix: urlPrefix, 34 | pin: pluginFind, 35 | map: { 36 | find: {GET: false, POST: true} 37 | } 38 | } 39 | ] 40 | 41 | app.use(cors()) 42 | 43 | var config = { 44 | routes: Routes, 45 | adapter: require('seneca-web-adapter-express'), 46 | context: app, 47 | options: {parseBody: true} 48 | } 49 | 50 | seneca.client() 51 | .use(Web, config) 52 | .use('job') 53 | .ready(() => { 54 | var server = seneca.export('web/context')() 55 | server.listen(webPort, () => { 56 | pino(PINO).info('server started on:', webPort) 57 | }) 58 | }) 59 | -------------------------------------------------------------------------------- /service/src/services/schema/schema.hooks.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | before: { 3 | all: [], 4 | find: [ 5 | hook => beforeFind(hook) 6 | ], 7 | get: [], 8 | create: [ 9 | hook => beforeCreate(hook) 10 | ], 11 | update: [], 12 | patch: [], 13 | remove: [] 14 | }, 15 | 16 | after: { 17 | all: [], 18 | find: [], 19 | get: [], 20 | create: [], 21 | update: [], 22 | patch: [], 23 | remove: [] 24 | }, 25 | 26 | error: { 27 | all: [], 28 | find: [], 29 | get: [], 30 | create: [], 31 | update: [], 32 | patch: [], 33 | remove: [] 34 | } 35 | }; 36 | 37 | 38 | let beforeFind = function (hook) { 39 | const query = hook.params.query 40 | if (query.isdeleted != undefined) { 41 | if (hook.params.query.isdeleted == 'true') { 42 | hook.params.query.isdeleted = true 43 | } else if (hook.params.query.isdeleted == 'false') { 44 | hook.params.query.isdeleted = false 45 | } 46 | } 47 | // if (hook.params.query && hook.params.query.isdeleted) { 48 | // hook.params.query.isdeleted = !!hook.params.query.isdeleted; 49 | // } 50 | 51 | if (hook.params.query && hook.params.query.$paginate) { 52 | hook.params.paginate = hook.params.query.$paginate === 'false' || hook.params.query.$paginate === false; 53 | delete hook.params.query.$paginate; 54 | } 55 | } 56 | 57 | let beforeCreate = function (hook) { 58 | hook.data.createdAt = new Date().toISOString() 59 | } -------------------------------------------------------------------------------- /JobQue/scheduler/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "rethinkdb": { 3 | "host": "47.254.27.134", 4 | "port": 28015, 5 | "db": "FlowzEngine" 6 | }, 7 | "qOptions": { 8 | "name": "scheduler", 9 | "masterInterval": 60000, 10 | "changeFeed": true, 11 | "concurrency": 1, 12 | "removeFinishedJobs": false 13 | }, 14 | "flowz_table": "flowzinstance", 15 | "scheduler_table": "scheduler", 16 | "system_logs_table": "system_logs", 17 | "qJobTimeout": 3600000, 18 | "qJobRetryMax": 5, 19 | "chokidar": { 20 | "persistent": true, 21 | "ignoreInitial": false, 22 | "followSymlinks": true, 23 | "cwd": ".", 24 | "disableGlobbing": false, 25 | "usePolling": true, 26 | "interval": 100, 27 | "binaryInterval": 300, 28 | "alwaysStat": false, 29 | "depth": 99, 30 | "awaitWriteFinish": { 31 | "stabilityThreshold": 2000, 32 | "pollInterval": 100 33 | }, 34 | "ignorePermissionErrors": false, 35 | "atomic": true 36 | }, 37 | "pinoDB": { 38 | "timestamp": "pino.stdTimeFunctions.slowTime" 39 | }, 40 | "pinoConsole": { 41 | "timestamp": false, 42 | "prettyPrint": { 43 | "forceColor": true 44 | } 45 | }, 46 | "service": { 47 | "find": "/job/find/", 48 | "update": "/job/update/", 49 | "create": "/job/create/", 50 | "job_module": "/job-module/" 51 | }, 52 | "serviceURL": "http://localhost:4002", 53 | "jobURL": "http://localhost:4001", 54 | "cache_size": 20, 55 | "runtime_process_table": "runtime_process" 56 | } 57 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/VersionTagProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../factory/EntryFactory'), 4 | cmdHelper = require('../../../helper/CmdHelper'), 5 | is = require('bpmn-js/lib/util/ModelUtil').is, 6 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject; 7 | 8 | module.exports = function(group, element, translate) { 9 | 10 | var bo = getBusinessObject(element); 11 | 12 | if (!bo) { 13 | return; 14 | } 15 | 16 | if (is(element, 'bpmn:Process') || is(element, 'bpmn:Participant') && bo.get('processRef')) { 17 | var versionTagEntry = entryFactory.textField({ 18 | id: 'versionTag', 19 | label: translate('Version Tag'), 20 | modelProperty: 'versionTag' 21 | }); 22 | 23 | // in participants we have to change the default behavior of set and get 24 | if (is(element, 'bpmn:Participant')) { 25 | versionTagEntry.get = function(element) { 26 | var processBo = bo.get('processRef'); 27 | 28 | return { 29 | versionTag: processBo.get('camunda:versionTag') 30 | }; 31 | }; 32 | 33 | versionTagEntry.set = function(element, values) { 34 | var processBo = bo.get('processRef'); 35 | 36 | return cmdHelper.updateBusinessObject(element, processBo, { 37 | 'camunda:versionTag': values.versionTag || undefined 38 | }); 39 | }; 40 | } 41 | 42 | group.entries.push(versionTagEntry); 43 | 44 | } 45 | }; 46 | -------------------------------------------------------------------------------- /service/README.md: -------------------------------------------------------------------------------- 1 | # service 2 | 3 | > 4 | 5 | ## About 6 | 7 | This project uses [Feathers](http://feathersjs.com). An open source web framework for building modern real-time applications. 8 | 9 | ## Getting Started 10 | 11 | Getting up and running is as easy as 1, 2, 3. 12 | 13 | 1. Make sure you have [NodeJS](https://nodejs.org/) and [npm](https://www.npmjs.com/) installed. 14 | 2. Install your dependencies 15 | 16 | ``` 17 | cd path/to/service; npm install 18 | ``` 19 | 20 | 3. Start your app 21 | 22 | ``` 23 | npm start 24 | ``` 25 | 26 | ## Testing 27 | 28 | Simply run `npm test` and all your tests in the `test/` directory will be run. 29 | 30 | ## Scaffolding 31 | 32 | Feathers has a powerful command line interface. Here are a few things it can do: 33 | 34 | ``` 35 | $ npm install -g feathers-cli # Install Feathers CLI 36 | 37 | $ feathers generate service # Generate a new Service 38 | $ feathers generate hook # Generate a new Hook 39 | $ feathers generate model # Generate a new Model 40 | $ feathers help # Show all commands 41 | ``` 42 | 43 | ## Help 44 | 45 | For more information on all the things you can do with Feathers visit [docs.feathersjs.com](http://docs.feathersjs.com). 46 | 47 | ## Changelog 48 | 49 | __0.1.0__ 50 | 51 | - Initial release 52 | 53 | ## License 54 | 55 | Copyright (c) 2016 56 | 57 | Licensed under the [MIT license](LICENSE). 58 | 59 | SET RDB_HOST=localhost && set RDB_PORT=28015 && npm start 60 | -------------------------------------------------------------------------------- /client/src/pages/flow/viewSVG.vue: -------------------------------------------------------------------------------- 1 | 6 | 14 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/factory/LinkEntryFactory.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('../Utils'); 4 | 5 | var entryFieldDescription = require('./EntryFieldDescription'); 6 | 7 | var link = function(options, defaultParameters) { 8 | 9 | var id = options.id, 10 | label = options.label || id, 11 | hideLink = options.hideLink, 12 | canBeHidden = typeof hideLink === 'function', 13 | getClickableElement = options.getClickableElement, 14 | description = options.description; 15 | 16 | var resource = { id: id }; 17 | 18 | resource.html = 19 | '' + label + ''; 23 | 24 | // add description below link entry field 25 | if (description) { 26 | resource.html += entryFieldDescription(description); 27 | } 28 | 29 | resource.linkSelected = function(element, node, event, scopeNode) { 30 | if (typeof getClickableElement === 'function') { 31 | 32 | var link = getClickableElement.apply(resource, [ element, node, event, scopeNode ]); 33 | link && utils.triggerClickEvent(link); 34 | } 35 | 36 | return false; 37 | }; 38 | 39 | if (canBeHidden) { 40 | resource.hideLink = function() { 41 | return !hideLink.apply(resource, arguments); 42 | }; 43 | } 44 | 45 | return resource; 46 | }; 47 | 48 | module.exports = link; 49 | -------------------------------------------------------------------------------- /client/src/pages/flow/own_assign.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 59 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/helper/MyConfigsHelper.js: -------------------------------------------------------------------------------- 1 | var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject 2 | var getExtensionElements = require('./ExtensionElementsHelper').getExtensionElements 3 | 4 | var myConfigsHelper = {} 5 | module.exports = myConfigsHelper 6 | 7 | /** 8 | * Return form data from business object or undefined if none exist 9 | * 10 | * @param {djs.model.Base} element 11 | * 12 | * @return {ModdleElement|undefined} MyInputs 13 | */ 14 | myConfigsHelper.getMyConfigs = (element) => { 15 | var bo = getBusinessObject(element) 16 | var myConfigs = getExtensionElements(bo, 'camunda:MyConfigurations') 17 | 18 | if (typeof myConfigs !== 'undefined') { 19 | return myConfigs[0] 20 | } 21 | } 22 | 23 | /** 24 | * Return all form fields existing in the business object, and 25 | * an empty array if none exist. 26 | * 27 | * @param {djs.model.Base} element 28 | * 29 | * @return {Array} a list of form field objects 30 | */ 31 | myConfigsHelper.getConfigFields = function (element) { 32 | var myConfigs = this.getMyConfigs(element) 33 | 34 | if (typeof myConfigs === 'undefined') { 35 | return [] 36 | } 37 | return myConfigs.fields 38 | } 39 | 40 | /** 41 | * Get a form field from the business object at given index 42 | * 43 | * @param {djs.model.Base} element 44 | * @param {number} idx 45 | * 46 | * @return {ModdleElement} the form field 47 | */ 48 | myConfigsHelper.getConfigField = function (element, idx) { 49 | var configFields = this.getConfigFields(element) 50 | return configFields[idx] 51 | } 52 | -------------------------------------------------------------------------------- /service/src/services/dataquery/dataquery.service.js: -------------------------------------------------------------------------------- 1 | // // Initializes the `dataquery` service on path `/dataquery` 2 | // const createService = require('./dataquery.class.js'); 3 | // const hooks = require('./dataquery.hooks'); 4 | // const filters = require('./dataquery.filters'); 5 | 6 | // module.exports = function () { 7 | // const app = this; 8 | // const paginate = app.get('paginate'); 9 | 10 | // const options = { 11 | // name: 'dataquery', 12 | // paginate 13 | // }; 14 | 15 | // // Initialize our service with any options it requires 16 | // app.use('/dataquery', createService(options)); 17 | 18 | // // Get our initialized service so that we can register hooks and filters 19 | // const service = app.service('dataquery'); 20 | 21 | // service.hooks(hooks); 22 | 23 | // if (service.filter) { 24 | // service.filter(filters); 25 | // } 26 | // }; 27 | 28 | // Initializes the `databases` service on path `/databases` 29 | const createService = require('feathers-rethinkdb'); 30 | const hooks = require('./dataquery.hooks'); 31 | 32 | module.exports = function () { 33 | const app = this; 34 | const Model = app.get('rethinkdbClient'); 35 | const paginate = app.get('paginate'); 36 | 37 | const options = { 38 | name: 'dataquery', 39 | Model, 40 | paginate 41 | }; 42 | 43 | // Initialize our service with any options it requires 44 | app.use('/dataquery', createService(options)); 45 | 46 | // Get our initialized service so that we can register hooks and filters 47 | const service = app.service('dataquery'); 48 | 49 | service.hooks(hooks); 50 | }; 51 | -------------------------------------------------------------------------------- /client/config/index.js: -------------------------------------------------------------------------------- 1 | // see http://vuejs-templates.github.io/webpack for documentation. 2 | var path = require('path') 3 | 4 | module.exports = { 5 | build: { 6 | env: require('./prod.env'), 7 | index: path.resolve(__dirname, '../dist/index.html'), 8 | assetsRoot: path.resolve(__dirname, '../dist'), 9 | assetsSubDirectory: 'static', 10 | bpmnPluginSubDirectory: 'bpmnPlugin', 11 | assetsPublicPath: '/', 12 | productionSourceMap: true, 13 | // Gzip off by default as many popular static hosts such as 14 | // Surge or Netlify already gzip all static assets for you. 15 | // Before setting to `true`, make sure to: 16 | // npm install --save-dev compression-webpack-plugin 17 | productionGzip: false, 18 | productionGzipExtensions: ['js', 'css'], 19 | // Run the build command with an extra argument to 20 | // View the bundle analyzer report after build finishes: 21 | // `npm run build --report` 22 | // Set to `true` or `false` to always turn it on or off 23 | bundleAnalyzerReport: process.env.npm_config_report 24 | }, 25 | dev: { 26 | env: require('./dev.env'), 27 | port: 8000, 28 | autoOpenBrowser: true, 29 | assetsSubDirectory: 'static', 30 | assetsPublicPath: '/', 31 | proxyTable: {}, 32 | // CSS Sourcemaps off by default because relative paths are "buggy" 33 | // with this option, according to the CSS-Loader README 34 | // (https://github.com/webpack/css-loader#sourcemaps) 35 | // In our experience, they generally work as expected, 36 | // just be aware of this issue when enabling this option. 37 | cssSourceMap: false 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/styles/_mixins.less: -------------------------------------------------------------------------------- 1 | .invalid() { 2 | border-color: @bpp-color-error; 3 | background: @bpp-color-error-bg; 4 | } 5 | 6 | .focus() { 7 | // outline-color: @bpp-color-primary; 8 | outline: none; 9 | border-color: @bpp-color-primary; 10 | box-shadow: 0 0 1px 2px fade(@bpp-color-primary, 20%); 11 | } 12 | 13 | 14 | .icon-font() { 15 | font-family: "bpmn-js-pp"; 16 | font-style: normal; 17 | font-weight: normal; 18 | speak: none; 19 | 20 | display: inline-block; 21 | text-decoration: inherit; 22 | text-align: center; 23 | font-variant: normal; 24 | text-transform: none; 25 | line-height: 1em; 26 | -webkit-font-smoothing: antialiased; 27 | -moz-osx-font-smoothing: grayscale; 28 | } 29 | 30 | .overlay() { 31 | background-color: @bpp-color-gray-lighter; 32 | } 33 | 34 | .action-button() { 35 | position: absolute; 36 | top: 0; 37 | height: 23px; 38 | width: 24px; 39 | overflow: hidden; 40 | cursor: pointer; 41 | background-color: @bpp-color-gray-lighter; 42 | border: 1px solid @bpp-color-gray-light; 43 | 44 | > span { 45 | display: none; 46 | } 47 | 48 | &:before { 49 | .icon-font(); 50 | position: relative; 51 | } 52 | 53 | &.add:before { 54 | content: '\E803'; 55 | } 56 | 57 | &.clear:before { 58 | content: '\E802'; 59 | } 60 | 61 | &:hover { 62 | color: @bpp-color-primary; 63 | } 64 | } 65 | 66 | .label() { 67 | font-weight: bolder; 68 | display: inline-block; 69 | vertical-align: middle; 70 | color: @bpp-color-gray; 71 | &[for] { 72 | cursor: pointer; 73 | } 74 | &.bpp-hidden { display: none; } 75 | } 76 | -------------------------------------------------------------------------------- /JobQue/scheduler/process.js: -------------------------------------------------------------------------------- 1 | const vm = require('vm') 2 | const rp = require('request-promise') 3 | const pino = require('pino') 4 | const config = require('./default.json') 5 | const { exec, fork } = require('child_process') 6 | const PINO = config.pinoConsole 7 | 8 | global.options = [] 9 | for (var i = 4; i < process.argv.length; i++) { 10 | options.push(process.argv[i]) 11 | } 12 | const PROCESS_URL = process.argv[3] 13 | 14 | async function getProcess(jobType) { 15 | return new Promise((resolve, reject) => { 16 | rp(PROCESS_URL + jobType) 17 | .then(function (jobProcessCode) { 18 | resolve(jobProcessCode) 19 | }) 20 | .catch(function (err) { 21 | reject(err) 22 | }) 23 | }) 24 | } 25 | 26 | let executeProcess = async function (jobType) { 27 | try { 28 | let processCode = await getProcess(jobType) 29 | const script = new vm.Script(`(function(require) {` + processCode + `})`, { filename: 'processTrace.vm' }) 30 | script.runInThisContext()(require) 31 | pino(PINO).info({ Process: jobType, fId: process.argv[6], pId: process.pid }, 'process created') 32 | } catch (e) { 33 | let file = __filename; 34 | pino(PINO).error(e.message) 35 | let error = e.message.split("'"); 36 | error[0] = error[0].slice(0, -1); 37 | if (error[0] === 'Cannot find module') { 38 | exec('cd ../scheduler && npm i ' + error[1], (error, stdout, stderr) => { 39 | console.log(`${stdout}`); 40 | process.argv.splice(0, 2); 41 | fork(`${file}`, process.argv) 42 | }) 43 | } else { 44 | pino(PINO).error('unable to load child worker', jobType) 45 | } 46 | } 47 | } 48 | 49 | executeProcess(process.argv[2]) 50 | -------------------------------------------------------------------------------- /client/src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /client/src/masterLayout/Master.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 52 | 55 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/styles/groups.less: -------------------------------------------------------------------------------- 1 | .bpp-properties-group { 2 | padding: 6px 15px 6px 15px; 3 | position: relative; 4 | max-height: 2000px; 5 | overflow: hidden; 6 | transition: max-height 0.218s ease-in-out, 7 | padding-top 0.218s ease-in-out, 8 | padding-bottom 0.218s ease-in-out; 9 | 10 | &:empty { 11 | display: none; 12 | } 13 | 14 | > .group-toggle { 15 | position: absolute; 16 | top: 0; 17 | left: 0; 18 | bottom: 0; 19 | width: 4px; 20 | cursor: pointer; 21 | transition: background-color 0.218s linear; 22 | &:hover { 23 | background-color: @bpp-color-toggle; 24 | } 25 | } 26 | 27 | > .group-label { 28 | .label(); 29 | font-size: 120%; 30 | margin-top: 5px; 31 | margin-bottom: 10px; 32 | transition: margin 0.218s linear; 33 | font-style: italic; 34 | } 35 | 36 | &:hover > .group-toggle { 37 | background-color: @bpp-color-gray-light; 38 | &:hover { 39 | background-color: @bpp-color-toggle; 40 | } 41 | } 42 | 43 | &.group-closed { 44 | max-height: 20px; 45 | border-top: none; 46 | cursor: pointer; 47 | background-color: fade(@bpp-color-toggle, 20%); 48 | padding-top: 0; 49 | padding-bottom: 0; 50 | 51 | > div { 52 | visibility: hidden; 53 | } 54 | 55 | > .group-label { 56 | margin-top: 2px; 57 | margin-bottom: 2px; 58 | } 59 | 60 | &:hover > .group-label { 61 | color: @bpp-color-primary; 62 | } 63 | } 64 | 65 | + .bpp-properties-group { 66 | border-top: 1px dotted @bpp-color-gray-light; 67 | } 68 | 69 | &:last-child { 70 | padding-bottom: 9px; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/element-templates/cmd/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var ChangeElementTemplateHandler = require('./ChangeElementTemplateHandler'); 4 | 5 | var getTemplate = require('../Helper').getTemplate, 6 | getDefaultTemplate = require('../Helper').getDefaultTemplate; 7 | 8 | function registerHandlers(commandStack, elementTemplates, eventBus, elementRegistry) { 9 | commandStack.registerHandler( 10 | 'propertiesPanel.camunda.changeTemplate', 11 | ChangeElementTemplateHandler 12 | ); 13 | 14 | // apply default element templates on shape creation 15 | eventBus.on([ 'commandStack.shape.create.postExecuted' ], function(context) { 16 | applyDefaultTemplate(context.context.shape, elementTemplates, commandStack); 17 | }); 18 | 19 | // apply default element templates on connection creation 20 | eventBus.on([ 'commandStack.connection.create.postExecuted' ], function(context) { 21 | applyDefaultTemplate(context.context.connection, elementTemplates, commandStack); 22 | }); 23 | } 24 | 25 | registerHandlers.$inject = [ 'commandStack', 'elementTemplates', 'eventBus', 'elementRegistry' ]; 26 | 27 | 28 | module.exports = { 29 | __init__: [ registerHandlers ] 30 | }; 31 | 32 | 33 | function applyDefaultTemplate(element, elementTemplates, commandStack) { 34 | 35 | if (!getTemplate(element, elementTemplates) 36 | && getDefaultTemplate(element, elementTemplates)) { 37 | 38 | var command = 'propertiesPanel.camunda.changeTemplate'; 39 | var commandContext = { 40 | element: element, 41 | newTemplate: getDefaultTemplate(element, elementTemplates) 42 | }; 43 | 44 | commandStack.execute(command, commandContext); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/implementation/ResultVariable.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var is = require('bpmn-js/lib/util/ModelUtil').is; 4 | 5 | var assign = require('lodash/object').assign; 6 | 7 | var entryFactory = require('../../../../factory/EntryFactory'), 8 | cmdHelper = require('../../../../helper/CmdHelper'); 9 | 10 | module.exports = function (element, bpmnFactory, options, translate) { 11 | 12 | var getBusinessObject = options.getBusinessObject, 13 | hideResultVariable = options.hideResultVariable, 14 | id = options.id || 'resultVariable'; 15 | 16 | 17 | var resultVariableEntry = entryFactory.textField({ 18 | id: id, 19 | label: translate('Result Variable'), 20 | modelProperty: 'resultVariable', 21 | 22 | get: function (element, node) { 23 | var bo = getBusinessObject(element); 24 | return { resultVariable: bo.get('camunda:resultVariable') }; 25 | }, 26 | 27 | set: function (element, values, node) { 28 | var bo = getBusinessObject(element); 29 | 30 | var resultVariable = values.resultVariable || undefined; 31 | 32 | var props = { 33 | 'camunda:resultVariable': resultVariable 34 | }; 35 | 36 | if (is(bo, 'camunda:DmnCapable') && !resultVariable) { 37 | props = assign({ 'camunda:mapDecisionResult': 'resultList' }, props); 38 | } 39 | 40 | return cmdHelper.updateBusinessObject(element, bo, props); 41 | }, 42 | 43 | hidden: function (element, node) { 44 | if (typeof hideResultVariable === 'function') { 45 | return hideResultVariable.apply(resultVariableEntry, arguments); 46 | } 47 | } 48 | 49 | }); 50 | 51 | return [resultVariableEntry]; 52 | 53 | }; 54 | -------------------------------------------------------------------------------- /client/privkey/privkey_staging.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEowIBAAKCAQEAvZTC3289jxPguEBkDMZfBm5rjpycXvjzy4fkmt9ihPlXulCK 3 | lMXBQmgkJHFR7w79eGL5luPmFfaCJfFpgLRLYwakKrqOiZ7U/W8wwGd/MVWZFnCg 4 | CAkd2M27Zzg3/qhWAxwWWotxsqygBwPvd0pQ5yC5xN2LuUwE6wYLxrgt2FgGbnby 5 | jG27rdcwHrQRCqKG19LaHxkGhAqsAgu3vAZYdUmlaZ4Brem/5tI82Coli1KVqOYB 6 | jF6FOs5ALxnUh2Va2ZFIWCii0u7QUKMoUzgDKalGsvofcajO4y8PD0jZ6amGacE8 7 | E5MAUOHSdnnFH0ROUn9ABcl7PguanDMt9tCGCQIDAQABAoIBAB5Q25i/QSjQFO9h 8 | 3J3uWuO8ZJa5lIfbZ6D0aioZ7rc06EJy/rYrqWvlG2J4fJGt4/qMWT031GNOuCE5 9 | KZXbPvLm7PmoO4LmU0jzrugVpNFOztw3xl+ClbNFsuIeq1WdtaNpqmlwQw4/bJey 10 | mWiKCcXsBcjlZKKM9XxfyyJL8YjWxDWe4ueUkZLyUM2Eo4jdL0otoF05CHNbcqAP 11 | aFyqAqGVKQaKFJNhfZBXUgSK/XF5DUeAvqTc196C/bXW4kBwgrPuqJNY36y0a2En 12 | rgjtb17pnQ/TYruNOw60WDb7sTeFQVUqhLHu+4nWgK7QuaVVp9SFdglmXTCp2kvX 13 | zm3+DwECgYEA4ero6cyOZzPoq0kfLg+Be8o3GsJoEIz+YNXQ2sRtiOlpTpT9rjnU 14 | KfXUXw/n5I2CoIyVbim/erNwtHhKUXFvrJ9KSJmQX+/v/crNjgjYMv0YltN95t8D 15 | 4OscnOMplm2upzmn/GWD1UizGn5DEASIb552ZMOVRjF+VYwZADrZcz0CgYEA1tM1 16 | 4xIoMYILWXSFOjMAZ4CXMNTXH9+AniP4/xDxjG37cFcXQrWY4oBPfoS3dQ890Fut 17 | 1hT0UvKUvxbYTcCwbNlQ2vTi1nzi4BDmCao9m3/8RClXz3aBM6NGQjaUULHB+9r/ 18 | NmLtnh087DZSpCZ54yUNrfLzjsU/OZbj/ej/Wr0CgYBIX5v8AkcActWvwb4WYGtH 19 | v/FFRlBWNQTs+rJs0w6QFM5imUJnhSkdxB4j0hGk21ykmETqxL8NzNxnRD3yt1di 20 | QqlmdqOUyGXmtQiC3vx74S72aoxj4L/6VveUnwVcpoiUE9ln9xFzy1VtQFO1lu4q 21 | a+Zbw3hXw1VIjJgZxcCRtQKBgHiVuDLMt1kK6Tn+aOZBSKHQkY1se5C9kWGzSYpL 22 | RXsRJUlq6XidnMLPSU/4SU5hDs6NF6gKvRZuakZVGXeTiLSgy30MZuQE2Aj0E1wr 23 | fkdx8PWFy2990opcxQxXvKsLDJtF02oA3+aX/OGOoJbZriNtYh9ZN5PVbmbyJuoY 24 | xnV1AoGBAKgbssqI6tIN+y8p/9fuGWJfxmNZbPbXpXEcrz6HcWa9TckAT8Gh94wp 25 | lxbFmr1slKCqINCjDYy/jr6Z2GSD0kHxGhinLJlsC3bDEz0t7jDnLoei9wBqTNv0 26 | SLDyzGB0uPeY1e1opyAX6u1ZyTuDFm4t7Ja5Oh0U1xqZvH/SINaj 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /client/privkey/privkey_master.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC7RP+6cpX6wvqQ 3 | gLtbkXA3qO9bCncdcR5rJFVDWjUQf5lhhW69Wi+B29YuknqnSFz5vYIp4jdEjifu 4 | emcBi8YoxrnJM8DBejDAsSRinWsOFfu1Bu6/Y+Ei/LArN9Im2IvXiqZEY2k3jvTT 5 | cX8/eqLa27S4yn/j1Ti1coTMzAmoT+HTBatZje1uY+dZp60Mz2fAoTiH85J8RsVc 6 | 0eJNp09CV01zsJAGRpuPTKFR2hrR4NQBAF8dhfR8iW/HqULVdjtCJ2s5iGxUUwtX 7 | DGTHQsjyFGoLNSdTTbC5f+8eQm0JxIpv8xS8m3lmSekwHrIyJG0tQ0OgfMhoigPu 8 | NDo/1boTAgMBAAECggEAFSDJwV1gMnSBFICRotkb0gvLRXg+zCGRDwGAZSLuTbg3 9 | s9r8DXz5UytcVNDN6cWuR7br0pHlLmTjeHJy4KfGaZ9SIrMmEi4ZBgR2WHHuPB6a 10 | 0WfA0/MO2YWs0pNvsFZKIL1R2PFmU5BbauepNZ4+dXbIQvkFyMyroz0SYpC6njSD 11 | YX1sTKAyHpOgfIgy8Zgu270/5GFti4tUVha5Nav9dgk8SdAJpPJ+jDwrF+XIJIky 12 | t7XErZK0Ot44EDjnoMuDO3hVPekbt2/aSYxR+C1Cck/DXLLkg9JbKWMFKdPgcV+v 13 | KpREitFcviTHzXdVbk9L2XTGpphePmqVY1bshsUvoQKBgQDxCAFUkvW9OIRX1rFv 14 | +h2TOm1Ga7nGNNOX6fMEizv9TE5TrtgCTN6pbQcLPvXoFGcCkv02QmhSp6xaI0Wm 15 | Qf+Hmy0ReoBytPmLrXqCxkHS5RK5rHxiHFQwdvSX2VjsjVjJoCKAhah65EIq3Zwp 16 | HW4tVe/HtRSDgc3bnWNL4nN1iQKBgQDG5kWTS2PQI/KQ9dDu+LBKhV5EdKz0nY+S 17 | f2/AdHoHuqrt5EWiQYmd1kju6cxyFq/JOjMz0cn9mKyC5WCAMiJt41/6Yw+smk9C 18 | ihyHWDXXzjGeNjRUzgmrnc2orB7zLqdsh/UrwU3/bNuRGLhO26DqkvWVbHIA8ckc 19 | 9k07Kx8nuwKBgEaIWytOng6zPTcfImlsPb9Zt6SF3aU8zDaGRZEs1W84Jyuh3KA/ 20 | smDOAOOvlvJFFifQr7xzDmgxnOP7smQGqCocpMGaoX/vqZ7QMyuVrKl0U1h2OyfS 21 | tmhARy8wcS835aWK8M2/TyA3L42vsATwEc++eB5uxQP+tijwE6CfMb5RAoGAFqZM 22 | T/yqzh351mYXt87cDHBpjrQWqfhzTAR1Dl51MwIfyt1OzK5X5IBtZ796B5frxqd5 23 | AzKlpNpI8tL6DT8oSok0+cdkFoyv7+zYWNVDtGKHpfOYO/wGf+OFcuq+z4SFjkdh 24 | NO1bW3Xi/v/opRo/ldbMXoqt5Muj0kd9/fnoH1cCgYEAhK9gB28eFRD7CexZkmlp 25 | 5Li5iDUgGBuq7jxXSC3fo2XQnMmydbUeL8jkZYYyj3o/NeLfMiNAKcX9dqCjFCus 26 | YdZvd2hRk7mWplVyW/EAfNu+hCfnLFFvq2Dn4++g6Rr8Jr/r4mzxgmigwDxBWUyU 27 | pi630m/LoMbRxj1zw0OtCY0= 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /client/privkey/privkey_qa.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDvxxMPzDN54Wer 3 | fokwqU93yZ/m01dEFU924Nr6halR56ngQR9iU3jqneFwuhq1UdV3cqVq61vVVlgs 4 | g3syw1BVfNDOb1reAx7yIwK3+Z1D5+4GI69NNYdZOQegu6mScoJHEjg2/hYJwUPH 5 | TnEbQxXwXbE2Mu4CnyPqYmIfn3yVELnS7XpZTi+BkIy4Jp4VRGNqE9i0HCM7ZxuW 6 | l9jIoRjmiLTVsl/ilR/hZjIdCCzRy0/BvslkelbdKNod0LPbDFnTnNXDSCIBdPvG 7 | ZuVfZGMxQ8psPJNeTzNH1T/UpNJ7wppEuxMuIRRKBk8nUTtLcrMOjKVFQgUDvsO7 8 | kuYKysX9AgMBAAECggEAYa69YkMzeWTNwjzjkRJ40Hkwjm3s8EyqOejy7PrE9xwk 9 | xbpiGcGd0h8Nt8nplZLIH0hygXNuzyPE+iV6bDzLnngh7OfKogWtdsGymtazLfXv 10 | r0qcYRz8jenA5MdvFr1Vu7R9eFHdEo5MmYaoZ43WAz14M3deJW1FyXfZN77WlzcW 11 | RN2a1ms2+V02jXj/5/y7s8Rf7UT2tF1hylqnsuk68B1rCmr1/oHOJS/kQBx+gNBs 12 | pIWsQjPntQlPPs0dIWSIeFFar0WwXUQaGggOd84v2xFIQO2UB/VnRWMZv8MHleYm 13 | UFJXn+eUw/ZtVqNvqWJbzHSGF4WbEybWdZEtVX5eNQKBgQD8nTPFEczYUUW+4aJe 14 | fFBvzPy9RU+cwmR2tMdtMHScJe4mOWwVap1hDKte5faFsq7t7NbocioN5n73U6xS 15 | kgeeTiREYPLyanWGDeLenoBpv9Z4GAwdKRGZQQCDGV1qq15ADzh7/MbELHHHvUTc 16 | 9hWkeSQQa/g0iwEGCGV4UrWDxwKBgQDy/dOPrGmsNnmTsnMNhvCZQfFDyLq12IAH 17 | nbkLF3NWVoiiiWKtmSyZkhSlDoDEP4BHb3UvRnDAimuY3LiPNWxOtE/WIubuw2Wt 18 | j+rC0jhTmaE4a0ebxSOHV0iStQArj7YcQ3vSXDriqyt8RZ1Z9n71rzUuuPp5cyvR 19 | vFjxC2sgGwKBgH0IejVSqCdxoqnmGG3X7iBIP9iW097tQLiYphTfZPhctdFpnpvD 20 | F36PvMrN3AU0+ex9y6llyHb03WchnSuJaAfs+Xp22gkutFjTyrURktHEyCzNCkHs 21 | r+9BAzXgeiJwC8h9QCHubZtvvCl2/vy3OOMdqsIODt5C5xDLWx4BIiLFAoGAZn7i 22 | ymuzd0zTI5XWKhKNUlgaaLk26JWWC6Bf+Wm+4OBHaigBU7CUu4J+6tCfSChw97Dw 23 | ASz5Sn4YvLX9s4qZUOmF85FtT7FkJj3ajKsXz0uyUZYO8onJXsFWf2uR0s4fxvRA 24 | Oo9k10/UW+sRYG01SHTLPhYQsUH/bczAx4xFd5kCgYEAwi0wLAVbwWp8oRS4saqn 25 | cWhSkl9r7NRJhC0ly6ocvdZJuPhtFrI/IL9KIYiUZxlu5tpQGzuDmedI5uK1EG+l 26 | /B/j351nuizw9xPCoYtxuRaY7yJbWRbcGUArnpsLpC3COEKJTfsEAFmR/V0crFjX 27 | DK38EMp+Apln9Ol2p/nGkbc= 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /client/privkey/privkey_develop.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCmH6GSkGHUhRAe 3 | GKg34uZdG6eng9SycOssSvG8Nl8zNBMXxhPQrwELKhFqGEg7fFp/ONNmbFeYyGgM 4 | 8AcPEAXreTpBNIHYPsirdlTA17sc73pru60aFJC/xpGwkjCumD6tkYVqecgdDVSw 5 | Vhw/oCX5jTzv33xdv/Q/aKNGwTYM/sshiSJy9+8auwMGszV1CeEeJOmCkNPqGlpg 6 | o4h6B88P6nd7iZlbM4w+ZNsAKTm8KwNXkV5xfUGqMM0xPhHFibM2B5zhY3/aHSsI 7 | 73aakGuVRN+ZyRXidTNy2K1GT1e/vNA39AJN95rQ0ZnN4Tm7bif8xIXdwRR4nEiW 8 | mdajJRn9AgMBAAECggEATMgj8s0fGo4iA/cbkTEjjndgxzFMlulQGVnOX1K2L8Fq 9 | 7bsUn4izr8hS4jm08SGp5lGKjDWZSzmdthUe/hxG0C5o+YheV2e1cmKwC63qgxZA 10 | /BhzirFkse8CmZ0IOTqPBcRT6QG+t4bY1OQIDHRl+PEJ8EjYf7BgIQqpJOPaqqg+ 11 | ytO11+aVraQtj1a5bCrC2nRoqsPxALShTARem8d0L/iXS0LQ7FkHScCnuHf9Eqlv 12 | jTL+p7Q8we6h+9sLsDaYscsUzGmkdums6BqTsIE78gjI/5yMd+o7QumAzKi1aboT 13 | gSVOz46a+61L18jXOVKiFugZDu+5tMJp0TFE00zyFQKBgQDWv9VdTGh6vOuKaCTt 14 | Ym3w9qPvCFC0aXPO1B0CEElPEEQEOZJXtSURVS+XGwScRMN0yZvRIARcvwg/Y80u 15 | R3fDpXFhMdd8kFcDOXLwO10lpWFBBiP2NctRSMpeMRaPn4QwKJ0+0hzAJKdOHBMR 16 | WCsKWLA3XM2Zx+WybkHxa8oWhwKBgQDGCKeNX/3+TrwDsu36blat19j7Om3dHsDP 17 | 2OliO0cvHZY2grXzhd/MQ/wLqKI/lVFpmY7rhQSZg6BCdobohNH+XkcfmyzpKQyZ 18 | XWFufNb/W4ciz846/mhbza0WQ1hSU8MKIYlJQu53GKT6x9ULqQMthDdUUWWrJXE9 19 | AfCNU2YoWwKBgFvTJTHCtT4eP/0rsPaMSwRpAgn4nUG3gZxj2I+EVURoaR0BXREB 20 | 1PrHWRUcqWkEgisS9fyC2zqpOKaaTybFynEu8f8kZ8bMlVg8nWgZiifJwn8iWAg0 21 | Ul7MaDPEe6goBkbtZudwwnhqc9uTZ5fYAndnGtphZUynTBFy0eGgPIZLAoGAbwCk 22 | 4nLfDTAW5T/jcw9sGK+3mUKsGFjHnPmp//zYLsm3zEBCOwlcY8PrwKE6qMdKxhVj 23 | 7hI2fNIx/28uuaDRkHJKDaZOazcuL70PAv6JCMPGILY4lArMdkD4d1UyaZs35TLd 24 | ICqbPjibKVLf0VRgSqAk32dsxJ0NNzQiISWRSqcCgYAFN2Phej8EDt37K+P3HdHD 25 | 2G7MEynPG3UDk7IdUutdc4no4ctG/3kEQ+T3lfcbG1cFg4bDCXt4CwqgJbYxzXdD 26 | gn4gpSwnYzO1FcHdr2igQUrarBElY26KTG4zL5XC0m6R4PDEn139C6XKDlrWW1QB 27 | Fv4rL7LHOzw7yKIiW26Bjg== 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/MultiInstanceLoopProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject, 4 | is = require('bpmn-js/lib/util/ModelUtil').is; 5 | 6 | var multiInstanceLoopCharacteristics = require('./implementation/MultiInstanceLoopCharacteristics'); 7 | 8 | var jobRetryTimeCycle = require('./implementation/JobRetryTimeCycle'), 9 | asyncContinuation = require('./implementation/AsyncContinuation'); 10 | 11 | 12 | function getLoopCharacteristics(element) { 13 | var bo = getBusinessObject(element); 14 | return bo.loopCharacteristics; 15 | } 16 | 17 | 18 | function ensureMultiInstanceSupported(element) { 19 | var loopCharacteristics = getLoopCharacteristics(element); 20 | return !!loopCharacteristics && is(loopCharacteristics, 'camunda:Collectable'); 21 | } 22 | 23 | module.exports = function(group, element, bpmnFactory, translate) { 24 | 25 | if (!ensureMultiInstanceSupported(element)) { 26 | return; 27 | } 28 | 29 | // multi instance properties 30 | group.entries = group.entries.concat(multiInstanceLoopCharacteristics(element, bpmnFactory, translate)); 31 | 32 | // async continuation /////////////////////////////////////////////////////// 33 | group.entries = group.entries.concat(asyncContinuation(element, bpmnFactory, { 34 | getBusinessObject: getLoopCharacteristics, 35 | idPrefix: 'multiInstance-', 36 | labelPrefix: translate('Multi Instance ') 37 | }, translate)); 38 | 39 | 40 | // retry time cycle ////////////////////////////////////////////////////////// 41 | group.entries = group.entries.concat(jobRetryTimeCycle(element, bpmnFactory, { 42 | getBusinessObject: getLoopCharacteristics, 43 | idPrefix: 'multiInstance-', 44 | labelPrefix: translate('Multi Instance ') 45 | }, translate)); 46 | }; 47 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/bpmn/parts/LinkProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var is = require('bpmn-js/lib/util/ModelUtil').is, 4 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject, 5 | entryFactory = require('../../../factory/EntryFactory'), 6 | cmdHelper = require('../../../helper/CmdHelper'); 7 | 8 | var forEach = require('lodash/collection').forEach; 9 | 10 | function getLinkEventDefinition(element) { 11 | 12 | var bo = getBusinessObject(element); 13 | 14 | var linkEventDefinition = null; 15 | if (bo.eventDefinitions) { 16 | forEach(bo.eventDefinitions, function (eventDefinition) { 17 | if (is(eventDefinition, 'bpmn:LinkEventDefinition')) { 18 | linkEventDefinition = eventDefinition; 19 | } 20 | }); 21 | } 22 | 23 | return linkEventDefinition; 24 | } 25 | 26 | module.exports = function (group, element, translate) { 27 | var linkEvents = ['bpmn:IntermediateThrowEvent', 'bpmn:IntermediateCatchEvent']; 28 | 29 | forEach(linkEvents, function (event) { 30 | if (is(element, event)) { 31 | 32 | var linkEventDefinition = getLinkEventDefinition(element); 33 | 34 | if (linkEventDefinition) { 35 | var entry = entryFactory.textField({ 36 | id: 'link-event', 37 | label: translate('Link Name'), 38 | modelProperty: 'link-name' 39 | }); 40 | 41 | entry.get = function () { 42 | return { 'link-name': linkEventDefinition.get('name') }; 43 | }; 44 | 45 | entry.set = function (element, values) { 46 | var newProperties = { 47 | name: values['link-name'] 48 | }; 49 | return cmdHelper.updateBusinessObject(element, linkEventDefinition, newProperties); 50 | }; 51 | 52 | group.entries.push(entry); 53 | } 54 | } 55 | }); 56 | }; 57 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/factory/ValidationAwareTextInput.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var textField = require('./TextInputEntryFactory'); 4 | 5 | /** 6 | * This function is a wrapper around TextInputEntryFactory. 7 | * It adds functionality to cache an invalid value entered in the 8 | * text input, instead of setting it on the business object. 9 | */ 10 | var validationAwareTextField = function(options, defaultParameters) { 11 | 12 | var modelProperty = options.modelProperty; 13 | 14 | defaultParameters.get = function(element, node) { 15 | var value = this.__lastInvalidValue; 16 | 17 | delete this.__lastInvalidValue; 18 | 19 | var properties = {}; 20 | 21 | properties[modelProperty] = value !== undefined ? value : options.getProperty(element, node); 22 | 23 | return properties; 24 | }; 25 | 26 | defaultParameters.set = function(element, values, node) { 27 | var validationErrors = validate.apply(this, [ element, values, node ]), 28 | propertyValue = values[modelProperty]; 29 | 30 | // make sure we do not update the id 31 | if (validationErrors && validationErrors[modelProperty]) { 32 | this.__lastInvalidValue = propertyValue; 33 | 34 | return options.setProperty(element, {}, node); 35 | } else { 36 | var properties = {}; 37 | 38 | properties[modelProperty] = propertyValue; 39 | 40 | return options.setProperty(element, properties, node); 41 | } 42 | }; 43 | 44 | var validate = defaultParameters.validate = function(element, values, node) { 45 | var value = values[modelProperty] || this.__lastInvalidValue; 46 | 47 | var property = {}; 48 | property[modelProperty] = value; 49 | 50 | return options.validate(element, property, node); 51 | }; 52 | 53 | return textField(options, defaultParameters); 54 | }; 55 | 56 | module.exports = validationAwareTextField; 57 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/styles/tabs.less: -------------------------------------------------------------------------------- 1 | .bpp-properties-tab-bar { 2 | border-bottom: 1px solid @bpp-color-gray-light; 3 | padding: 0 15px; 4 | 5 | .scroll-tabs-button { 6 | cursor: pointer; 7 | font-size: 16px; 8 | padding: 3px 4px 3px 4px; 9 | color: @bpp-color-gray; 10 | 11 | &:hover { 12 | font-weight: bold; 13 | } 14 | 15 | &.scroll-tabs-left { 16 | float: left; 17 | margin-left: -15px; 18 | } 19 | 20 | &.scroll-tabs-right { 21 | float: right; 22 | margin-right: -15px; 23 | } 24 | } 25 | 26 | &:not(.scroll-tabs-overflow) { 27 | .scroll-tabs-button { 28 | display: none; 29 | } 30 | } 31 | } 32 | 33 | ul.bpp-properties-tabs-links { 34 | margin: 5px 0 -1px 0; 35 | padding: 0; 36 | white-space: nowrap; 37 | overflow: hidden; 38 | 39 | > li { 40 | display: inline-block; 41 | margin: 0; 42 | 43 | &.bpp-hidden { 44 | .bpp-hidden; 45 | } 46 | 47 | > a { 48 | display: inline-block; 49 | 50 | font-size: 12px; 51 | padding: 4px 7px; 52 | 53 | border: 1px solid @bpp-color-gray-light; 54 | border-radius: 3px 3px 0 0; 55 | border-bottom: transparent; 56 | 57 | background-color: @bpp-color-gray-lighter; 58 | color: @bpp-color-gray; 59 | 60 | text-decoration: none; 61 | 62 | &:hover { 63 | color: darken(@bpp-color-gray, 10%); 64 | } 65 | } 66 | } 67 | 68 | > li + li { 69 | margin-left: 4px; 70 | } 71 | 72 | > li.bpp-active { 73 | 74 | a { 75 | padding-bottom: 5px; 76 | 77 | border-top: 2px solid @bpp-color-primary; 78 | border-bottom: none; 79 | } 80 | } 81 | } 82 | 83 | .bpp-properties-tab, 84 | .bpp-properties-tab.bpp-hidden { 85 | display: none; 86 | } 87 | 88 | .bpp-properties-tab.bpp-active { 89 | display: block; 90 | } 91 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/UserTaskProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var is = require('bpmn-js/lib/util/ModelUtil').is, 4 | entryFactory = require('../../../factory/EntryFactory'); 5 | 6 | 7 | module.exports = function(group, element, translate) { 8 | if (is(element, 'camunda:Assignable')) { 9 | 10 | // Assignee 11 | group.entries.push(entryFactory.textField({ 12 | id : 'assignee', 13 | label : translate('Assignee'), 14 | modelProperty : 'assignee' 15 | })); 16 | 17 | // Candidate Users 18 | group.entries.push(entryFactory.textField({ 19 | id : 'candidateUsers', 20 | label : translate('Candidate Users'), 21 | modelProperty : 'candidateUsers' 22 | })); 23 | 24 | // Candidate Groups 25 | group.entries.push(entryFactory.textField({ 26 | id : 'candidateGroups', 27 | label : translate('Candidate Groups'), 28 | modelProperty : 'candidateGroups' 29 | })); 30 | 31 | // Due Date 32 | group.entries.push(entryFactory.textField({ 33 | id : 'dueDate', 34 | description : translate('The due date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)'), 35 | label : translate('Due Date'), 36 | modelProperty : 'dueDate' 37 | })); 38 | 39 | // FollowUp Date 40 | group.entries.push(entryFactory.textField({ 41 | id : 'followUpDate', 42 | description : translate('The follow up date as an EL expression (e.g. ${someDate} or an ' + 43 | 'ISO date (e.g. 2015-06-26T09:54:00)'), 44 | label : translate('Follow Up Date'), 45 | modelProperty : 'followUpDate' 46 | })); 47 | 48 | // priority 49 | group.entries.push(entryFactory.textField({ 50 | id : 'priority', 51 | label : translate('Priority'), 52 | modelProperty : 'priority' 53 | })); 54 | } 55 | }; 56 | -------------------------------------------------------------------------------- /service/src/services/schema/schema.service.js: -------------------------------------------------------------------------------- 1 | // Initializes the `emailtemplate` service on path `/emailtemplate` 2 | const createService = require('feathers-rethinkdb'); 3 | const hooks = require('./schema.hooks'); 4 | module.exports = function() { 5 | const app = this; 6 | const Model = app.get('rethinkdbClient'); 7 | const paginate = app.get('paginate'); 8 | const options = { 9 | name: 'schema', 10 | Model, 11 | paginate 12 | }; 13 | // Initialize our service with any options it requires 14 | app.use('/schema', createService(options)); 15 | // Get our initialized service so that we can register hooks and filters 16 | const service = app.service('schema'); 17 | service.hooks(hooks); 18 | }; 19 | 20 | // // Initializes the `schema` service on path `/schema` 21 | // const createService = require('./schema.class.js'); 22 | // const hooks = require('./schema.hooks'); 23 | // const filters = require('./schema.filters'); 24 | 25 | // module.exports = function () { 26 | // const app = this; 27 | // const paginate = app.get('paginate'); 28 | // const swagger = require('feathers-swagger'); 29 | 30 | 31 | // const options = { 32 | // name: 'schema', 33 | // paginate 34 | // }; 35 | 36 | // app.configure(swagger({ 37 | // docsPath: '/docs', 38 | // prefix: /api\/v\d\//, 39 | // versionPrefix: /v\d/, 40 | // uiIndex: true, 41 | // info: { 42 | // title: 'A test', 43 | // description: 'A description', 44 | // } 45 | // })) 46 | 47 | // // Initialize our service with any options it requires 48 | // app.use('/schema', createService(options)); 49 | 50 | // // Get our initialized service so that we can register hooks and filters 51 | // const service = app.service('schema'); 52 | 53 | // service.hooks(hooks); 54 | 55 | // if (service.filter) { 56 | // service.filter(filters); 57 | // } 58 | // }; 59 | -------------------------------------------------------------------------------- /client/src/store/actions.js: -------------------------------------------------------------------------------- 1 | import api from '../api' 2 | import axios from 'axios' 3 | import config from '@/config' 4 | import flowz from '@/api/flowz' 5 | export default { 6 | getSchema ({ commit }) { 7 | commit('SET_SCHEMA', []) 8 | api.request('get', '/schema?$paginate=false') 9 | .then(response => { 10 | commit('SET_SCHEMA', response.data) 11 | }) 12 | .catch(error => { 13 | console.log(error) 14 | commit('SET_SCHEMA', []) 15 | }) 16 | }, 17 | getFlowzdata ({ commit }) { 18 | flowz.get(null, { 19 | $paginate: false 20 | }) 21 | .then(response => { 22 | commit('SET_FLOWZDATA', response.data) 23 | }) 24 | .catch(error => { 25 | console.log(error) 26 | commit('SET_FLOWZDATA', []) 27 | }) 28 | }, 29 | setXMLtoLocalStorage ({commit}, text) { 30 | commit('SET_XML', text) 31 | }, 32 | removeXMLtoLocalStorage ({commit}) { 33 | commit('REMOVE_XML') 34 | }, 35 | authenticate ({ commit }, authToken) { 36 | let userData = commit('GET_USER') 37 | if (userData !== undefined) { 38 | return userData 39 | } 40 | return axios({ 41 | method: 'get', 42 | url: config.loginURL + '/userdetails', 43 | headers: { 44 | 'authorization': authToken 45 | } 46 | }) 47 | .then(response => { 48 | if (response) { 49 | commit('SET_USER', response.data.data) 50 | return response.data.data 51 | } else { 52 | return null 53 | } 54 | }) 55 | }, 56 | authenticateToken ({ commit }, authToken) { 57 | return true 58 | // return axios({ 59 | // method: 'post', 60 | // url: config.loginURL + '/validatetoken', 61 | // headers: { 62 | // 'authorization': authToken 63 | // } 64 | // }) 65 | // .then(response => { 66 | // return response.data.status 67 | // }) 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /client/src/api/bpmnplugins/index.js: -------------------------------------------------------------------------------- 1 | import api from '@/api' 2 | let model = 'bpmnplugins' 3 | export default { 4 | get: (rowId) => { 5 | if (!rowId) { 6 | return api.request('get', '/' + model) 7 | .then(response => { 8 | return response.data.data 9 | }) 10 | .catch(error => { 11 | // "error": { 12 | // "statusCode": 500, 13 | // "name": "Error", 14 | // "message": "read ETIMEDOUT", 15 | // "code": "ETIMEDOUT", 16 | // "errno": "ETIMEDOUT", 17 | // "syscall": "read", 18 | // "stack": "Error: read ETIMEDOUT\n at exports._errnoException (util.js:1050:11)\n at TCP.onread (net.js:582:26)" 19 | // } 20 | throw error.message 21 | }) 22 | } else { 23 | return api.request('get', '/' + model + '/' + rowId) 24 | .then(response => { 25 | return response.data 26 | }) 27 | .catch(error => { 28 | console.log(error) 29 | }) 30 | } 31 | }, 32 | update: (id, data) => { 33 | return api.request('put', '/' + model + '/' + id, data) 34 | .then(response => { 35 | return ({ status: 'success', message: 'Record updated sucessfully;' }) 36 | }) 37 | .catch(error => { 38 | throw error.message 39 | }) 40 | }, 41 | create: (data) => { 42 | return api.request('post', '/' + model, data) 43 | .then(response => { 44 | return ({ status: 'success', message: 'sucessfully installed' }) 45 | }) 46 | .catch(error => { 47 | throw error.message 48 | }) 49 | }, 50 | delete: (id) => { 51 | return api.request('delete', '/' + model + '/' + id) 52 | .then(response => { 53 | return ({ status: 'success', message: 'sucessfully deleted' }) 54 | }) 55 | .catch(error => { 56 | throw error.message 57 | }) 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /client/cert/cert_master.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIFETCCA/mgAwIBAgISAy4637gCSo0D8AA/TGeHqEPaMA0GCSqGSIb3DQEBCwUA 3 | MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD 4 | ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xODAyMjAxMDUzNDRaFw0x 5 | ODA1MjExMDUzNDRaMCIxIDAeBgNVBAMTF3d3dy5lbmdpbmUuZmxvd3p0ZWNoLnRr 6 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu0T/unKV+sL6kIC7W5Fw 7 | N6jvWwp3HXEeayRVQ1o1EH+ZYYVuvVovgdvWLpJ6p0hc+b2CKeI3RI4n7npnAYvG 8 | KMa5yTPAwXowwLEkYp1rDhX7tQbuv2PhIvywKzfSJtiL14qmRGNpN47003F/P3qi 9 | 2tu0uMp/49U4tXKEzMwJqE/h0wWrWY3tbmPnWaetDM9nwKE4h/OSfEbFXNHiTadP 10 | QldNc7CQBkabj0yhUdoa0eDUAQBfHYX0fIlvx6lC1XY7QidrOYhsVFMLVwxkx0LI 11 | 8hRqCzUnU02wuX/vHkJtCcSKb/MUvJt5ZknpMB6yMiRtLUNDoHzIaIoD7jQ6P9W6 12 | EwIDAQABo4ICFzCCAhMwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF 13 | BwMBBggrBgEFBQcDAjAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBRn5aRu2cD/RDw+ 14 | aK+3sgTOJq8oGTAfBgNVHSMEGDAWgBSoSmpjBH3duubRObemRWXv86jsoTBvBggr 15 | BgEFBQcBAQRjMGEwLgYIKwYBBQUHMAGGImh0dHA6Ly9vY3NwLmludC14My5sZXRz 16 | ZW5jcnlwdC5vcmcwLwYIKwYBBQUHMAKGI2h0dHA6Ly9jZXJ0LmludC14My5sZXRz 17 | ZW5jcnlwdC5vcmcvMCIGA1UdEQQbMBmCF3d3dy5lbmdpbmUuZmxvd3p0ZWNoLnRr 18 | MIH+BgNVHSAEgfYwgfMwCAYGZ4EMAQIBMIHmBgsrBgEEAYLfEwEBATCB1jAmBggr 19 | BgEFBQcCARYaaHR0cDovL2Nwcy5sZXRzZW5jcnlwdC5vcmcwgasGCCsGAQUFBwIC 20 | MIGeDIGbVGhpcyBDZXJ0aWZpY2F0ZSBtYXkgb25seSBiZSByZWxpZWQgdXBvbiBi 21 | eSBSZWx5aW5nIFBhcnRpZXMgYW5kIG9ubHkgaW4gYWNjb3JkYW5jZSB3aXRoIHRo 22 | ZSBDZXJ0aWZpY2F0ZSBQb2xpY3kgZm91bmQgYXQgaHR0cHM6Ly9sZXRzZW5jcnlw 23 | dC5vcmcvcmVwb3NpdG9yeS8wDQYJKoZIhvcNAQELBQADggEBACGcIo15H7OV45nj 24 | E4cr/8F8S5hSTtJPSfjwhGGb51X7JgUDizlm0khZdQXn+qqvcXkd2Yj2ex0GT3kG 25 | +7ZMvpMMqsHg2NDGcWB2/xx4hsAUNhUJ59rgtxFWIsbJAx06qiMPWuWrbm3snO3q 26 | ouXFsxCnMN/gWE3LfFRKIC9fDdhm2QrvyVwZAzruzXoY3S4Uvmgyrx6i1P3EkKm3 27 | E/oCyJnxKH9Vj1QbcsmdfKDeQVdfJKEVZnuj+isW1f+6JTpjavMGgZA0N3QC1dud 28 | Rp++0kskgXDCixlwmrJyZjqRKVhbX16L96VCl63iRSNxgbeSo9TExwRrPhsZf/Pi 29 | x0IUcv4= 30 | -----END CERTIFICATE----- 31 | -------------------------------------------------------------------------------- /client/cert/cert_develop.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIFOTCCBCGgAwIBAgISAxZXR8S7PSeLl+r64QKh6jlFMA0GCSqGSIb3DQEBCwUA 3 | MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD 4 | ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xODAyMjAxMTExMzJaFw0x 5 | ODA1MjExMTExMzJaMCgxJjAkBgNVBAMTHXd3dy52c2hvcGRhdGEuZmxvd3pjbHVz 6 | dGVyLnRrMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAph+hkpBh1IUQ 7 | HhioN+LmXRunp4PUsnDrLErxvDZfMzQTF8YT0K8BCyoRahhIO3xafzjTZmxXmMho 8 | DPAHDxAF63k6QTSB2D7Iq3ZUwNe7HO96a7utGhSQv8aRsJIwrpg+rZGFannIHQ1U 9 | sFYcP6Al+Y087998Xb/0P2ijRsE2DP7LIYkicvfvGrsDBrM1dQnhHiTpgpDT6hpa 10 | YKOIegfPD+p3e4mZWzOMPmTbACk5vCsDV5FecX1BqjDNMT4RxYmzNgec4WN/2h0r 11 | CO92mpBrlUTfmckV4nUzctitRk9Xv7zQN/QCTfea0NGZzeE5u24n/MSF3cEUeJxI 12 | lpnWoyUZ/QIDAQABo4ICOTCCAjUwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQG 13 | CCsGAQUFBwMBBggrBgEFBQcDAjAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBTn0ctP 14 | n40gO1PVV8q+ZtDYsxl6cDAfBgNVHSMEGDAWgBSoSmpjBH3duubRObemRWXv86js 15 | oTBvBggrBgEFBQcBAQRjMGEwLgYIKwYBBQUHMAGGImh0dHA6Ly9vY3NwLmludC14 16 | My5sZXRzZW5jcnlwdC5vcmcwLwYIKwYBBQUHMAKGI2h0dHA6Ly9jZXJ0LmludC14 17 | My5sZXRzZW5jcnlwdC5vcmcvMEQGA1UdEQQ9MDuCGnd3dy5lbmdpbmUuZmxvd3pj 18 | bHVzdGVyLnRrgh13d3cudnNob3BkYXRhLmZsb3d6Y2x1c3Rlci50azCB/gYDVR0g 19 | BIH2MIHzMAgGBmeBDAECATCB5gYLKwYBBAGC3xMBAQEwgdYwJgYIKwYBBQUHAgEW 20 | Gmh0dHA6Ly9jcHMubGV0c2VuY3J5cHQub3JnMIGrBggrBgEFBQcCAjCBngyBm1Ro 21 | aXMgQ2VydGlmaWNhdGUgbWF5IG9ubHkgYmUgcmVsaWVkIHVwb24gYnkgUmVseWlu 22 | ZyBQYXJ0aWVzIGFuZCBvbmx5IGluIGFjY29yZGFuY2Ugd2l0aCB0aGUgQ2VydGlm 23 | aWNhdGUgUG9saWN5IGZvdW5kIGF0IGh0dHBzOi8vbGV0c2VuY3J5cHQub3JnL3Jl 24 | cG9zaXRvcnkvMA0GCSqGSIb3DQEBCwUAA4IBAQARvh3UQKFTEO5beVCUQk7wOVlX 25 | hFRbf3hn//M4n8kEaZ2NWiua31bQhqEZpQhRUPGuSvOFIKkfu7X5P8wB0Uj+GUKd 26 | /9IS3IlJs6dX3kAO3wh0PFg27zY7AFFZ06es1BtEkuGkgAd2iIYagLhz8g/S4GmA 27 | 7bPvxBaQl8EzhLIk5/bRzH0jP3uIJFObAfHlJIk1lozrCwhV3tgNmvgHsgZQWH6o 28 | 9PXR9QDAMHr3QGjZXBkZraiWvwuoFJFTWObf+rHDG9oaVCr/+7y/i03DGcr0/Mg6 29 | LUwBpmAhy4dPwqFZdZKhXbdKroFW94ur5yac5Vmqm1HzG2BM9gXQoH2+Wkji 30 | -----END CERTIFICATE----- 31 | -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/PropertiesActivator.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var DEFAULT_PRIORITY = 1000; 4 | 5 | 6 | /** 7 | * A component that decides upon the visibility / editable 8 | * state of properties in the properties panel. 9 | * 10 | * Implementors must subclass this component and override 11 | * {@link PropertiesActivator#isEntryVisible} and 12 | * {@link PropertiesActivator#isPropertyEditable} to provide 13 | * custom behavior. 14 | * 15 | * @class 16 | * @constructor 17 | * 18 | * @param {EventBus} eventBus 19 | * @param {Number} [priority] at which priority to hook into the activation 20 | */ 21 | function PropertiesActivator(eventBus, priority) { 22 | var self = this; 23 | 24 | priority = priority || DEFAULT_PRIORITY; 25 | 26 | eventBus.on('propertiesPanel.isEntryVisible', priority, function(e) { 27 | return self.isEntryVisible(e.entry, e.element); 28 | }); 29 | 30 | eventBus.on('propertiesPanel.isPropertyEditable', priority, function(e) { 31 | return self.isPropertyEditable(e.entry, e.propertyName, e.element); 32 | }); 33 | } 34 | 35 | PropertiesActivator.$inject = [ 'eventBus' ]; 36 | 37 | module.exports = PropertiesActivator; 38 | 39 | 40 | /** 41 | * Should the given entry be visible for the specified element. 42 | * 43 | * @method PropertiesActivator#isEntryVisible 44 | * 45 | * @param {EntryDescriptor} entry 46 | * @param {ModdleElement} element 47 | * 48 | * @returns {Boolean} 49 | */ 50 | PropertiesActivator.prototype.isEntryVisible = function(entry, element) { 51 | return true; 52 | }; 53 | 54 | /** 55 | * Should the given property be editable for the specified element 56 | * 57 | * @method PropertiesActivator#isPropertyEditable 58 | * 59 | * @param {EntryDescriptor} entry 60 | * @param {String} propertyName 61 | * @param {ModdleElement} element 62 | * 63 | * @returns {Boolean} 64 | */ 65 | PropertiesActivator.prototype.isPropertyEditable = function(entry, propertyName, element) { 66 | return true; 67 | }; -------------------------------------------------------------------------------- /client/static/bpmn/bpmn-js-properties-panel/lib/provider/camunda/parts/ConnectorDetailProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var ImplementationTypeHelper = require('../../../helper/ImplementationTypeHelper'), 4 | InputOutputHelper = require('../../../helper/InputOutputHelper'); 5 | 6 | var entryFactory = require('../../../factory/EntryFactory'), 7 | cmdHelper = require('../../../helper/CmdHelper'); 8 | 9 | function getImplementationType(element) { 10 | return ImplementationTypeHelper.getImplementationType(element); 11 | } 12 | 13 | function getBusinessObject(element) { 14 | return ImplementationTypeHelper.getServiceTaskLikeBusinessObject(element); 15 | } 16 | 17 | function getConnector(bo) { 18 | return InputOutputHelper.getConnector(bo); 19 | } 20 | 21 | function isConnector(element) { 22 | return getImplementationType(element) === 'connector'; 23 | } 24 | 25 | module.exports = function(group, element, bpmnFactory, translate) { 26 | 27 | group.entries.push(entryFactory.textField({ 28 | id: 'connectorId', 29 | label: translate('Connector Id'), 30 | modelProperty: 'connectorId', 31 | 32 | get: function(element, node) { 33 | var bo = getBusinessObject(element); 34 | var connector = bo && getConnector(bo); 35 | var value = connector && connector.get('connectorId'); 36 | return { connectorId: value }; 37 | }, 38 | 39 | set: function(element, values, node) { 40 | var bo = getBusinessObject(element); 41 | var connector = getConnector(bo); 42 | return cmdHelper.updateBusinessObject(element, connector, { 43 | connectorId: values.connectorId || undefined 44 | }); 45 | }, 46 | 47 | validate: function(element, values, node) { 48 | return isConnector(element) && !values.connectorId ? { connectorId: translate('Must provide a value') } : {}; 49 | }, 50 | 51 | hidden: function(element, node) { 52 | return !isConnector(element); 53 | } 54 | 55 | })); 56 | 57 | }; 58 | -------------------------------------------------------------------------------- /JobQue/twitter/twitter.js: -------------------------------------------------------------------------------- 1 | var Twit = require('twit') 2 | var axios = require('axios') 3 | var _ = require('lodash') 4 | var config = require('./config') 5 | let flowid = config.flowid 6 | var T = new Twit({ 7 | consumer_key: config.tweetCredential.consumer_key, 8 | consumer_secret: config.tweetCredential.consumer_secret, 9 | access_token: config.tweetCredential.access_token, 10 | access_token_secret: config.tweetCredential.access_token_secret 11 | }) 12 | var stream = T.stream('statuses/filter', { track: '@KrunalMMahera' }) 13 | stream.on('tweet', function(tweet) { 14 | console.log('tweet', tweet) 15 | axios.get(config.serverURI + '/flowz/' + flowid) 16 | .then(function(response) { 17 | let jsonobject = {} 18 | jsonobject = response.data.json 19 | jsonobject.fid = flowid 20 | jsonobject.createdOn = Date() 21 | axios.post(config.serverURI + '/flowz-instance/', jsonobject) 22 | .then(function(response) { 23 | addInputForStartProcess(response.data, tweet) 24 | }) 25 | .catch(function(error) { 26 | console.log('error', error) 27 | }) 28 | }).catch(function(error) { 29 | console.log(error); 30 | }); 31 | }) 32 | 33 | function addInputForStartProcess(flowinstance, tweet) { 34 | let instanceid = flowinstance.id 35 | let startEvent = flowinstance.start_states[0] 36 | let startEventEntity = _.find(flowinstance.processList, function(o) { return o.id == startEvent; }); 37 | let object = { 38 | Attachement: '', 39 | Message: tweet, 40 | Schemaid: startEventEntity.inputProperty[0].entityschema.id, 41 | Type: 'tweet_template' 42 | } 43 | let inputdata = [] 44 | inputdata.push(object) 45 | let processdata = { 46 | instanceid: instanceid, 47 | processid: startEvent, 48 | data: inputdata 49 | } 50 | axios.post(config.serverURI + '/instance/', processdata).then(function(response) { 51 | console.log('response', response.data) 52 | }) 53 | .catch(function(error) { 54 | console.log('error', error) 55 | }) 56 | } --------------------------------------------------------------------------------