JBoss Community

Re: Process Instance Variable within WorkItemHandler

created by Amin MC in jBPM - View the full discussion

Hi Mauricio,

 

Thanks for your reply.  I'll give more info behind what I am trying to do.  I have an object model which looks something like this:

 

Class A

   String id

  Set<ClassB> data --> ClassB String name, String value

 

 

In my flow we create Class A and a collection of ClassB but in the process variable we store the reference as opposed to the serialised version of ClassA (there is already persistence behind ClassA).

 

I now have a domain specific work item handler which is registered in eclipse and has a set of properties which a user can define.  These properties can be statically defined or they can use an expression based approach for example

 

Name: ClassA(variableName defined in flow).elementName + ':'  + ClassA(variableName defined in flow).reference

 

The idea is then to load ClassA id via variableName and then get the value of elementName and reference which are stored in ClassA object model. I have a small ANTLR program that parses the string and then looks up the data.  The ANTLR parser uses session.getProcessInstance(..) to load the relevant data and I was hoping to load the process and get the value out, although it probably is possible to pass the work item parameter mapping to my parser.     

 

Hope this made sense!

 

Cheers

Reply to this message by going to Community

Start a new discussion in jBPM at Community