cancel
Showing results for 
Search instead for 
Did you mean: 

Custom form components

edufrazao
Champ on-the-rise
Champ on-the-rise
Hi folks. I'm new to Activiti and, with BPMN itself.
I'm working on a project that is intended to deploy process more dinamically as possible.

To do that, I'm working on a Form Generator, to build more complex form components automatically. We will use a generic persistence model. I'm even thinking in store form data using Activiti.

I will need to build components like ComboBox'es, for example, that will be filled with database information. (And another more complex types).

I've seen that BPMN xml allows extension, and Activiti uses it to declare form fields on tasks. My question is: Can I add my custom extension tags? The EclipseEditor will overwrite in any moment? Is that the best approach to reach this result?

Thanks!
7 REPLIES 7

edufrazao
Champ on-the-rise
Champ on-the-rise
Only to inform: I'm not using activiti explorer, and I have not intention to extend the activi designer. For now, I will do changes manually on source, and I will render the forms on my client application.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

You can use extension elements to store form info. (I would prefer another approach - just to reference form definition from process definition.)
If you want to see how we cope with this problem -https://www.edorasware.com/edoras/one.html

Regards
Martin

Hi Martin. Thank you very mutch for your response. Congratulations for your Edoras products. Edoras One appears to be a very easy to use application, and is beautiful Smiley Happy.

My intention is to build a software as dynamic as Edoras One. My intention is to customize Activity web process designer. For now, we will use the Eclipse IDE plugin, and upload process on the application. I'm sorry, but I cannot found on Edoras One, how you store your form information about the process. It is a separate XML files, with references to UserTask's, or it embbed on the same XML, pointing to it? The form designer, that is present on your software, is a proprietary internal component, or it is a free tool?

Do you have any example on how you store the form information?
Thanks again.

Martin, i'm implementing the form description in this way:

<blockcode>
<extensionElements>
      <f:forms xmlns:f="http://www.davinti.com.br/virtruvio-form-schema">
        <f:form formKey="start" width="100%">
          <name>Personal info</name>
          <description>Personal Info collect form</description>
          <verticalLayout spacing="true" margin="true">
           <horizontalLayout spacing="true">
            <numericfield id="id" caption="Id" required="false" type="number" />
            <datefield id="birthDate" caption="Birth date" required="true" type="date"/>
           </horizontalLayout>
            <horizontalLayout width="100%" spacing="true">
              <textfield id="name" width="100%" required="true" caption="Name" type="string" expandRatio="0.35" />
              <textfield id="surename" width="100%" required="true" caption="Last name" type="string" expandRatio="1.00" />
            </horizontalLayout>
            <textarea id="observacao" caption="Observações" width="100%" rows="5" type="string" />
          </verticalLayout>
        </f:form>
      </f:forms>
    </extensionElements>
</blockcode>

Behind that, I build a form / layout / field generation API. Now, I need to take some decisions about right persistence for my scenario.

This is a screenshot of the generated form (with basic elements for now).

[IMG]http://i.imgur.com/iOD8foD.png[/IMG]

There very simple layout rules, because this view can be rendered in another devices, etc.

Thanks for your help.

jbarrez
Star Contributor
Star Contributor
Any reason why you'd want this inside your process xml? Wouldn't it be easier if this was an external form and you reference it using the activiti:formKey attribute?

edufrazao
Champ on-the-rise
Champ on-the-rise
Thanks for your tip @jbarrez. I've removed it from the process. This will be mutch better for maintenance, in a near future. Changing a simple label in the form will cause a redeploy of the process. I was going on a dangerous path Smiley Happy.

edufrazao
Champ on-the-rise
Champ on-the-rise
In fact, it can be anywhere, but I think that it made the deployment easy, using a single unit, as Activity default form properties do.
Do you recommend to upload in separate files, in a Business Archive?