Accessing multiple Automator variables in a Run Applescript action

I have an Automator app set up with 4 variables feeding into a Run Shell Script with the following code. And it runs perfectly.
/Applications/Adobe\ After\ Effects\ CC/aerender -sound ON -project $1 -comp "$2" -output $3/$4
However, I need to be able to see the progress of the Script while it processes in the Terminal window. So, I'm setting up a Run AppleScript to tell Terminal to run the script, but I'm getting two problems.
code:
on run {input, parameters}
          set aVar to item 1 of input
          set bVar to item 2 of input
          set cVar to item 3 of input
          set dVar to item 4 of input
          tell application "Terminal"
  activate
                    do script "/Applications/Adobe\ After\ Effects\ CC/aerender -sound ON -project aVar -comp \"bVar\" -output cVar/dVar"
          end tell
end run
Problem 1--Either my syntax or method of setting the 4 variables to access the array of 4 input variables is wrong. And I don't know enough about AppleScript to figure it out.
Problem 2-- AppleScript really doesn't like the spaces in "Adobe\ After\ Effects\ CC" even though the Terminal has no problem with it. But it errors out before it even gets to Terminal.
Any help that anyone can give will be greatly appreciated.

The backslash is also used as the escape character in an AppleScript string, so to actually get the character you need to escape it (you can also use the term quoted form of to let AppleScript figure out how to quote the string).  To use the variables, you need to use the concatentation operator to mix the variables and text pieces - by putting a variable inside the string the identifier just becomes text.
Your string should look something like:
"/Applications/Adobe\\ After\\ Effects\\ CC/aerender -sound ON -project " & aVar & " -comp " & bVar & " -output " & cVar & "/" & dVar
or perhaps
quoted form of "/Applications/Adobe After Effects CC/aerender" & " -sound ON -project " & aVar & " -comp " & bVar & " -output " & quoted form of (cVar & "/" & dVar)

