Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
vamsee committed Oct 6, 2020
2 parents 5279e96 + f1509bb commit f0b47d2
Show file tree
Hide file tree
Showing 51 changed files with 2,130 additions and 412 deletions.
9 changes: 9 additions & 0 deletions ISSUES.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
* MessageStart seems to be starting even before the message has been received.
* Designer also seems to be showing invalid editor for MessageStart event

# taskId populated in process-token for the user-task
* contains only one taskId. This works well if it is a normal user task.
* In case of multi-instance tasks,
* Series - works well as it populated one task id after the other.
* Parallel - it still contains only one task id even though there are many tasks created.

# if user task some expression evaluation fails
previous task remains pending and flow execution stops

# Call-Activity Designer Input/Output-Parameters
* Call-Activity node in designer does not have means to specify below data and hence this part is not tested fully. (Refer call-activity-main.bpmn: Line#23-26)
``` xml
Expand Down
24 changes: 0 additions & 24 deletions bin/app-list.json

This file was deleted.

13 changes: 0 additions & 13 deletions bin/app.js

This file was deleted.

8 changes: 0 additions & 8 deletions bin/boot/root.js

This file was deleted.

6 changes: 0 additions & 6 deletions bin/component-config.json

This file was deleted.

40 changes: 0 additions & 40 deletions bin/config.json

This file was deleted.

29 changes: 0 additions & 29 deletions bin/datasources.docker.js

This file was deleted.

13 changes: 0 additions & 13 deletions bin/datasources.json

This file was deleted.

29 changes: 0 additions & 29 deletions bin/datasources.mongo.js

This file was deleted.

34 changes: 0 additions & 34 deletions bin/datasources.oracle.js

This file was deleted.

31 changes: 0 additions & 31 deletions bin/datasources.postgres.js

This file was deleted.

21 changes: 16 additions & 5 deletions common/activiti-models/activiti-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ module.exports = function ActivitiManager(ActivitiManager) {
// ActivitiManager.disableRemoteMethod('deleteWithVersion', true);


ActivitiManager.enable = function enable(baseUrl, options, cb) {
ActivitiManager.enable = function enable(payload, options, cb) {
let baseUrl = payload.baseUrl;
var app = ActivitiManager.app;
helper._enableActiviti(baseUrl, app, options, cb);
};
Expand Down Expand Up @@ -152,10 +153,20 @@ module.exports = function ActivitiManager(ActivitiManager) {

ActivitiManager.remoteMethod('enable', {
description: 'enable Activiti rest endpoints',
accepts: {
arg: 'baseUrl',
description: 'Activiti server URL to connect',
type: 'string'
accepts: [{
arg: 'payload',
type: 'object',
http: {
source: 'body'
},
description: 'Activiti server URL to connect'
}, {
arg: 'options',
type: 'object',
http: 'optionsFromRequest'
}],
http: {
verb: 'post'
},
returns: {
type: 'object',
Expand Down
7 changes: 7 additions & 0 deletions common/activiti-models/lib/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ exports._enableActiviti = function _enableActiviti(baseUrl, app, ctx, done) {
ctx = {};
}

if (!baseUrl) {
let err = new Error('Activiti endpoint must be specified');
err.statusCode = err.status = 422;
err.code = 'INVALID_DATA';
return done(err);
}

var modelNames = [
'activiti-deployment',
'activiti-engine',
Expand Down
20 changes: 16 additions & 4 deletions common/mixins/maker-checker-mixin-v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,12 @@ function addOERemoteMethods(Model) {
}

delete context.isNewChangeRequest;
context.beforeWorkflow = true;
let observerName = 'before save';
var wfConfig = Model.app.get('workflow') || {};
if (wfConfig.disableMakerCheckerBeforeSave) {
observerName = 'dummy observer';
}
// var RootModel = Model;
// var beforeSaveArray = Model._observers['before save'] || [];

Expand All @@ -707,7 +713,8 @@ function addOERemoteMethods(Model) {
// return next(err);
// }
// dpBeforeSave[0](context, function beforeSaveCb(err) {
Model.notifyObserversOf('before save', context, function beforeSaveCb(err) {
Model.notifyObserversOf(observerName, context, function beforeSaveCb(err) {
delete context.beforeWorkflow;
if (err) return next(err);

if (context.currentInstance) {
Expand All @@ -732,7 +739,7 @@ function addOERemoteMethods(Model) {
// log.error(options, err);
return next(err);
}
}, data, context);
}, data, context.options);
});
});
}
Expand All @@ -741,6 +748,11 @@ function addOERemoteMethods(Model) {
// get hasOne, hasMany relation metadata
var relations = [];
var childData = {};
var validateFunction = async.map;
var wfConfig = Model.app.get('workflow') || {};
if (wfConfig.disableMakerCheckerParallelValidations) {
validateFunction = async.mapSeries;
}
for (let r in Model.relations) {
if (Object.prototype.hasOwnProperty.call(Model.relations, r)) {
let relation = Model.relations[r];
Expand Down Expand Up @@ -774,7 +786,7 @@ function addOERemoteMethods(Model) {
return next(err);
}

async.map(relations,
validateFunction(relations,
function validateEach(relation, cb) {
let Model = relation.Model;
let data = relation.data;
Expand Down Expand Up @@ -810,7 +822,7 @@ function addOERemoteMethods(Model) {
return next(err);
}

async.map(relations,
validateFunction(relations,
function validateEach(relation, cb) {
let Model = relation.Model;
let data = relation.data;
Expand Down
6 changes: 3 additions & 3 deletions common/mixins/workflow-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,13 @@ function addRemoteHooks(Model) {
version: 'v0'
};

if (operationList.create.indexOf(method) !== -1) {
if (operationList.create.indexOf(method) >= 0) {
operation = 'create';
filter.operation = { inq: ['save', 'create'] };
} else if (operationList.update.indexOf(method) !== -1) {
} else if (operationList.update.indexOf(method) >= 0) {
filter.operation = { inq: ['save', 'update'] };
operation = 'update';
} else if (operationList.delete.indexOf(method) !== -1) {
} else if (operationList.delete.indexOf(method) >= 0) {
operation = 'delete';
filter.operation = operation;
} else {
Expand Down
Loading

0 comments on commit f0b47d2

Please sign in to comment.