>a) return all the workflow_instance_ids that have the same
workflow_definition_name ?

<process-definition>
 <sequence>
     <set field="is_empty" value="${field:is_empty}"/>
     <case>
           <equals filed="is_empty" other_value="yes"/>
           <subprocess ref="a"/>
           <subprocess ref="b"/>
     </case>
 </sequence>
 <process-definition name="a">
       <participant ref="a"/>
 </process-definition>
 <process-definition name="b"/>
       <participant ref="b"/>
 </process-definition>
</process-definition>

the definition with different name

>return workflow_instances.uniq
to gets the different instance id

then

ArWorkitem.find(:all,:conditions => ["wfid in
(?)",get_histoy(expression,workflow_instances = [])])

gets all workitems of one subprocess hava applied,
use HistoryEntry has to sort by the column "fei",it is a long string ^_^

>b) return the list of subprocess instances for a given main process
instance ?
right

is there other way to get the history?
2009/9/13 John Mettraux <[email protected]>

>
> 2009/9/13 Neo <[email protected]>:
> >
> > i wrote it like this
> >
> > expression = RuotePlugin.ruote_engine.get_expool.fetch_root(one_wfid)
> >
> > def get_histoy(expression,workflow_instances = [])
> >     current_fei = expression.fei
> >     workflow_instacnes << current_fei.workflow_instance_id
> >
> >     if current_fei.workflow_definition_name == "some_definition"
> >         return workflow_instances.uniq
> >   else
> >         get_histoy(expression.get_parent,workflow_instances)
> >   end
> > end
>
> Hi Neo,
>
> so your are taking the root expression of the process instance "one_wfid".
>
> Please not that this root expression has no parent expression (since
> it's a root).
>
> Are you trying to ?
>
> a) return all the workflow_instance_ids that have the same
> workflow_definition_name ?
> b) return the list of subprocess instances for a given main process
> instance ?
>
> ?
>
> I was confused by your question because in ruote-web and ruote-rest,
> there is a resource called "history", available under /history that
> details what happened to process and subprocess instances.
>
>
> Best regards,
>
> --
> John Mettraux   -   http://jmettraux.wordpress.com
>
> >
>


-- 
明天会更好

--~--~---------~--~----~------------~-------~--~----~
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to