[jboss-user] [JBoss jBPM] - Feature Request - Task Properties

simonbaker do-not-reply at jboss.com
Tue Oct 9 21:17:11 EDT 2007


I dont know if this is already possible; if so, I'd appreciate advice.

More and more we find we have a need for "task properties" that are definable in the Task element in the processdefinition.xml file and retrievable from a Task object.  For instance, it would be useful to put:


  |    <task-node name="Record Officer - Check Expiration">
  |       <task name="Record Officer - Check Expiration" blocking="true">
  |          <assignment class="MyAssignmentClass">
  |             <currentStep>Record Officer - Check Expiration</currentStep>
  |             <Role>Record Officer</Role>
  |          </assignment>
  |          <properties class="MyPropertiesClass"
  |            <managerRole>Manager</managerRole>
  |            <maxDurationDays>5</maxDurationDays>
  |            <expirationEmail>joe at company.com</expirationEmail>
  |            <helpPhone>555-555-5555</helpPhone>
  |          </properties>
  |       </task>
  |       <transition name="Done" to="Decide if Record Officer Complete"></transition>
  |    </task-node>
  | 

The <properties> element is the proposed new feature.

This would then allow:

  | TaskInstance taskinst = ...
  | 
  | MyPropertiesClass taskProps =
  |   (MyPropertiesClass)  taskinst.getTask().getProperties();
  | 
  | if (elapsedDays > taskProps.maxDurationDays)
  | { 
  |   sendEmail(taskProps.expirationEmail, "Overdue!");
  |   // etc.
  | }
  | 

Essentially, JBPM would use reflection to set the members of the MyPropertiesClass object which would be stored in an Object member of the Task and retrieved with the getter "Task.getProperties()", similar to other delegation object initializations.  It would be required that MyPropertiesClass be  serializable for storing by Hibernate.  Perhaps a HashMap could be a default "properties" object.

Is anyone interested in such a feature, or is it already possible?


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

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



More information about the jboss-user mailing list