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

SubProcess #19

Open SeungpilPark opened 7 years ago

SeungpilPark commented 7 years ago

제작 전 검토

그림

2017-09-29 1 14 57

definition

{
    "definition": {
        "_type": "org.uengine.kernel.ProcessDefinition",
        "name": {
            "text": "codi/call2.json"
        },
        "retryDelay": 60,
        "isDynamicChangeAllowed": true,
        "childActivities": [
            "java.util.ArrayList",
            [
                {
                    "_type": "org.uengine.kernel.bpmn.SubProcess",
                    "name": {
                        "text": "SUB"
                    },
                    "description": {},
                    "tracingTag": "SUB",
                    "retryDelay": 60,
                    "isDynamicChangeAllowed": true,
                    "elementView": {
                        "_type": "org.uengine.kernel.view.DefaultActivityView",
                        "id": "SUB",
                        "parent": "4777a2aa-d9d0-9a22-fa82-d3cc69c60936",
                        "shapeId": "OG.shape.bpmn.A_Task",
                        "x": 356,
                        "y": 337,
                        "width": 200,
                        "height": 200,
                        "style": "{\"stroke\":\"black\",\"fill-r\":\".5\",\"fill-cx\":\".5\",\"fill-cy\":\".5\",\"fill\":\"white\",\"fill-opacity\":0,\"label-position\":\"bottom\",\"stroke-width\":1.5,\"cursor\":\"move\"}"
                    },
                    "childActivities": [
                        "java.util.ArrayList",
                        [
                            {
                                "_type": "org.uengine.kernel.bpmn.StartEvent",
                                "name": {
                                    "text": "CC"
                                },
                                "tracingTag": "3",
                                "retryDelay": 60,
                                "isDynamicChangeAllowed": true,
                                "elementView": {
                                    "_type": "org.uengine.kernel.view.DefaultActivityView",
                                    "id": "3",
                                    "parent": "SUB",
                                    "shapeId": "OG.shape.bpmn.A_Task",
                                    "x": 440,
                                    "y": 309,
                                    "width": 30,
                                    "height": 30,
                                    "style": "{\"stroke\":\"black\",\"fill-r\":\".5\",\"fill-cx\":\".5\",\"fill-cy\":\".5\",\"fill\":\"white\",\"fill-opacity\":0,\"label-position\":\"bottom\",\"stroke-width\":1.5,\"cursor\":\"move\"}"
                                },
                                "dynamicChangeAllowed": true
                            },
                            {
                                "_type": "org.uengine.kernel.DefaultActivity",
                                "name": {
                                    "text": "DD"
                                },
                                "tracingTag": "4",
                                "retryDelay": 60,
                                "isDynamicChangeAllowed": true,
                                "elementView": {
                                    "_type": "org.uengine.kernel.view.DefaultActivityView",
                                    "id": "4",
                                    "parent": "SUB",
                                    "shapeId": "OG.shape.bpmn.A_Task",
                                    "x": 663,
                                    "y": 306,
                                    "width": 100,
                                    "height": 100,
                                    "style": "{\"stroke\":\"black\",\"fill-r\":1,\"fill-cx\":0.1,\"fill-cy\":0.1,\"fill\":\"#FFFFFF\",\"fill-opacity\":0,\"label-position\":\"center\",\"stroke-width\":1.2,\"r\":\"10\",\"cursor\":\"move\"}"
                                },
                                "dynamicChangeAllowed": true
                            }
                        ]
                    ],
                    "sequenceFlows": [
                        {
                            "relationView": {
                                "TERMINAL_IN_OUT": "_TERMINAL_C_INOUT_0",
                                "shapeId": "OG.shape.bpmn.C_Flow",
                                "value": "[[455,308],[613,308]]",
                                "style": "{\"stroke\":\"black\",\"fill-r\":\".5\",\"fill-cx\":\".5\",\"fill-cy\":\".5\",\"fill\":\"none\",\"fill-opacity\":0,\"label-position\":\"center\",\"stroke-width\":1.5,\"stroke-opacity\":1,\"edge-type\":\"plain\",\"arrow-start\":\"none\",\"arrow-end\":\"block\",\"stroke-dasharray\":\"\",\"stroke-linejoin\":\"round\",\"cursor\":\"pointer\"}"
                            },
                            "sourceRef": "3",
                            "targetRef": "4"
                        }
                    ],
                    "instanceId": "<%=Instance.Name%>",
                    "multipleInstanceLabel": {},
                    "dynamicChangeAllowed": true
                },
                {
                    "_type": "org.uengine.kernel.bpmn.StartEvent",
                    "name": {
                        "text": "AA"
                    },
                    "tracingTag": "1",
                    "retryDelay": 60,
                    "isDynamicChangeAllowed": true,
                    "elementView": {
                        "_type": "org.uengine.kernel.view.DefaultActivityView",
                        "id": "1",
                        "parent": "4777a2aa-d9d0-9a22-fa82-d3cc69c60936",
                        "shapeId": "OG.shape.bpmn.A_Task",
                        "x": 256,
                        "y": 237,
                        "width": 30,
                        "height": 30,
                        "style": "{\"stroke\":\"black\",\"fill-r\":\".5\",\"fill-cx\":\".5\",\"fill-cy\":\".5\",\"fill\":\"white\",\"fill-opacity\":0,\"label-position\":\"bottom\",\"stroke-width\":1.5,\"cursor\":\"move\"}"
                    },
                    "dynamicChangeAllowed": true
                },
                {
                    "_type": "org.uengine.kernel.DefaultActivity",
                    "name": {
                        "text": "BB"
                    },
                    "tracingTag": "2",
                    "retryDelay": 60,
                    "isDynamicChangeAllowed": true,
                    "elementView": {
                        "_type": "org.uengine.kernel.view.DefaultActivityView",
                        "id": "2",
                        "parent": "4777a2aa-d9d0-9a22-fa82-d3cc69c60936",
                        "shapeId": "OG.shape.bpmn.A_Task",
                        "x": 257,
                        "y": 408,
                        "width": 100,
                        "height": 100,
                        "style": "{\"stroke\":\"black\",\"fill-r\":1,\"fill-cx\":0.1,\"fill-cy\":0.1,\"fill\":\"#FFFFFF\",\"fill-opacity\":0,\"label-position\":\"center\",\"stroke-width\":1.2,\"r\":\"10\",\"cursor\":\"move\"}"
                    },
                    "dynamicChangeAllowed": true
                }
            ]
        ],
        "roles": [
            {
                "name": "ROLE",
                "askWhenInit": true,
                "displayName": {},
                "elementView": {
                    "_type": "org.uengine.kernel.view.DefaultActivityView",
                    "id": "4777a2aa-d9d0-9a22-fa82-d3cc69c60936",
                    "shapeId": "OG.shape.bpmn.A_Task",
                    "x": 548,
                    "y": 362,
                    "width": 760,
                    "height": 366,
                    "style": "{\"stroke\":\"black\",\"fill-r\":\".5\",\"fill-cx\":\".5\",\"fill-cy\":\".5\",\"fill\":\"#ffffff\",\"fill-opacity\":0,\"label-position\":\"center\",\"label-direction\":\"vertical\",\"vertical-align\":\"top\",\"cursor\":\"move\"}"
                }
            }
        ],
        "sequenceFlows": [
            {
                "relationView": {
                    "TERMINAL_IN_OUT": "_TERMINAL_C_INOUT_0",
                    "shapeId": "OG.shape.bpmn.C_Flow",
                    "value": "[[256,252],[256,358]]",
                    "style": "{\"stroke\":\"black\",\"fill-r\":\".5\",\"fill-cx\":\".5\",\"fill-cy\":\".5\",\"fill\":\"none\",\"fill-opacity\":0,\"label-position\":\"center\",\"stroke-width\":1.5,\"stroke-opacity\":1,\"edge-type\":\"plain\",\"arrow-start\":\"none\",\"arrow-end\":\"block\",\"stroke-dasharray\":\"\",\"stroke-linejoin\":\"round\",\"cursor\":\"pointer\"}"
                },
                "sourceRef": "1",
                "targetRef": "2"
            },
            {
                "relationView": {
                    "TERMINAL_IN_OUT": "_TERMINAL_C_INOUT_0",
                    "shapeId": "OG.shape.bpmn.C_Flow",
                    "value": "[[256,252],[256,358]]",
                    "style": "{\"stroke\":\"black\",\"fill-r\":\".5\",\"fill-cx\":\".5\",\"fill-cy\":\".5\",\"fill\":\"none\",\"fill-opacity\":0,\"label-position\":\"center\",\"stroke-width\":1.5,\"stroke-opacity\":1,\"edge-type\":\"plain\",\"arrow-start\":\"none\",\"arrow-end\":\"block\",\"stroke-dasharray\":\"\",\"stroke-linejoin\":\"round\",\"cursor\":\"pointer\"}"
                },
                "sourceRef": "2",
                "targetRef": "SUB"
            }
        ],
        "defaultFlowchartViewType": "swimlane",
        "defaultFlowchartViewOption": "vertical",
        "duration": 10,
        "simulationInstanceCount": 10,
        "simulationInputFrequency": 10,
        "archive": true,
        "id": "codi/call2.json",
        "isAdhoc": true,
        "initiateByFirstWorkitem": true,
        "adhoc": true,
        "dynamicChangeAllowed": true
    }
}

