bpmn-elements
Version:
Executable workflow elements based on BPMN 2.0
38 lines (37 loc) • 750 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = Lane;
const kProcess = Symbol.for('process');
function Lane(process, laneDefinition) {
const {
broker,
environment
} = process;
const {
id,
type,
behaviour
} = laneDefinition;
this[kProcess] = process;
this.id = id;
this.type = type;
this.name = behaviour.name;
this.parent = {
id: process.id,
type: process.type
};
this.behaviour = {
...behaviour
};
this.environment = environment;
this.broker = broker;
this.context = process.context;
this.logger = environment.Logger(type.toLowerCase());
}
Object.defineProperty(Lane.prototype, 'process', {
get() {
return this[kProcess];
}
});