Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting Pool information cannot follow its root lane. #100

Open
jinyoung opened this issue Mar 18, 2018 · 0 comments
Open

getting Pool information cannot follow its root lane. #100

jinyoung opened this issue Mar 18, 2018 · 0 comments
Assignees

Comments

@jinyoung
Copy link
Member

jinyoung commented Mar 18, 2018

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))  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants