diff options
author | YuanHu <yuan.hu1@zte.com.cn> | 2018-03-27 17:58:42 +0800 |
---|---|---|
committer | YuanHu <yuan.hu1@zte.com.cn> | 2018-03-27 17:58:42 +0800 |
commit | 59884c775c9d06e2195401a09e08650a5cf37b20 (patch) | |
tree | 80a2db253939f7a3aeb6e7be45c517c87d748511 /sdc-workflow-designer-ui/src/app/components/sequence-flow | |
parent | 8261a4ea8091c27b61ac581a852e2e18283b3cdd (diff) |
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 <yuan.hu1@zte.com.cn>
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/components/sequence-flow')
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.html | 6 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts | 20 |
2 files changed, 20 insertions, 6 deletions
diff --git a/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.html b/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.html index e7096ab7..e9d4d22f 100644 --- a/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.html +++ b/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.html @@ -29,7 +29,7 @@ </div> </div> - <div class="form-group row"> + <!-- <div class="form-group row"> <label class="col-md-3 form-control-label text-md-right">{{'WORKFLOW.CONNECTION_SOURCE' | translate}}</label> <div class="col-md-9"> <input class="form-control" disabled type="text" [(ngModel)]="sequenceFlow.sourceRef"> @@ -41,9 +41,9 @@ <div class="col-md-9"> <input class="form-control" disabled type="text" [(ngModel)]="sequenceFlow.targetRef"> </div> - </div> + </div> --> - <div class="form-group row"> + <div *ngIf="showCondition(sequenceFlow.sourceRef)" class="form-group row"> <label class="col-md-3 form-control-label text-md-right">{{'WORKFLOW.CONNECTION_CONDITION' | translate}}</label> <div class="col-md-9"> <input class="form-control" type="text" [(ngModel)]="sequenceFlow.condition"> 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); |