cancel
Showing results for 
Search instead for 
Did you mean: 

How to add Shape Repository to Modeler?

joeysr20det
Champ in-the-making
Champ in-the-making
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.
4 REPLIES 4

trademak
Star Contributor
Star Contributor
Hi,

The Activiti Modeler is not a component we provide with the Activiti download.
It's best to ask these kind of questions in the Activiti Modeler project user forum.

Best regards,

joeysr20det
Champ in-the-making
Champ in-the-making
Yes I imagined that, but I couldn't find an Activiti Modeler forum. Where is this forum at?

joeysr20det
Champ in-the-making
Champ in-the-making
So it seems as though editing the extension.json files and creating my own json file for my "shapes" seems to work some of the time. It's almost like I'm running into a caching issue with the Modeler; I'm having a hard time getting it to pickup my changes. I've searched everywhere I can think but can't seem to find a cache of any sort if it exists. Does anyone know if there is a cache for the Modeler and where I might find one?

joeysr20det
Champ in-the-making
Champ in-the-making
I just wanted to reply back in case someone else has this problem. My above described method of adding a repository and then my shapes does seem to work. The issue I was encountering was indeed caching. After searching most of my machine for a Modeler cache, I remembered how bad Firefox can be about caching. Sure enough, I went into Firefox and clear my cache and my issue was resolve. Firefox was indeed caching the extensions.json and my json file describing my shapes, attributes, etc.