cancel
Showing results for 
Search instead for 
Did you mean: 

Own templates for new diagrams

christianelmer
Champ in-the-making
Champ in-the-making
Hi,

Can I create my own templates at the "New Activiti Diagram" dialog or how I use the "Yes, import a BPMN 2.0 file"?

Thanks,
Christian
5 REPLIES 5

trademak
Star Contributor
Star Contributor
Hi Christian,

I didn't yet open it up to add new templates, but that shouldn't be too difficult to add.
The import a BPMN 2.0 file still has to be implemented, so that's for a next release.

Best regards,

tiesebarrell
Champ in-the-making
Champ in-the-making
I'd like to look into this feature as it's been on my list for some time. I'm curious how Christian would like to see this implemented. There are a couple of ways I can think of:

* Create a new project type especially for templates. You can create regular processes in that project using Designer's current editing capabilities and save them. Once you wish to base a new process on one of your own templates, we simply scan all of these projects in order to find your templates. A benefit of this approach is that it stores the templates separately from any other projects you have and that you can then easily store the templates to a version control system as any other projects;

* Create a classpath container and reference it in a way similar to have you develop Custom Service Tasks. That would involve packaging your templates in a JAR and then linking that jar in your Eclipse preferences. To me this seems rather tedious;

In both cases, I would think the way Tijs has already implemented this, namely using the bpmn20.xml as the template and not the .activiti file, is the way to go.

Another question I have is how far we take a template. I could imagine we allow you enter variable placeholders in your bpmn20.xml and then offer a wizard to provide values for those variables in a wizard. For instance, you could specify something like the assignee of the first task in your template by filling the value with ${designer:FirstTaskAssignee}. The template will be parsed for these kind of expressions and you would be asked to provide values for them before the content is created.

I'd welcome some input on this so we can figure out what users are looking for.

christianelmer
Champ in-the-making
Champ in-the-making
* Create a classpath container and reference it in a way similar to have you develop Custom Service Tasks. That would involve packaging your templates in a JAR and then linking that jar in your Eclipse preferences. To me this seems rather tedious;
This is a good idea. If you create Custom Service Tasks, most of the time I think, you want to use this in a certain way, so in similar diagrams.

Another question I have is how far we take a template. I could imagine we allow you enter variable placeholders in your bpmn20.xml and then offer a wizard to provide values for those variables in a wizard. For instance, you could specify something like the assignee of the first task in your template by filling the value with ${designer:FirstTaskAssignee}. The template will be parsed for these kind of expressions and you would be asked to provide values for them before the content is created.

It was great, if you group some Custom Service Tasks and give the user a chance to select a task from this group at a placeholder. The best solution for me is, that the user select only one of many Delegation Classes of a Custom Service Task. Because I have spots in my process diagrams in which I place one of many Custom Service Tasks that do the same things, with other algorithms.

tiesebarrell
Champ in-the-making
Champ in-the-making
Christian,

I agree that might be the case, but don't think the template mechanism would apply to Custom Service Tasks as well, since the BPMN file is the template file itself and the BPMN file has no knowledge of Custom Service Tasks, because that is a designer-specific extension. So you wouldn't be able to make a template for processes that contain CustomServiceTasks. Joining them in a JAR with the Custom Service Tasks in that case would make less sense to me.

I was thinking more along the lines of simple text entry to start with for placeholders, but I see you have a different use case. Again, at the moment I don't see how we can integrate Custom Service Tasks in the templates at all, but I'll look into it.

jdf1963
Champ in-the-making
Champ in-the-making
Was the feature to add your own diagram template ever implemented?

Thanks,
Don