Re: Wait for User Input

 
 
Ari Nordström
Senior Consultant 
Condesign Operations Support AB
Phone +46 31 744 17 91
Mobile +46 736 000 333
Email ari.nordstrom@condesign.se 
>>> Romain Deltour rdeltour@gmail.com> 16/05/2013 09:12 >> (
mailto:rdeltour@gmail.com )
Could you please report any results of further experiments ?

 
After a busy few weeks, I finally had time for this again. I tested the
below, just now, and it seems to work, more or less. The $href provides
the XForm URL to the p:exec that simply runs a browser with it. The
XForm includes a save of its result to the file system but right now I
need to close the browser before the pipeline knows it is OK to move
on.
 
Pretty cool. :-)
 
 
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step 
    xmlns:p="http://www.w3.org/ns/xproc"
    xmlns:c="http://www.w3.org/ns/xproc-step"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:cx="http://xmlcalabash.com/ns/extensions"
    name="main"
    version="1.0">
    
    ...
    
    <p:option name="href" required="true"/>
    
    ...    
    
    
    <!-- ProX Blueprint in Browser -->
    <p:exec 
        name="browse" 
        command="C:\Program Files (x86)\Mozilla Firefox\firefox.exe">
        <p:input port="source">
            <p:empty/>
        </p:input>
        <p:with-option name="args" select="$href"/>
    </p:exec>
    
    <p:sink/>
    
    <p:choose name="err-handle">
        <p:xpath-context>
            <p:pipe step="browse" port="errors"/>
        </p:xpath-context>
        <p:when test="/c:result[string-length(.) > 0]">
            <p:identity>
                <p:input port="source">
                    <p:inline><success/></p:inline>
                </p:input>
            </p:identity>
        </p:when>
        <p:otherwise>
            <p:identity>
                <p:input port="source">
                    <p:inline><failure/></p:inline>
                </p:input>
            </p:identity>
        </p:otherwise>
    </p:choose>
    
    <p:identity name="browse-errors"/>
    
    ...
    
</p:declare-step>


This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete
the original.  Any other use of the email by you is prohibited.
 
Condesign AB, 556255-8313, säte Göteborg; Condesign Automation AB,
556271-3676, säte Göteborg; Condesign Engineering AB, 556469-2092 säte
Göteborg; Condesign Infocom AB, 556453-7172, säte Ljungby; Condesign
InfoProductions AB, 556385-4255, säte Linköping; Condesign Operations
Support AB, 556307-1231, säte Göteborg.
 

Received on Tuesday, 25 June 2013 07:22:26 UTC