On Thu, Jun 07, 2012 at 09:10:43AM -0700, Klaus Schmidtmamn wrote:
>
> it's me again! Is there a simple way, to get the sub-process-id and
> all subprocess-variables by a given Process-Instance-ID within a ruby
> class (e.g. my Workflow-Controller)?

Hello Klaus,

a process instance id (wfid) points to a process instance, it doesn't point
to a subprocess, so it's not possible.

If you're interested in process variables and assuming you know the process
id (wfid):

---8<---
ps = $ruote_dashboard.ps(wfid)

p ps.variables
  # print variables at the root [expression] of the process
p ps.all_variables
  # print variables found in all expressions of the process
p ps.expressions.collect { |e| e.fei.to_storage_id }
  # print list of (string representations of) expressions
--->8---

Here is a list of the methods supported by ProcessStatus (whose instance are
returned by Ruote::Dashboard#ps(wfid)

  def root_expressions
  def root_expression_for(fei)
  def variables
  def all_variables
  def tags
  def all_tags
  def past_tags
  def wfid
  def definition_name
  def definition_revision
  def position
  def leaves
  def root_workitem
  def workitems
  def last_active
  def original_tree
  def launched_time
  def to_s
  def hinspect(indent, h)
  def inspect
  def to_dot(opts={})
  def to_h
  def current_tree

I hope this will help anyway.


Best regards,

--
John Mettraux - http://lambda.io/jmettraux

-- 
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