[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Integrating Activiti Forms  XML
Forum Index -> Development
Author Message
jseitter



Joined: 09/11/2011 07:57:52
Messages: 3
Offline

Hallo everybody,

are there any experiences/best practices on integration Activiti Forms with CaptainCasa.
e.g storing the Form XML as String pro's con's etc ? How to do the varibale binding to controls ?

Thanks for any hints
joerg
hilka

Power User

Joined: 23/11/2007 09:00:08
Messages: 191
Offline

Hello Jörg,

do you really mean Activiti, the open source bpmn 2.0 process engine?

We use the Activiti engine in our product, but we use our own form definition and reference the name of the form in the process.

The form itself contains of fields which are also configured in our system. The form definition is dynamically rendered (using ROWDYNAMICCONTENT). The binding to the process variables is done using a map in the backing bean. The map is filled using the process variables when entering the user task. The user edits the data in the form (which changes the variables of the map in the backing bean). When the user clicks next, we take the variable map of the backing bean and put it in the process engine as process variables.


Tobias
jseitter



Joined: 09/11/2011 07:57:52
Messages: 3
Offline

Hi Tobias,

thanks for your reply.
yes, I meant Activiti BPMN and the forms within a task.
So do I get it right: you're form description is custom XML and you convert it into
a Page by having a generic Page with ROWDYNAMICCONTENT ?

So viewing a Task will then open always the same Page, right ?

kind regards
joerg



hilka

Power User

Joined: 23/11/2007 09:00:08
Messages: 191
Offline

Hi Jörg,

here a very simple form example:
<?xml version="1.0" encoding="UTF-8"?>
<form name="CardForm" layout="simple">
<description>Edit Card Data</description>
<panel id="1" name="First Panel" colspan="1" newline="false">
<group textid="Person" colspan="1" newline="true">
<field name="FirstName" colspan="1" newline="true" datapool="Card" editstatus="1" required="false" unique="false"/>
<field name="LastName" colspan="1" newline="true" datapool="Card" editstatus="1" required="false" unique="false"/>
<field name="BirthDate" colspan="1" newline="true" datapool="Card" editstatus="1" required="false" unique="false"/>
</group>
</panel>
</form>

We have some structural elements like panel or group and have some input controls like field.

We take this definition and convert it to a component tree on server side which will be put in the rowdynamiccontent.
The backing bean is an instance of some generic bean which knows how to construct the component tree out of our form definition and which knows how to handle the values map.

The backing bean is constructed in a subdispatcher of the root dispatcher to make sure we get a fresh instance every time a task is opened.

The reason we did not use the activiti form definition was that we wanted to be free to add our own feature (like searching the database by clicking a button and automatically filling the fields in the form using the result of the search operation).

Tobias
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team