AnsweredAssumed Answered

How to add Shape Repository to Modeler?

Question asked by joeysr20det on May 8, 2012
Latest reply on May 10, 2012 by joeysr20det
First off, I realize this is the designer forum, but I didn't see a place to post about the modeler. Sorry if this is the wrong location.

I'm trying to figure out how to add our own shape repository to the Modeler. As far as I can tell, the extension.json files in activiti-modeler\WEB-INF\json and activiti-modeler\editor\stencilsets\extensions should have a extensions and perspectives block added for our repository as such:

{
   "extensions": [
      {
         "title" : "Activiti",
         "title_de":"Activiti",
         "namespace" : "http://oryx-editor.org/stencilsets/extensions/bpmn2.0activiti#",
         "description":"The subset of BPMN 2.0 supported by Activiti.",
         "description_de":"Die von Activiti unterstützte Untermenge von BPMN 2.0.",
         "definition":"bpmn2.0activiti/bpmn2.0activiti.json",
         "extends":"http://b3mn.org/stencilset/bpmn2.0#"
      },
      {
         "title" : "TechDoc",
         "title_de":"TechDoc",
         "namespace" : "http://prevo.com/stencilsets/extensions/bpmn2.0techdoc#",
         "description":"The subset of BPMN 2.0 supported by TechDoc.",
         "description_de":"Die von TechDoc unterstützte Untermenge von BPMN 2.0.",
         "definition":"bpmn2.0techdoc/bpmn2.0techdoc.json",
         "extends":"http://b3mn.org/stencilset/bpmn2.0#"
      }
   ],
   "perspectives": [
      {
         "title":"BPMN (Complete)",
         "title_de":"BPMN (Vollständig)",
         "namespace":"http://oryx-editor.org/stencilsets/perspectives/academicbpmn2#",
         "description":"BPMN complete. Features the whole standard and all elements from the specification.",
         "description_de":"BPMN in dem kompletten standardisierten Umfang (sämtliche Modellierungskonstrukte).",
         "stencilset":"http://b3mn.org/stencilset/bpmn2.0#",
         "extensions" : []
      },
      {
         "title":"BPMN (Activiti)",
         "title_de":"BPMN (Activiti)",
         "namespace" : "http://oryx-editor.org/stencilsets/perspectives/activitibpmn2#",
         "description":"The subset of BPMN 2.0 supported by Activiti.",
         "description_de":"Die von Activiti unterstützte Untermenge von BPMN 2.0.",
         "stencilset" : "http://b3mn.org/stencilset/bpmn2.0#",
         "extensions" : ["http://oryx-editor.org/stencilsets/extensions/bpmn2.0activiti#"]
      },
      {
         "title":"BPMN (TechDoc)",
         "title_de":"BPMN (TechDoc)",
         "namespace" : "http://prevo.com/stencilsets/perspectives/techdocbpmn2#",
         "description":"The subset of BPMN 2.0 supported by TechDoc.",
         "description_de":"Die von TechDoc unterstützte Untermenge von BPMN 2.0.",
         "stencilset" : "http://b3mn.org/stencilset/bpmn2.0#",
         "extensions" : ["http://prevo.com/stencilsets/extensions/bpmn2.0techdoc#"]
      }
   ]
}


I have also created a bpmn2.0techdoc folder in activiti-modeler\editor\stencilsets\extensions and created a bpmn2.0techdoc.json file containing:

{
   "title" : "TechDoc",
   "title_de":"TechDoc",
   "namespace":"http://prevo.com/stencilsets/extensions/bpmn2.0techdoc#",
   "description":"The subset of BPMN 2.0 supported by TechDoc.",
   "description":"Die von TechDoc unterstützte Untermenge von BPMN 2.0.",
   "extends":"http://b3mn.org/stencilset/bpmn2.0#",
   "stencils":[
        {
            "type": "node",
            "id":"TechDocReleaseDocumentTask",
            "superId":"Task",
            "title":"Release Document Task",
            "title_de":"",
            "groups":["Document"],
            "groups_de":[""],
            "description":"A Release Document Task is used to release a document in TechDoc.",
            "view":"activity/node.task.svg",
            "icon":"techdoc/list/releaseDocument.png",
            "roles": [
                "all",
                "sequence_start",
                "sequence_end",
                "from_task_event",
                "to_task_event",
                "FromEventbasedGateway",
                "messageflow_start",
                "messageflow_end",
                "fromtoall"
            ],
            "properties": [
                {
                    "id":"tasktype",
                    "value":"User"
                }
            ]
        }
   ],
   "properties":[],
   "rules": {
      "connectionRules": [],
        "cardinalityRules": [],
      "containmentRules": []
   },
   "removestencils": [
      "Subprocess",
      "CollapsedSubprocess",
      "ITSystem",
      "EventSubprocess",
      "CollapsedEventSubprocess",
      "DataStore",
      "Message",
      "StartErrorEvent",
      "StartCompensationEvent",
      "StartParallelMultipleEvent",
      "StartEscalationEvent",
      "IntermediateParallelMultipleEventCatching",
      "IntermediateEscalationEvent",
      "EndEscalationEvent",
      "IntermediateEscalationEventThrowing",
      "EventbasedGateway",
      "InclusiveGateway",
      "ComplexGateway",
      "CollapsedPool",
      "processparticipant",
      "DataObject",
      "StartConditionalEvent",
      "StartSignalEvent",
      "StartTimerEvent",
      "StartMultipleEvent",
      "StartMessageEvent",
      "IntermediateEvent",
      "IntermediateMessageEventCatching",
      "IntermediateMessageEventThrowing",
      "IntermediateErrorEvent",
      "IntermediateCancelEvent",
      "IntermediateCompensationEventCatching",
      "IntermediateCompensationEventThrowing",
      "IntermediateConditionalEvent",
      "IntermediateSignalEventCatching",
      "IntermediateSignalEventThrowing",
      "IntermediateMultipleEventCatching",
      "IntermediateMultipleEventThrowing",
      "IntermediateLinkEventCatching",
      "IntermediateLinkEventThrowing",
      "EndMessageEvent",
      "EndErrorEvent",
      "EndCancelEvent",
      "EndCompensationEvent",
      "EndSignalEvent",
      "EndMultipleEvent",
      "EndTerminateEvent",
      "Association_Unidirectional",
      "Association_Bidirectional",
      "MessageFlow"
   ],
   "removeproperties": []
}

The above is just a quick test to try and add our respository with a single task. When I open the modeler, I appear to have three repositories, the complete, Activiti, and TechDoc, but when the TechDoc repository is clicked, it seems to only show the exact same shape repository for Activiti and not our own. Am I missing something here? Also, I have no log file error or modeler errors that I'm aware of. Sorry I attempted to attach each JSON file but your forum would not allow me.

Outcomes