Skip to content

Commit

Permalink
add data output support
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodrigo Quelca committed Oct 4, 2023
1 parent d100a1b commit 8bac3de
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default {
if (cellView){
point = V(this.paper.viewport).toLocalPoint(clientX, clientY);
}
debugger;
const comingFromDataStoreOrDataObject = this.node.isBpmnType('bpmn:DataStoreReference', 'bpmn:DataObjectReference');
const dataAssociationConfig = comingFromDataStoreOrDataObject
Expand Down
15 changes: 15 additions & 0 deletions src/mixins/linkConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,21 @@ export default {
if (this.updateDefinitionLinks) {
this.updateDefinitionLinks();
}
// console.log(this);
if (this.shape.component.node.type === 'processmaker-modeler-data-input-association') {
// console.log(this.node);
if (this.$parent.isMultiplayer) {
const genericLink = this.shape.findView(this.paper);
const waypoint = [genericLink.sourceAnchor.toJSON(), genericLink.targetAnchor.toJSON()];
window.ProcessMaker.EventBus.$emit('multiplayer-addFlow', {
type: this.shape.component.node.type,
id: `node_${this.$parent.nodeIdGenerator.getDefinitionNumber()}`,
sourceRefId: this.sourceNode.definition.id,
targetRefId: this.targetNode.definition.id,
waypoint,
});
}
}

this.$emit('save-state');
});
Expand Down
7 changes: 7 additions & 0 deletions src/multiplayer/multiplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { faker } from '@faker-js/faker';
import MessageFlow from '@/components/nodes/genericFlow/MessageFlow';
import SequenceFlow from '@/components/nodes/genericFlow/SequenceFlow';
import DataOutputAssociation from '@/components/nodes/genericFlow/DataOutputAssociation';
import DataAssociation from '@/components/nodes/genericFlow/DataAssociation';
const BpmnFlows = [
{
type: 'processmaker-modeler-text-annotation',
Expand All @@ -19,6 +20,10 @@ const BpmnFlows = [
type: 'processmaker-modeler-message-flow',
factory: MessageFlow,
},
{
type: 'processmaker-modeler-data-input-association',
factory: DataOutputAssociation,
},
];
export default class Multiplayer {
clientIO = null;
Expand Down Expand Up @@ -149,6 +154,7 @@ export default class Multiplayer {
'processmaker-modeler-sequence-flow',
'processmaker-modeler-text-annotation',
'processmaker-modeler-message-flow',
'processmaker-modeler-data-input-association',
];
return new Promise(resolve => {
changes.map((data) => {
Expand Down Expand Up @@ -235,6 +241,7 @@ export default class Multiplayer {
return null; // Return null if no matching element is found
}
addFlow(data) {
console.log(data);
const yMapNested = new Y.Map();
this.doTransact(yMapNested, data);
this.yArray.push([yMapNested]);
Expand Down

0 comments on commit 8bac3de

Please sign in to comment.