Sum of probabilities at edges linked to symbols limited to 1Sum of probabilities at edges linked to symbols limited to 1RE: Sum of probabilities at edges linked to symbols limited to 1Endrju S. & Sobhi A.https://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=773092014-03-08T11:32:59Z2014-03-08T11:25:11ZThanks a lot. This issue is still relevant for our further implementation. The proposals and sampe implementations are being considered.Endrju S. & Sobhi A.2014-03-08T11:25:11ZRE: Sum of probabilities at edges linked to symbols limited to 1Wilfrid Utzhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=275182013-08-27T13:20:56Z2013-08-27T13:20:46ZYou have different options to realize this functionality. Please find below 2 different approaches that could be realized in your implementation:<br /><br /><strong>Alternative A: AdoScript-based Solution:</strong><br />The validation of the process model can be realized by a triggering and validation script either by user interaction (click on menu) or triggered by listening to a platform event (e.g. "SaveModel" or "OpenModel" - please find the details for both events below). The pseudo code could - depending on your configuration, would parse the model and validate the outgoing connections of branching objects according to the rule set defined.<br /><div class="code"><span class="code-lines"> 1</span><br /><span class="code-lines"> 2</span>ON_EVENT "OpenModel" {<br /><span class="code-lines"> 3</span> #Get all instances of class "branching"<br /><span class="code-lines"> 4</span> CC "Core" GET_ALL_OBJS_OF_CLASSNAME modelid: (VAL modelid) classname:"Branching"<br /><span class="code-lines"> 5</span> SETL lBranchingObjIDs: (objids)<br /><span class="code-lines"> 6</span> FOR sBranchingObjID in: (lBranchingObjIDs) {<br /><span class="code-lines"> 7</span> CC "Core" GET_CONNECTORS objid: (VAL sBranchingObjID) out<br /><span class="code-lines"> 8</span> SETL lOutGoingConnectors: (objids)<br /><span class="code-lines"> 9</span> #Get attribute value and calculate whether the sum is 1<br /><span class="code-lines">10</span> }<br /><span class="code-lines">11</span>}<br /></div><br /><div class="code"><span class="code-lines"> 1</span>ON_EVENT "SaveModel" {<br /><span class="code-lines"> 2</span> IF (origin = "save") {<br /><span class="code-lines"> 3</span> #Get all instances of class "branching"<br /><span class="code-lines"> 4</span> CC "Core" GET_ALL_OBJS_OF_CLASSNAME modelid: (VAL modelid) classname:"Branching"<br /><span class="code-lines"> 5</span> SETL lBranchingObjIDs: (objids)<br /><span class="code-lines"> 6</span> FOR sBranchingObjID in: (lBranchingObjIDs) {<br /><span class="code-lines"> 7</span> CC "Core" GET_CONNECTORS objid: (VAL sBranchingObjID) out<br /><span class="code-lines"> 8</span> SETL lOutGoingConnectors: (objids)<br /><span class="code-lines"> 9</span> #Get attribute value and calculate whether the sum is 1<br /><span class="code-lines">10</span> } <br /><span class="code-lines">11</span> } <br /><span class="code-lines">12</span>}<br /></div><br /><br /><strong>Alternative B: Simulation Component Configuration</strong><br />ADOxx 1.3 UL1 has basic simulation functionalities included. The simulation algorithm can be used to determin the consistency of the process graph according to your needs. In case the simulation algorithm can not determine consistency with requirement of the algorithm (actually a path analysis), an error message is displayed.<br />To enable this functionality, two steps of configuration have to be performed in your modelling language implementation<br /><strong>1. Enable the functionality (in the sample below as a menu item, can also be event driven as above):</strong><div class="code"><span class="code-lines"> 1</span>#-----------------------------------------------<br /><span class="code-lines"> 2</span>ITEM "Check validity" modeling:"Extras"<br /><span class="code-lines"> 3</span>#-----------------------------------------------<br /><span class="code-lines"> 4</span><br /><span class="code-lines"> 5</span>CC "Modeling" GET_ACT_MODEL<br /><span class="code-lines"> 6</span> # --> RESULT modelid: intValue<br /><span class="code-lines"> 7</span>SET idCrtModelID: (modelid)<br /><span class="code-lines"> 8</span><br /><span class="code-lines"> 9</span>SETG errmsg: ("")<br /><span class="code-lines">10</span><br /><span class="code-lines">11</span>CC "Simulation" RUN_PATH_ANALYSIS modelid: (idCrtModelID) runs:100 auto-read-only:1 no-error-messages:1 no-result-window<br /><span class="code-lines">12</span> # --> RESULT ecode: intValue errmsg: strValue<br /><span class="code-lines">13</span><br /><span class="code-lines">14</span>IF (ecode) {<br /><span class="code-lines">15</span> CC "AdoScript" INFOBOX (errmsg)<br /><span class="code-lines">16</span>}<br /></div><strong>2. Configure the mapping of classes and attributes to the simulation model</strong><br />For details on the mapping, please have a look on the attached sample implementation. the classes are generic in this sample and you can see how they are derived from the underlying meta-model to enable the functionality<div class="code"><span class="code-lines">1</span>M : __Activity__<br /><span class="code-lines">2</span>N : __Start__<br /><span class="code-lines">3</span>P : __D_end_<br /><span class="code-lines">4</span>Q : __Decision__<br /><span class="code-lines">5</span>Parallelism : __Parallelity__<br /><span class="code-lines">6</span>Merge : __Merging__<br /><span class="code-lines">7</span>Sample : __D-construct__<br /></div>Wilfrid Utz2013-08-27T13:20:46ZSum of probabilities at edges linked to symbols limited to 1Endrju S. & Sobhi A.https://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=271022014-03-27T11:42:09Z2013-08-14T22:26:05ZAt the "subsequent" edges there is a probability-function implemented. <br />Can that concept be expanded, so that the sum of the probabilities of all edge occurrences, <br />which are connected to an object, has to become 1?Endrju S. & Sobhi A.2013-08-14T22:26:05Z