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
Tiese,
Thanks for your stepwise explanation.
Use classes in the PropertySection classes in the activiti gui project -> you want extra fields, so now you can use them

Can you please provide more specific class names. May be in depth where I need to change to add/replace properties
to manual task or any other task.

Thanks

tiesebarrell
Champ in-the-making
Champ in-the-making
I see the problem. Apparently, the manual task doesn't have its own section at the moment, only the default section is included. You need to copy these classes:

1) Copy org.activiti.designer.property.PropertyBpmnFilter to org.activiti.designer.property.PropertyManualTaskFilter
2) Copy org.activiti.designer.property.PropertyBpmnSection to org.activiti.designer.property.PropertyManualTaskSection

In the new filter class, change
if (bo instanceof FlowElement) {
to
if (bo instanceof ManualTask) {

In the new section class, edit code at will to create controls for your fields, fill the values and persist to the model by, for instance, using the same mechanism we use with a FocusListener.

Now, you need to add an entry to the plugin.xml file. FInd the part where the extensions to this point are: org.eclipse.ui.views.properties.tabbed.propertySections. Copy one of those propertySection blocks and adjust them so you have this:

<propertySection
               class="org.activiti.designer.property.PropertyManualTaskSection"
               filter="org.activiti.designer.property.PropertyManualTaskFilter"
               id="org.activiti.designer.propertyTab.manualtask"
               tab="org.activiti.designer.propertyTab">
         </propertySection>

balaji1
Champ in-the-making
Champ in-the-making
Tiese,
Now I narrate the changes done modify/add the Manual Task.

1. From the ecore diagram
ManualTask->Task
I just right clicked at ExtendedMetaData and seletcted NewChild->DetailsEntry and following entry have created
Test->BaseElement
2. Gen Model is created and java code is generated.
3. Copied org.activiti.designer.property.PropertyBpmnFilter to org.activiti.designer.property.PropertyManualTaskFilter
Copied org.activiti.designer.property.PropertyBpmnSection to org.activiti.designer.property.PropertyManualTaskSection
4. if (bo instanceof ManualTask) instead of FlowTask in Filter
5. In SEction class, Jus I renamed id and name to myname and myid.

    CLabel idLabel = factory.createCLabel(composite, "MyId:", SWT.WRAP);
    CLabel valueLabel = factory.createCLabel(composite, "MyName:", SWT.WRAP);

6. <propertySection
class="org.activiti.designer.property.PropertyManualTaskSection"
filter="org.activiti.designer.property.PropertyManualTaskFilter"
id="org.activiti.designer.propertyTab.manualtask"
tab="org.activiti.designer.propertyTab">
</propertySection>

Added the above snippet in org.eclipse.ui.views.properties.tabbed.propertySections.

7. Then I cleaned the projects.

But to my surprise nothing has happened Smiley SadSmiley Sad .  My motive to the manual task is either to add/modify any properties to this.

But I am failing terribly.

Please tell us am I going at the right steps.

tiesebarrell
Champ in-the-making
Champ in-the-making
You haven't changed anything other than the name on the labels. factory.createCLabel(composite, "MyId:", SWT.WRAP); Just creates a label with "MyId:" displayed as text in the label.

Have you copied the changed code from the generated projects to the model project?

balaji1
Champ in-the-making
Champ in-the-making
Tiese.

After I changed ecore and generated genmodel. I chose bpmn2 from genmodel and  selected the menu option "generate model code". For me there is no seperate project created.  I thougt it will be replaced with existing model project.

Thanks

tiesebarrell
Champ in-the-making
Champ in-the-making
It should create a new project or overwrite the current one. It's a different project than our model project, that's why you need to copy stuff. If it's not generating the project, there's probably something wrong with your EMF setup

balaji1
Champ in-the-making
Champ in-the-making
Tiese,
Actually in what wat way the necessity  to change the models  to  add/modify the properties of a task.
Because ultimately we are doing code change  in classes. Please clarify.

tiesebarrell
Champ in-the-making
Champ in-the-making
Didn't I explain that before? If you want to add properties to a node that is not a ServiceTask, but you don't want to create a CustomServiceTask, you will have to extend the model.

balaji1
Champ in-the-making
Champ in-the-making
Tiese,

It is mentioned in the user guide
If you extend Activiti Designer with this shape, The palette and corresponding node will look like this:

Can you please tell how to work this process. We created acmemoney clss.

Thanks

tiesebarrell
Champ in-the-making
Champ in-the-making
What process do you mean? After you create the class, you install the jar, add it to the Activiti Designer Extensions user library in Eclipse's preferences and then open a diagram.