Similar Messages

  • Chaining "Get Value of Variable" and "Run AppleScript" actions in Automator

    I'm attempting to access a variable I've set in Automator from within a "Run AppleScript Action". On occasion, generally when I start in a fresh new file, I can chain the "Get Value of Variable" action with the "Run AppleScript" action as you would expect.
    Most times, though, they will not chain together. I haven't specified that the "Run AppleScript" action should ignore input, but it behaves that way. I've tried everything I can think of, but I'm out of ideas.
    Am I going about this all wrong? (Thanks in advance for any suggestions!)
    Message was edited by: rch_nashville (for clarity)

    The *Get Value of Variable* action is another quirky one. I'm not sure what causes it to fail, but sometimes putting another (dummy) action in between gets it to work. You can also access workflow variables directly from the Run AppleScript action, so you might also give that a try:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 680px;
    color: #000000;
    background-color: #B5FF6C;
    overflow: auto;"
    title="this text can be pasted into an Automator 'Run AppleScript' action">
    on run {input, parameters} -- get values of workflow variables
    set output to {}
    set theVariables to the name of variables of front workflow
    if the result is not {} then
    set theVariables to (choose from list theVariables with multiple selections allowed and empty selection allowed)
    if result is false then error -128 -- cancel
    repeat with someVariable in theVariables
    set the end of the output to (get value of variable someVariable of front workflow)
    end repeat
    end if
    return output
    end run
    </pre>

  • Set Mail Signature with Run AppleScript Action inside an Automator workflow

    Hello,
    Not sure if I am posting this at the right spot, but I would need some assistance. I am trying to write an Automator Workflow application. The purpose for this application is to:
    1. Drag one or more attachments on the application/droplet icon
    2. Automator workflow creates a new mail message in Mail with the attached items already addressed and ready to go to
    I setup the following Workflow inside Automator:
    1. New Mail Message
    2. Add Attachments to Front Message
    So this is all working just fine. Now I would like to add a step in between of type "Run AppleScript". In this "Run AppleScript" action I have the following code:
    on run {input, parameters}
    tell application "Mail"
    set the message signature of input to signature "My Signature Name"
    end tell
    return input
    end run
    So my workflow looks now like this:
    1. New Mail Message
    2. Run AppleScript
    3. Add Attachments to Front Message
    I am getting the following error:
    Can’t make «class situ» "My Signature Name" of application "Mail" into the expected type.
    So, in essence I am trying to select a signature for that particular new mail message in this workflow. And that does not work. Any help would be appreciated.
    Martin

    first, you don't need the extra action to add attachments. if you drop some items on the saved application they will be passed to the "new Mail message" action as input and will be added as attachments. also, in my testing it seems that the processes of attaching the attachments seem to bump against the process of adding the signature. it get the same result as you originally but if I add a delay to the run applescript action then it works as it should so try
    1. new mail message.
    2. run applescript
    on run {input, parameters}
    delay 1
    tell application "Mail"
    set the message signature of (item 1 of input) to signature "My Signature Name"
    end tell
    return input
    end run

  • Pass multiple Automator variables to Run Shell Script?

    I have two Automator variables I'd like to pass to Run Shell Script. I'm missing something obvious, but how is this done?
    Thanks in advance

    i don't know a nice way to do it but in general any input passed to a shell script will be stored in $@ if input is passed as arguments.
    in particular, if you stack two "get value of variable actions" one after another and follow it by "run shell script" both variables will be stored in $@ as a list. just try it out with the default
    for f in "$@"
    do
    echo "$f"
    done
    You'll see that both variables will be echoed.

  • How do I create a GL responsibility to access multiple ledgers (error trying to run Financial report submission)

    I created a new GL responsibility and used the same menu as an existing one but created a new data access set that has all the ledgers in it that we want to access.
    I left the following profile options with no value.  The reason being is this responsibility should not be tied to any org/ledger.
    MO: Operating Unit
    GL Ledger ID
    GL Ledger Name
    This all seems to be working fine except when the users try to access Financial Report Submission.  The error that appears when trying to choose a ledger when running the report.
    Error: Stale Data
    The requested page contains stale data. This error could have been caused through the use of the browser's navigation buttons (the browser Back button, for example).
    I have cleared the browser cache and cache was cleared by functional administrator.  In this case it really doesn't seem to be anything to do with the browser's back button being used (I didn't use it) since I can make this error go away by setting the value for GL Ledger Name.  But that is not what the users want since that will restrict them to a specific ledger but they should be able to run the report for any ledger.
    Any help would be much appreciated.
    Thanks

    Please see (RM: Financial Report Submission: Errors With Stale Data, View Object FSGSubmissionAM.FSGSubmissionPVO1 Contained No Record [ID 1099837.1]).
    Thanks,
    Hussein     

  • Access Multiple Source Variables in Transform  Activity

    We have a transform activity that fills a complex type from another complex type that is received from a webservice invoke activity.
    One of the nodes in that destination complex type does not exist in the source complex type. The actual value of that destination node exists as a value in the current bpel process wsdl file, but I can't figure out how to set that value in the transform activity.
    I've been trying to use the xpath document method to parse an external xml file to grab the node that contains the value. Here is my xsl transformation file. Notice the line that contains the document method call. Does this not work in the BPEL transformations? The error I always receive is.
    Invalid XPath expression
    Is there another way to access a second source file within a transformation xslt file?
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
      <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
      <mapSources>
        <source type="WSDL">
          <schema location="StorePrice.wsdl"/>
          <rootElement name="GetPricingResponse" namespace="http://services.darr.fastenal.com/GetPrice/StorePriceOutput.xsd"/>
        </source>
      </mapSources>
      <mapTargets>
        <target type="WSDL">
          <schema location="TestMobilieQuote.wsdl"/>
          <rootElement name="TestMobilieQuoteProcessResponse" namespace="http://xmlns.oracle.com/TestMobilieQuote"/>
        </target>
      </mapTargets>
      <!-- GENERATED BY ORACLE XSL MAPPER 10.1.2.0.0(build 050923.1500) AT [THU FEB 02 14:10:26 CST 2006]. -->
    ?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:tns="http://services.darr.fastenal.com/GetPrice/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:ns0="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:s1="http://services.darr.fastenal.com/GetPrice/StorePriceOutput.xsd"
    xmlns:s0="http://services.darr.fastenal.com/GetPrice/StorePriceInput.xsd"
    xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:client="http://xmlns.oracle.com/TestMobilieQuote"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    exclude-result-prefixes=
    "xsl tns mime wsdl soap12 http ns0 soap soapenc s1 s0 tm plnk client bpws ldap xp20 ora orcl">
      <xsl:template match="/">
        <client:TestMobilieQuoteProcessResponse>
          <client:result>
            <client:AccountNumber>
              <xsl:value-of select="document('TestMobilieQuote',/)/TestMobilieQuoteProcessRequest/CustomerNumber"/>
            </client:AccountNumber>
            <xsl:for-each select="/s1:GetPricingResponse/s1:GetPricingResult/s1:PricingInformation">
              <client:PartList>
                <client:PartNumber>
                  <xsl:value-of select="s1:PartNumber"/>
                </client:PartNumber>
                <client:SellPrice>
                  <xsl:value-of select="s1:SellPrice"/>
                </client:SellPrice>
                <client:IsValid>
                  <xsl:value-of select="not(xp20:matches(s1:SellPrice,"^0$"))"/>
                </client:IsValid>
              </client:PartList>
            </xsl:for-each>
          </client:result>
        </client:TestMobilieQuoteProcessResponse>
      </xsl:template>
    </xsl:stylesheet>

    I noticed in my post that I had a copy error for the line in the xsl transformation that I have a question about. Here is the proper line
    <xsl:value-of select="document('TestMobilieQuote.wsdl',/)/TestMobilieQuoteProcessRequest/CustomerNumber"/>

  • Automator Applications don't let me run applescripts!

    ok just made an excellent automator application that deleted invisible files on selected drives. the only problem is that when i run it as an application, it gives me an error message and tells mr to check the "Run Applescript" action's properties. But, it works in the workflow perfectly!
    please help.

    OK, that does help. The statementset y to (value of variable "path" of front workflow)uses Automator terminology - unless your workflow is actually running in Automator, your script won't know anything about those terms unless you target the Automator or the Automator Runner applications.
    In this case though, you don't need to use variables at all, since the value you want is in the input parameter of the *Run AppleScript* action (this is what is output from the previous action). Note that the input parameter is a list, so you need to repeat through the items in the list or coerce it from a list to the desired class. Your Terminal scripting also seems to be a bit severe, but with the items I noted your workflow would be something like:
    1) *Ask for Finder Items* { Type: Folders } (Allow Multiple Selections is not checked)
    2) *Run AppleScript*
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #DAFFB6;
    overflow: auto;"
    title="this text can be pasted into an Automator 'Run AppleScript' action">
    on run {input, parameters}
    set y to input as text -- coerce from list
    display dialog "Are you sure you want to delete the Trash folder on flashdrive " & quoted form of y & "?" buttons {"Cancel", "Yes"} default button 2
    display dialog "Enter password:" default answer "password" buttons {"Cancel", "OK"} default button 2
    set x to (text returned of result)
    tell application "Terminal"
    delay 2
    do script "cd " & quoted form of POSIX path of y -- convert path
    do script "sudo rm -rf .Trashes" in window 1
    delay 2
    do script x in window 1
    delay 2
    do script "yes" in window 1
    delay 2
    do script "killall Terminal"
    end tell
    return input
    end run</pre>

  • Searching for Automator variable for the Filename?

    Hi!
    I just started to use Automator and im unsing it quite well now.
    While creating a new service, id like to insert the filename of the selected file
    into the "Subject:" field of a new opened Mail.
    Everything works fine, i only cant find a way to have the filename of the selected file
    being inserted to the "Subject" area in my Mail?
    Perhaps i only need to know how to create this variable or du you know a different way to solve this?
    Regards
    DaNylz

    You can get the name and place it into a variable using the *Set Value of Variable* action where it will be available for use in the *New Mail Message* action. There isn't a default action to get just the name of a Finder item, so you will need to use something like the *Run AppleScript* action and do it yourself or find a third party action. Speaking of third party actions, it just so happens that I have a *Get Names of Finder Items* action - you can download it here. Using my action, an example using variables would be something like
    0) -- selected items are automatically passed to the service workflow
    1) *Set Value of Variable* { Variable: _Original Item_ }
    2) *Get Names of Finder Items* { Name: file name and extension }
    3) *Set Value of Variable* { Variable: Name }
    4) *Get Value of Variable* { Variable: _Original Item_ } ( *Ignore Input* )
    5) *New Mail Message* -- drag Name variable into the subject field

  • Passing 2 Text Strings to Applescript Action

    I am trying to make a Automator Workflow that Checks if an RSS Feed has Changed & if there is a change then Tweet the New Update.
    I have managed to get the URL and Extract the Text from the feed. and limit it to just the very latest 1 Item from the feed, Then i  have 2 Variables set-up one Called OldText and Another Called NewText.
    I Need to compare the 2 Variables for any change.
    In an applescript action i tried the following
    on run {input, OldText, NewText}
              if NewText = OldText then beep
              return input
    end run
    I Get a Syntax Error
    current application, current application} doesn’t match the parameters {input, OldText, NewText } for run.
    I was using beep just for testing code will work
    can it not pass 2 variables at a time ?

    The parameters to an Automator action are already defined - you can't just put in your own.  In the case of the Run AppleScript action, the run handler is defined as:
       on run {input, parameters}
    where the input parameter is a list (even if there is only one item) of the items passed from the previous action, and the parameters parameter is a list of the user interface settings (text fields, check boxes, etc) and options of the action itself.  If you are passing items to your script from previous actions in your workflow, you can get the desired item number from the input list (e.g. item 2 of input - I am guessing that you would know the order), and to get the value of a named variable from the workflow you can just ask Automator, for example:
       set oldText to (get value of variable "oldText" of front workflow)

  • How can I run two different vi's in same project which are accessing same global variable with out effecting the speed of the execution of both the vi's

    Hi
    I have build an Labview project with FPGA target .  I have configured an FPGA VI and an host Vi to acquire data and logged the data to a file and stored the latest data in a global variable simultanously. I have configured one more VI in the same project  to access the global variable.  I have build a dll to access both the VI as functions in LabWindows/CVI code.  My task in CVI is to update configured GUI with latest data periodically and run the  host VI continously for a long time and log the data to a file. GUI should update for every one second with latest data for this I am using the second VI in which I am accessing the global varibale in which the latest data has been stored in host VI.

    Duplicate Post (go here)

  • Multiple header variables in bpelx:inputHeaderVariable

    While investigating the use of the bpelx:inputHeaderVariable call for creating a SOAP message header, I found the following blog entry:
    http://chintanblog.blogspot.com/2007/12/insertextract-soap-headers-in-bpel-it.html
    The author creates three variables for passing security credentials in a SOAP message header, then invokes the partner link to the "secure" process using this Invoke activity:
    <invoke name="Invoke_ExtractHeaderProcess" partnerLink="ExtractHeaderBPELProject" portType="ns2:ExtractHeaderBPELProject" operation="process"
    inputVariable="Invoke_ExtractHeaderProcess_process_InputVariable" outputVariable="Invoke_ExtractHeaderProcess_process_OutputVariable"
    bpelx:inputHeaderVariable="Variable_Username, Variable_Password, Variable_ComplexCredentialElement"/>
    I downloaded his code to JDeveloper 10.1.3.3.0 and SOA Suite 10.1.3.1 and attempted to deploy it. I received the following error:
    BUILD FAILED
    C:\jdevstudio101330\jdev\mywork\InsertExtractHeaders\InsertHeaderVariables\build.xml:79: A problem occured while connecting to server "localhost" using port "8888": bpel_InsertHeaderVariables_1.0.jar failed to deploy. Exception message is: ORABPEL-05215
    Error while loading process.
    The process domain encountered the following errors while loading the process "InsertHeaderVariables" (revision "1.0"): Failed to compile classes.
    Failed to compile the generated BPEL classes for "InsertHeaderVariables".
    If you have installed a patch to the server, please check that the bpelcClasspath domain property includes the patch classes.
    at com.collaxa.cube.engine.deployment.CubeProcessHolder.bind(CubeProcessHolder.java:285)
    at com.collaxa.cube.engine.deployment.DeploymentManager.deployProcess(DeploymentManager.java:804)
    at com.collaxa.cube.engine.deployment.DeploymentManager.deploySuitcase(DeploymentManager.java:670)
    at com.collaxa.cube.ejb.impl.BPELDomainManagerBean.deploySuitcase(BPELDomainManagerBean.java:445)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
    at com.evermind.server.ThreadState.runAs(ThreadState.java:620)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
    at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
    at DomainManagerBean_RemoteProxy_4bin6i8.deploySuitcase(Unknown Source)
    at com.oracle.bpel.client.BPELDomainHandle.deploySuitcase(BPELDomainHandle.java:317)
    at com.oracle.bpel.client.BPELDomainHandle.deployProcess(BPELDomainHandle.java:339)
    at deployHttpClientProcess.jspService(_deployHttpClientProcess.java:376)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:396)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:410)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
    at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
    at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    I had already attempted something similar in one of my own BPEL processes with the same erroneous result. The source of the problem would appear to be the list of multiple header variables since it disappears if a single variable is specified. Yet the author claims success with this technique.
    How can I get this to work?
    Thanks for your time,
    Paul Camann

    I see from Metalink that this topic was the subject of Bug 5623319, but it is difficult to tell from the trail of bread crumbs in the bug description whether (a) the bug was fixed, and if so, (b) the fix is included in JDev 10.1.3.3.0 or is a separate patch that must be applied. Clarification would be GREATLY appreciated.

  • Need to spawn multiple Automator app threads

    I have an AppleScript that runs on a folder action when files are dropped in.
    Each item triggers the same Automator app that FTPs the file.
    Problem arises when the files come in faster than the Automator app finishes each FTP job, so some are skipped. If i could have the AppleScript somehow spawn multiple Automator app threads, this would be solved.
    How would you go about solving it (sorry, can't slow down the incoming files)?
      Mac OS X (10.4.7)  

    anyone?

  • How do I access the DCJMS* variables in my response SOAP:Header ?

    Hi all,
    I have set up a sync / async Integration Process in XI
    This is initiated by a SAP R/3 transaction that calls a synchronous function to enter XI
    Once in the Bridge, a JMS receiver adapter sends out an asynchronous request message from XI to MQ
    A correlation allows the JMS sender adapter to return an asynchronous response message from MQ to XI back into my the Integration Process
    I have set up the JMS sender adapter configuration to return the DC (dynamic configuration) variables in the <SOAP:Header> of the XI response message along with the payload
    You can see that the DCJMS* variables are returned below
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--
    Response
      -->
    - <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SAP="http://sap.com/xi/XI/Message/30">
    - <SOAP:Header>
    + <SAP:Main xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" versionMajor="003" versionMinor="000" SOAP:mustUnderstand="1" wsu:Id="wsuid-main-92ABE13F5C59AB7FE10000000A1551F7">
    + <SAP:ReliableMessaging xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
    + <SAP:HopList xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
    + <SAP:RunTime xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    + <SAP:PerformanceHeader xmlns:SAP="http://sap.com/xi/XI/Message/30">
    - <SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSCorreleationID">40D982A0-B19D-11DB-9508-0002A5D5916B</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSTimestamp">1170297456940</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSMessageID">ID:414d5120514d4430312020202020202045c12b962001dd02</SAP:Record>
      </SAP:DynamicConfiguration>
    - <SAP:Diagnostic xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:TraceLevel>Information
    <b>Question</b>
    I want to access the DCJMS* variables but am not sure how to go about it as the
    variables exist in the <SOAP:Header>?
    I followed the SAP documentation to access adapter-specific attributes (refer to link http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm )
    I have used the following code to create a user-defined function for the accessing adapter specific attributes (similar to the link)
    public String Get_Msgid(Container container){
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get
    (StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create
    ("http://sap.com/xi/XI/System/JMS","DCJMSMessageID");
    String jmsMsgID = conf.get(key);
    return jmsMsgID;
    <b>Question</b>
    Do I use message mapping to extract the DCJMS* variables?
    <b>Question</b>
    If so then which message is used for the source message so that I can access the <SOAP:Header>?  Eg do I use the response message type or is there a trick to accessing the SOAP:Header?
    <b>Question</b>
    Do I use the user-defined function (like above)?
    I performed the following steps
    •     Opened the message mapping in edit mode
    •     Created the user-defined function using the graphical editor
    •     Saved the message mapping
    •     I have not connected the user-defined function to any of the xml tags in either the source or target messages
    When I go to test the message mapping I am getting the following error
    Compilation process error : CreateProcess: null\bin\javac -J-Xmx256m @E:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapd79a7bf0b65611dbaf390002a5d5916b/O1170817003886.txt @E:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapd79a7bf0b65611dbaf390002a5d5916b/S1170817003886.txt error=2
    STACKTRACE:
    com.sap.aii.ib.core.mapping.exec.ExecuteException: Compilation process error : CreateProcess: null\bin\javac -J-Xmx256m @E:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapd79a7bf0b65611dbaf390002a5d5916b/O1170817003886.txt @E:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapd79a7bf0b65611dbaf390002a5d5916b/S1170817003886.txt error=2
    at  com.sap.aii.ib.server.mapping.exec.ServiceUtil.compileSourceCode(ServiceUtil.java:207)
    at com.sap.aii.ib.server.mapping.exec.ServiceUtil.compile(ServiceUtil.java:156)
    at com.sap.aii.ibrep.server.mapping.ServerMapService.compileSourceCode(ServerMapService.java:361)
    at com.sap.aii.ibrep.server.mapping.ServerMapService.compileSourceCodeWithoutAndWithArchives(ServerMapService.java:301)
    at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:153)
    at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52)
    at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.execute(MapServiceRemoteObjectImpl0.java:259)
    at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:146)
    at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:304)
    at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:193)
    at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:122)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    A thread in the SDN (Error while Activating Message Mapping, Posted: Jan 9, 2007 3:32 PM) suggests checking the java path on the XI machine
    This is JAVA_HOME=C:\j2sdk1.4.2_08 and seems ok
    <b>Question</b>
    Do you know why I would get the compilation error?
    Any assistance would be appreciated
    Regards,
    Mike

    Jin,
    My compilation issue has gone via a SAP recommendation to specify the JDK home directory in the instance profile
    Back to the mapping - I can now run my scenario
    <b>Source message</b>
    The response message has the following <SOAP:Header> from which I want to extract the DCJMSCorreleationID (note that it's misspelt)
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Response
      -->
    - <SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSCorreleationID">40D982A0-B19D-11DB-9508-0002A5D5916B</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSTimestamp">1170297456940</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSMessageID">ID:414d5120514d4430312020202020202045c12b962001dd02</SAP:Record>
      </SAP:DynamicConfiguration>
    <b>Grahpical mapping</b>
    LHS - Response message with occurrance 0..1 so it is not connected to my UDF
    UDF Get_Corrid with no inputs
    RHS - The UDF output is connected to the Acknowledgement msg tag <ACK>
    <b>UDF</b>
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get
    (StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create
    ("http://sap.com/xi/XI/System/JMS","DCJMSCorreleationID");
    String Corrid = conf.get(key);
    return Corrid;
    <b>Target message</b>
    The idea is to copy the correlation id of the response message into the acknowledgement message.  But as you can see the result is NULL
      <?xml version="1.0" encoding="utf-8" ?>
    - <ns2:AWB0020_MARKET_DATA_RESPONSE_ACK xmlns:ns2="http://awb.com.au/mq/tx/MarketData">
      <ACK>null</ACK>
      </ns2:AWB0020_MARKET_DATA_RESPONSE_ACK>
    Please advise
    Thanks Mike

  • How do I create an automator variable for a path that includes a date?

    I like to use Image Capture to scan documents into a hierarchy of folders under my ~/Documents directory that are organized by year and document type.  For example, I have
    ~/Documents/archives/2011
         /Misc
         /Utilities
    and
    ~/Documents/archives/2012
         /Misc
         /Utilities
    for archiving miscellaneous docs and utilities bills. Now, switching folders in Image Capture is annoying so I want to use the Automator support built into that app to direct the scanned images to ~/Documents/archives/<Current Year>/Misc or ~/Documents/archives/<Current Year>/Utilities.  I was able to do this with separate Automator workflows, each with a hard-coded path to the destination folder.  For example,
    What I would like to do is use an Automator variable to dynamically determine ~/Documents/archives/<Current Year>/Misc.  I see variables for Home, Documents, and Current Year.   However, when I try to create a new path variable it only lets me choose a full path to a Finder folder.  How do I combine Documents and Current Year variables with the "archives" and "Misc" folder names to create a new path variable?

    Well now, you went and made me learn something today.  In the Variables Library, under Utilities, is a variable named AppleScript.  You can put a small script into this that evaluates to your path, for example:
    ((((path to documents folder) as text) & "archives:" & (year of (current date)) as text) & ":Utilities") as alias
    If the script evaluates to a proper path, it can be used wherever any other path can - you can experiment by looking at the results of a Get Value of Variable action.

  • Multiple value variable - not showing Multiple values in the report

    Hi,
    I have careated a Multiple value variable for one of the characteristics in my Query. however, When i run the Query and select multiple values for the same, the report displays values for only the first selection.
    Could you help me resolve this ?
    Rgds
    Shweta

    Hello Shweta,
       Are you running the report in the Analyzer excel or Web?
    May be you can check the following:
    1. Use the latest FEP. It is working for me.
    2. May be the other values that you selected do not have corresponding keyfigures values. Hence it is showing only the first one.
    Try selecting other values ( except first one selected this time )
    Regards,
    Sheik Bilal

Maybe you are looking for