Instance 진행상태 Monitor 주기적 변경 값 읽어들이기
Opened this issue · 0 comments
jinyoung commented
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 가 식별되지 않음.