TheOpenCloudEngine / uEngine5-base

uEngine5 BPMS that totally re-written in Microservices architecture. uEngine5 can act as not only a conventional Workflow or BPMS but also as a REST api orchestrator or a BPaaS (Business process as a service) of members of OCE's MSA components.
MIT License
10 stars 13 forks source link

getting Pool information cannot follow its root lane. #100

Open jinyoung opened 6 years ago

jinyoung commented 6 years ago

http://front-end-dev.pas-mini.io/#/definition/Report Trouble Process

--> loot at the technical support activity in the lane 'technical', handle trouble과 다르게, sequence flow 로 그려져야 하나, messageflow 로 인식되었음.

image

==> 현재 액티비티 tracingTag 를 주고 어떤 pool 에 소속됐는지 찾는 로직은 아래와 같음:

BpmnVue.vue

      getWherePoolAmIByTracingTag: function (id) {
        var me = this;
        var selected;
        var poolName = null;
        var element = me.canvas.getElementById(id);
        var laneElement = me.canvas.getRenderer().getFrontForBoundary(me.canvas.getBoundary(element));

        if (!laneElement || !me.canvas.getRenderer().isLane(laneElement)) {
          return null;
        }

        var poolElement = me.canvas.getRenderer().getFrontForBoundary(me.canvas.getBoundary(laneElement));

        if (poolElement && me.canvas.getRenderer().isLane(poolElement)) {
          return poolElement.shape.label;
        }else{
          return laneElement.shape.label;
        }

      }

저 메서드를 이용하여 소속 pool 을 얻어낸 후, 아래의 로직으로 같은 pool 소속인지 아닌지 구분함:

      addComponenet: function (componentInfo, newTracingTag, originalData) {
        this.enableHistoryAdd = true;
        var me = this;
        var additionalData = {};

        //릴레이션 추가인 경우
        if (componentInfo.component == 'bpmn-relation') {
          var from = componentInfo.from;
          var to = componentInfo.to;

          var fromParent = this.getParentActByOpengraphId(componentInfo.from);
          var toParent = this.getParentActByOpengraphId(componentInfo.to);

          var fromAct = this.getActAndRelByOpengraphId(componentInfo.from);
          var toAct = this.getActAndRelByOpengraphId(componentInfo.to);

          var fromPool = this.getWherePoolAmIByTracingTag(fromAct.tracingTag)
          var toPool = this.getWherePoolAmIByTracingTag(toAct.tracingTag)

          console.log({formRole: fromPool, toRole: toPool})

현재, from 은 User 를 제대로 찾아가고있고 (ParallelGateway), to 는 technical 로 리턴됨 그러니까 해당 방법 (으로 technical 은 상위 레인을 User 로 리턴하지 못하고 있음.

technical 인 경우, 아래의 표현식으로 상위를 찾으면 null 이 떨어짐:

      var poolElement = me.canvas.getRenderer().getFrontForBoundary(me.canvas.getBoundary(laneElement))