인스턴스 실행 결과

- [uEngine] Start Executing Activity: AA (1)
- [uEngine] Start Executing Activity: BB (2)
default activity::execute: BB
- [uEngine] Start Executing Activity: SUB (SUB)
- [uEngine] Start Executing Activity: CC (3)
- [uEngine] Start Executing Activity: DD (4)
default activity::execute: DD
- [uEngine] End Executing Activity: DD (4) - Elapsed Time : 1
- [uEngine] End Executing Activity: CC (3) - Elapsed Time : 1
- [uEngine] End Executing Activity: SUB (SUB) - Elapsed Time : 1
- [uEngine] End Executing Activity: BB (2) - Elapsed Time : 1
- [uEngine] End Executing Activity: AA (1) - Elapsed Time : 1
SeungpilPark commented 6 years ago

주 작업 내용: 사용자에 이벤트에 대한 모델변경을 recursive 하게 처리하도록 함.

Bpmn2.0 의 규약에 따라, 두 액티비티가 동일한 서브프로세스에 놓이지 않은경우 연결할 수 없음. 이 경우 에러메세지와 자동으로 연결을 해지해버림.

또한, Subprocess 내 외부로 액티비티를 이동할 때, 자동으로 모델변경이 일어남.

2017-10-18 5 57 57
- [uEngine] Start Executing Activity: AA (1)
- [uEngine] Start Executing Activity: BB (2)
default activity::execute: BB
- [uEngine] Start Executing Activity: SUB (SUB)
- [uEngine] Start Executing Activity: CC (3)
- [uEngine] Start Executing Activity: DD (4)
default activity::execute: DD
- [uEngine] Start Executing Activity: SUB2 (5)
- [uEngine] Start Executing Activity:  (7)
- [uEngine] Start Executing Activity: SUB3 (6)
- [uEngine] Start Executing Activity:  (8)
- [uEngine] Start Executing Activity: 마무리 (9)
default activity::execute: 마무리
- [uEngine] End Executing Activity: 마무리 (9) - Elapsed Time : 0
- [uEngine] End Executing Activity:  (8) - Elapsed Time : 0
- [uEngine] End Executing Activity: SUB3 (6) - Elapsed Time : 0
- [uEngine] End Executing Activity:  (7) - Elapsed Time : 1
- [uEngine] End Executing Activity: SUB2 (5) - Elapsed Time : 1
- [uEngine] End Executing Activity: DD (4) - Elapsed Time : 1
- [uEngine] End Executing Activity: CC (3) - Elapsed Time : 1
- [uEngine] End Executing Activity: SUB (SUB) - Elapsed Time : 1
- [uEngine] End Executing Activity: BB (2) - Elapsed Time : 2
- [uEngine] End Executing Activity: AA (1) - Elapsed Time : 2