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

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

Also, DO we need to really care about the Model project (especially  ecore files inside model folder) to update or to
add a new property to the existing tasks.

Thanks

tiesebarrell
Champ in-the-making
Champ in-the-making
Balaji,

yes, if you *need* to add to the default tasks, you will need to add these properties to the model in order to have them persisted. I would strongly advise AGAINST that though, if you don't know what you're doing. It is a fragile approach, will cost you a lot of time hunting mysterious bugs and most importantly, will probably result in more work each time we update the core of Designer.

If you're looking for custom properties on custom nodes, you should look into creating CustomServiceTasks: http://activiti.org/userguide/index.html#N1149F

Otherwise, if you need to retain other than simple values from existing nodes, such as service tasks, with that handy dandy class selector which you can't re-create with a custom service task, I would extend the property section for THAT node, not the model, and use CustomProperty elements, which are in the model by default. That way you don't have to CHANGE the model project, but you can still use its extensibility.

balaji1
Champ in-the-making
Champ in-the-making
Tiese.
Actually we are trying to identify how the properties get set for MAnual task.
and we understand that the below code does it.

newManualTask.setId(getNextId());
newManualTask.setName("Manual Task");

When we go through the GetNExtid function

protected String getNextId() {
    return ActivitiUiUtil.getNextId(getFeatureClass(), getFeatureIdKey(), getDiagram());
  }


We just want to know. How the id value is set for this task. After this approach, We will try to add our own properties
for this task or try to modify the existing task. What is the steps needs to be followed.
——-
2. Will the same approach followed to change the properties for other tasks also. Also, Can you please elaborate
on the concepts of filters in the model project. Also in the above thread u told us about service tasks extension.
I couldnt pick up the point. Can you please explain  this also.

balaji1
Champ in-the-making
Champ in-the-making
Tiese,
Can you please rply to the above question asap?

Thanks

tiesebarrell
Champ in-the-making
Champ in-the-making
By invoking ActivitiUiUtil.getNextId(getFeatureClass(), getFeatureIdKey(), getDiagram()); That returns a new ID.

To add properties to this node, you will have to edit the model project, because it doesn't have CustomProperty elements. Add the elements, regenerate the code, then use them in the same way they are used in the code you mentioned above.

You should follow the same approach for other nodes.

Which filters in the model project do you mean? We have filters in the gui project and they are used to enable or disable showing a property section for a certain node in the process based on the selected node.

Everything there is to know about CustomServiceTasks is in the userguide.

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

Can you please provide the steps to play with models and generation of java code. Please help us.

Because Yesterday I added some attributes to Manual Task and generated java code. But I ended up
with errors and not able to launch the eclipse. 

——-

Can you please provide some example for customproperty elements in the source and how it was achieved?

THanks

tiesebarrell
Champ in-the-making
Champ in-the-making
Unfortunately, I don't have the time to walk you through this. I will point out though, that you should edit the model/BPMN20.ecore files and NOT the one in src/main/resources. After editing that, run a generation and manually copy the classes you have affected to the model project. Ignore the errors in the generated projects. It's the model project you need to be correct. For any change, you will also need to copy the Bpmn2Factory and Bpmn2Package classes, in both the interface and implementation packages. Also, you should copy the ecore file to the src/main/resources folder to replace the one there. It takes a bit of fiddling which is hard to explain without going into all kinds of details.

Examples are in the PropertyCustomServiceTaskSection class.

balaji1
Champ in-the-making
Champ in-the-making
HI,
One Quick Question

For any change, you will also need to copy the Bpmn2Factory and Bpmn2Package classes, in both the interface and implementation packages

By the above process is there any changes expected in the above class?

————————-

2. Also in src/Main/resource bpmn2.ecore is not available. It is available inside org.eclipse.bpmn2.impl package.
In the model/BPMN20.ecore is available. Basically file names are differing?




THanks

tiesebarrell
Champ in-the-making
Champ in-the-making
If you change the EMF model, yes. Especially if you add stuff. There will be new methods to create the new elements because it's a factory

Yes, I meant the one in that package. The point is that you shouldn't edit the model with that file, but you should replace it with the one that gets generated when you generate based on the model/BPMN20.ecore file.

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

In the ManualTask->Task

I just right clicked at ExtendedMetaData and seletcted NewChild->DetailsEntry and following
entry is created Null->null. What does it exactly mean?
What key value should be passed to the above entry. Because of this entry DO I need perform any other changes to the classes
or simply I can proceed with u r steps.

Thanks