cancel
Showing results for 
Search instead for 
Did you mean: 

How to run the activiti source code?

balaji1
Champ in-the-making
Champ in-the-making
Hi,

1. We have checked out the source code from SVN and installed in SVN.
Can you please tell us how to build this source code?

ALso what will be the outcome of this process?

2. We have proposed to use activiti plugin for our porject. We need to customise the palette shapes and XML tags. Can you please tell us the process to perform.


Please help us to resolve to above issues. We are badly stuck up here.
294 REPLIES 294

tiesebarrell
Champ in-the-making
Champ in-the-making
You should place a breakpoint in the code that should fork to your marshaller. I don't have the 0.5.0 code here at the moment, but it should be in ActivitiDiagramEditor. There it collects all ExportMarshallers that are active. Your marshaller should be in the list. If it isn't, go from there. Otherwise it should invoke your marshaller.

You're looking at a leftover. The FILENAME_PATTERN used to be used to return a value in the ExportMarshaller#getFilenamePattern() method, so Designer could determine which file to create. That's no longer used, so you don't have to have it. However, I'd consider it a best practice to hold the filename or its pattern in a static member and to just do this:

saveResource(getRelativeURIForDiagram(diagram, FILENAME_PATTERN), bais, this.monitor);

This way you can used placeholders such as ExportMarshaller.PLACEHOLDER_ORIGINAL_FILENAME. The AbstractDiagramWorker class (or in 0.5.0, the AbstractExportMarshaller class) has extensive JavaDoc on this.

balaji1
Champ in-the-making
Champ in-the-making
HI,

IS the validator id value should not be same?

  public static final String MY_VALIDATOR_ID = "ActivitiDesignerBPMNValidator";
  public static final String BPMN_VALIDATOR_ID = "ActivitiDesignerBPMNValidator";

ALso, Now I am getting the file names
When I save (Ctrl + s) -> my_bpmn2_diagram.activiti.bpmn20_new.xml
When I export -> my_bpmn2_diagram.bpmn20_new.xml

But in the Marshall class I specified as

private static final String FILENAME_PATTERN = ExportMarshaller.PLACEHOLDER_ORIGINAL_FILENAME + ".sample_new.xml";

saveResource(getRelativeURIForDiagram(diagram, FILENAME_PATTERN), bais, this.monitor);

THanks
THanks

tiesebarrell
Champ in-the-making
Champ in-the-making
The validator ID should make no difference. If you're writing your own marshaller, you don't HAVE to use a validator. There is a difference between the export and save actions, which is resolved in 0.6.0, so I wouldn't pay too much attention to that. Haven't you changed the format for the default BPMN marshaller? I don't see how it would end up with that filename otherwise.

balaji1
Champ in-the-making
Champ in-the-making
HI,

Till now I was playing only with Acme MArshall class.

Can you please tell which class I need to touch for default file name?
Am bit confused at the moment  :?


Thanks

tiesebarrell
Champ in-the-making
Champ in-the-making
Bpmn20ExportMarshaller

balaji1
Champ in-the-making
Champ in-the-making
HI,
I would want to avoid the call to Bpmn20ExportMarshaller  class.
Since both acme and Bpmn20ExportMarshaller are same. Also we set up extension points to acme.
Why it should refer?

IS anyway possible that my control should go to acme rather Bpmn20ExportMarshaller class.
I already told my objectives to you Smiley Happy

Thanks

tiesebarrell
Champ in-the-making
Champ in-the-making
Just turn off the default BPMN 2.0 marshaller in the preferences and make sure your own one is turned on. Have you tried debugging the ActivitiDiagramEditor class to see why your marshaller isn't invoked?

balaji1
Champ in-the-making
Champ in-the-making
Hi,

Turn off in the sense is disabling the feature in eclipse preference?
Right now the following features in the eclipse

Activiti BPMN 2.0
1. Checked - Automatically save to BPMN2.0
2. Checked - Validate Diagrams before saving

Even I unchecked the above two options. Only difference I see is while pressing control-S XML file is not created.
While exporting still I see the file name as "my_bpmn2_diagram.bpmn20_new.xml"
Thanks

tiesebarrell
Champ in-the-making
Champ in-the-making
Well, I can't tell from here what's going wrong. The only thing I can think of is that Designer hasn't just dreamed up the _new suffix. You must have added it somewhere, so perform a search where it gets that from.

Yes, the preferences are used to turn the marshallers on and off.

balaji1
Champ in-the-making
Champ in-the-making
HI,

1. "_new" change is done in the following class
SaveBpmnModelFeature in activitii.designer.feature package.

2. I changed the XML tag name in BpmnXMLExport class in org.activiti.designer.xml package
The above change are done in designer.gui project.  And the cntrol goes to this project and I could see the output.


But actually I would want my changes in acme class to reflect. Say, XML file name change and Tag customisation.

Any clues where I did wrong?