[jboss-user] [JBoss jBPM] - What we did: Flexible IN-Parameters for Nodes

Vorsorge do-not-reply at jboss.com
Wed Aug 22 05:44:07 EDT 2007


Hi,

we just started using Jbpm in our productive environment in a smaller insurance company. Our aim for the coming years is to use jBPM as the base for our business process server for all our business processes.

How far we can go this way depends on many things. 

But when we started we discovered some things missing in Jbpm where we found our own solutions for. I want to tell you about this and hope for reactions in the range of "jBPM already can do this. Just RTFM, stupid!" to "Nice, but I have some ideas how you could improve this" and "Oh, that's greeat. Tell me more".

Our aim:
Maximaze the reusability of nodes for the business analyst. 

Consequence:
We need a way to configure IN-Parameters of nodes.

Example:
A node which reads some data from a database might be used in different processes slightly differently:
a) Give me all data younger than the processVariable "letterRecieved"
b) Give me all data younger than 01.02.2007
c) Give me all data from the last two weeks.

In this case all we have to do is to give the date to a SQL-Statment but it comes from different sources.
In a) the source is a process variable, in b) it's a constant value and in c) it's the result of a computation.


What we did:
We are using the configuration mechanism of Jbpm to insert Strings in a special formatted way.

For a) this would be in jPDL:


  | <action class="abcActionHandler.AbcHandler">
  | 	<selectDate>
  | 		IN;VAR;Date;letterRecieved
  | 	</selectDate>
  | </action>


For b)
<action class="abcActionHandler.AbcHandler">
  | 	<selectDate>
  | 		IN;CONST;Date;01.02.2007
  | 	</selectDate>
  | </action>


For c)
<action class="abcActionHandler.AbcHandler">
  | 	<selectDate>
  | 		IN;FUNC;functionClass
  | 	</selectDate>
  | </action>


Our handler would need a selectDate class variable.

At runtime the value of this variable would be parsed. Depending on the second parameter {VAR; CONST; FUNC} the needed date 
would be computed and used.
a) From the process variable "letterRecieved" with type Date
b) The constant value 01.02.2007 would be parsed to Date.
c) An instance of funcionClass would be instantiated which is able to compute the needed Date.


Depending on the reactions to this posting maybe I will post more.

Regards,
Martin


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076703#4076703

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4076703



More information about the jboss-user mailing list