lib/openwfe/expressions/fe_subprocess.rb in openwferu-0.9.12 vs lib/openwfe/expressions/fe_subprocess.rb in openwferu-0.9.12.863
- old
+ new
@@ -28,21 +28,17 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#++
#
-# $Id: definitions.rb 2725 2006-06-02 13:26:32Z jmettraux $
-#
#
# "made in Japan"
#
# John Mettraux at openwfe.org
#
-#require 'uri'
-
require 'openwfe/utils'
module OpenWFE
@@ -85,27 +81,21 @@
ref = lookup_ref(workitem)
raise "'subprocess' expression misses a 'ref', 'field-ref' or 'variable-ref' attribute" unless ref
- template_uri = parse_uri(ref)
+ template_uri = OpenWFE::parse_known_uri(ref)
- template = if template_uri
- template_uri
- else
- lookup_variable(ref)
- end
+ template = template_uri || lookup_variable(ref)
- #template_fei = lookup_participant(ref) if not template_fei
-
raise "did not find any subprocess named '#{ref}'" \
if not template
forget = lookup_boolean_attribute(:forget, workitem)
requester = @fei
- requester = @fei.workflowInstanceId if forget
+ requester = @fei.workflow_instance_id if forget
params = lookup_attributes(workitem)
text = fetch_text_content(workitem, false)
params["0"] = text if text
@@ -118,25 +108,9 @@
requester, get_next_sub_id, template, workitem, params)
end
#def reply (workitem)
#end
-
- protected
-
- def parse_uri (ref)
-
- uri = OpenWFE::parse_uri(ref)
-
- return nil unless uri
-
- return uri if uri.scheme == "http"
- return uri if uri.scheme == "https"
- return uri if uri.scheme == "ftp"
- # what else ...
-
- return nil
- end
end
end