[rules-users] Drools SubFlow (Sub -Process) query API

bdoshi bhadresh.doshi at fnis.com
Mon Jul 13 10:28:58 EDT 2009


Thanks Kris,

But, I do not see method to access SubProcessNodeInstance from process
instance...

I am getting ProcessInstance as follows and I see only following getters....

ProcessInstance pi = ksession.getProcessInstance(111);
			pi.getClass()
			pi.getEventTypes()
			pi.getId()
			pi.getProcessId()
			pi.getProcessName()
			pi.getState()


Am I missing something... Can you point to sample code?

Thanks,



Kris Verlaenen wrote:
> 
> There is no one method API to do this at this point.  However, if you
> have a process instance that is waiting for a sub-process to complete,
> there always is a SubProcessNodeInstance as part of the parent process
> instance that contains the info you need.
> 
> So what you could do is iterate over the node instances of the parent
> process instance using WorkflowProcessInstance.getNodeInstances() and
> retrieve the information you need using
> SubProcessNodeInstance.getProcessInstanceId().
> 
> You can probably implement this as a utility method that simply uses the
> existing API.
> 
> Kris
> 
> Quoting bdoshi <bhadresh.doshi at fnis.com>:
> 
>> 
>> Hi,
>> 
>> I am new to drools and have following scenario and question.
>> 
>> Consider my main flow "A" (runtime instance id 111) which has and
>> invokes
>> (subprocess)SubFlow "B" (runtime instance id 222).
>> 
>> Question,
>> Is there an API to find the list of subprocess (subflow) associated
>> with
>> parent instance or parent process associated with a given
>> subprocess?
>> 
>> e.g. in above case... From process instance 111 can we get handle or
>> information of 222 
>> or
>> 
>> form process instance 222, can I get information of parent who
>> created this
>> instance (111).
>> 
>> Thanks,
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/Drools-SubFlow-%28Sub--Process%29-query-API-tp24434397p24434397.html
>> Sent from the drools - user mailing list archive at Nabble.com.
>> 
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>> 
> 
> 
> 
> 
> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 
> 

-- 
View this message in context: http://www.nabble.com/Drools-SubFlow-%28Sub--Process%29-query-API-tp24434397p24462813.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list