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

Instance 진행상태 Monitor 주기적 변경 값 읽어들이기 #92

Open jinyoung opened 6 years ago

jinyoung commented 6 years ago

SvgGraph.vue 의 loadStatus() 를 주기적으로 setTimeout 으로 불러주면 될것 같긴 한데::

      loadStatus: function (definition) {
        var me = this;
        me.$root.codi('instance{/id}/variables').get({id: me.id})
          .then(function (response) {
            for (var key in response.data) {

              var tracingTagAndPropName = key.split(":");

              //set the instance data to each activities as '_instanceInfo' property (which is volatile!)
              if(tracingTagAndPropName && tracingTagAndPropName.length > 1){
                var tracingTag = tracingTagAndPropName[0]
                var propName = tracingTagAndPropName[1]

                var activity = me.getActivity(tracingTag, definition);

                if(activity){
                  if(!activity._instanceInfo)
                    activity._instanceInfo = {};

                  activity._instanceInfo[propName] = response.data[key];

                  if("_status"==propName){
                    activity.status = response.data[key];
                  }
                }
              }

            }

            me.definition = definition;
            console.log({"definitionFilledWithInstanceInfo": me.definition})
          })
      },

한번 definition 이 적용되면 화면에 변화가 생기지 않을걸로 판단.

이유: BpmnStatusAnimation.vue 에서 status 를 참조하는데, deep 한 property 라 change 가 식별되지 않음.