Ejemplo n.º 1
0
        public void HandleBpmnElementEvent(BpmnElementEvent e)
        {
            TranslateProcessId(e);
            switch (e.Type)
            {
            case BpmnConstants.BPMN_EVENT_CLICK:
                ElementClick?.Invoke(this, e);
                break;

            case BpmnConstants.BPMN_EVENT_ELEMENT_CHANGED:
                ElementChanged?.Invoke(this, e);
                break;

            case BpmnConstants.BPMN_EVENT_SHAPE_ADDED:
                ShapeAdded?.Invoke(this, e);
                break;

            case BpmnConstants.BPMN_EVENT_SHAPE_REMOVED:
                ShapeRemoved?.Invoke(this, e);
                break;

            case BpmnConstants.BPMN_EVENT_UPDATE_ID:
                ElementIdUpdated?.Invoke(this, e);
                break;

            case BpmnConstants.BPMN_EVENT_CONNECTION_REMOVED:
                ConnectionRemoved?.Invoke(this, e);
                break;

            case BpmnConstants.BPMN_EVENT_CONNECTION_ADDED:
                ConnectionAdded?.Invoke(this, e);
                break;

            case BpmnConstants.BPMN_EVENT_ROOT_ADDED:
                RootAdded?.Invoke(this, e);
                break;

            case BpmnConstants.BPMN_EVENT_ROOT_REMOVED:
                RootRemoved?.Invoke(this, e);
                break;
            }
        }
Ejemplo n.º 2
0
        public void HandleBpmnElementEvent(BpmnElementEvent e)
        {
            switch (e.Type)
            {
            case "element.click":
                ElementClick?.Invoke(this, e);
                break;

            case "element.changed":
                ElementChanged?.Invoke(this, e);
                break;

            case "shape.added":
                ShapeAdded?.Invoke(this, e);
                break;

            case "shape.removed":
                ShapeRemoved?.Invoke(this, e);
                break;

            case "element.updateId":
                ElementIdUpdated?.Invoke(this, e);
                break;

            case "connection.removed":
                ConnectionRemoved?.Invoke(this, e);
                break;

            case "connection.added":
                ConnectionAdded?.Invoke(this, e);
                break;

            case "root.added":
                RootAdded?.Invoke(this, e);
                break;

            case "root.removed":
                RootRemoved?.Invoke(this, e);
                break;
            }
        }