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

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

Open
jinyoung opened this issue Mar 10, 2018 · 0 comments
Open
Assignees

Comments

@jinyoung
Copy link
Member

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 가 식별되지 않음.

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