From 59884c775c9d06e2195401a09e08650a5cf37b20 Mon Sep 17 00:00:00 2001 From: YuanHu Date: Tue, 27 Mar 2018 17:58:42 +0800 Subject: Display Extend Activities on WF Designer UI. Display Extend Activities on WF Designer UI. Use Extend Activities to Design Workflow and Save Issue-ID: SDC-1130,SDC-1131 Change-Id: Iea62eb0edafb2270deaac89b458015e78d961cd0 Signed-off-by: YuanHu --- .../sequence-flow/sequence-flow.component.ts | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts') diff --git a/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts b/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts index f132a07f..55d051f2 100644 --- a/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts +++ b/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts @@ -17,6 +17,7 @@ import { SequenceFlow } from '../../model/workflow/sequence-flow'; import { BroadcastService } from '../../services/broadcast.service'; import { JsPlumbService } from '../../services/jsplumb.service'; import { ModelService } from '../../services/model.service'; +import { NodeType } from '../../model/workflow/node-type.enum'; /** * property component presents information of a workflow node. @@ -24,7 +25,7 @@ import { ModelService } from '../../services/model.service'; * it may load information dynamically. the content may be different for different node type. */ @Component({ - selector: 'b4t-sequence-flow', + selector: 'wfm-sequence-flow', styleUrls: ['./sequence-flow.component.css'], templateUrl: 'sequence-flow.component.html', }) @@ -33,8 +34,8 @@ export class SequenceFlowComponent implements AfterViewInit { public show = false; constructor(private broadcastService: BroadcastService, - private modelService: ModelService, - private jsPlumbService: JsPlumbService) { + private modelService: ModelService, + private jsPlumbService: JsPlumbService) { } @@ -49,6 +50,19 @@ export class SequenceFlowComponent implements AfterViewInit { }); } + public showCondition(sourceRef: string): boolean { + if (sourceRef) { + let node = this.modelService.getNodeMap().get(sourceRef); + if (node && (NodeType[NodeType.parallelGateway] === node.type || NodeType[NodeType.exclusiveGateway] === node.type)) { + return true; + } else { + return false; + } + } else { + return false; + } + } + public nameChanged(name: string) { this.sequenceFlow.name = name; this.jsPlumbService.setLabel(this.sequenceFlow.sourceRef, this.sequenceFlow.targetRef, name); -- cgit 1.2.3-korg