Hitachi Vantara Pentaho Community Forums
Results 1 to 1 of 1

Thread: Calling an xaction with secure prompt, inside another xaction

  1. #1
    Join Date
    Apr 2007
    Posts
    27

    Default Calling an xaction with secure prompt, inside another xaction

    I have an xaction that i am currently using to run a report i want to create a sub xaction within that xaction, which has a secure prompt component.

    I keep getting an error back from the server whenever i run it, is there a bug with this or is it not allowed for some reason?


    Here is a simplified version of a parent this doesn't seem to run.
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <action-sequence>
      <inputs>
        <GroupId type="string">
          <sources>
            <request>GroupId</request>
          </sources>  
          <default-value><![CDATA[ZX]]></default-value>
        </GroupId>
      </inputs>
    
      <outputs>
        <productGroupSqlFilter type="string"/>
      </outputs>
    
      <resources/>
      
      <actions>
        <action-definition>
          <component-name>SubActionComponent</component-name>
          <action-type>ProductGroupSelectAction</action-type>
          <action-inputs>
            <GroupId type="string"/>
          </action-inputs>
          <action-outputs>
            <productGroupSqlFilter type="string"/>
          </action-outputs>
          <component-definition>
            <solution><![CDATA[]]></solution>  
            <path><![CDATA[samples]]></path>  
            <action><![CDATA[ProductGroupSelector.xaction]]></action>
          </component-definition>
        </action-definition>
     
      </actions>
    </action-sequence>
    this is the xaction i am running (with server information removed)
    Code:
    <action-sequence>
      <title>Product Group Selector</title>
      <inputs>
        <GroupId type="string">
          <sources>
            <request>GroupId</request>
          </sources>  
          <default-value><![CDATA[A]]></default-value>
        </GroupId>
      </inputs>
    
      <outputs>
        <productGroupSqlFilter type="string"/>
      </outputs>
    
      <resources/>
      
      <actions>
        <action-definition>
          <component-name>SQLLookupRule</component-name>
          <action-type>Relational</action-type>
          <action-outputs>
            <query-result type="result-set" mapping="productGroup_result"/>  
            <name type="string"/>  
            <GroupID type="string"/>
          </action-outputs>
          <component-definition>
            <query><![CDATA[SELECT name, GroupID
    FROM `product_subCategory`
    WHERE name <> ' '
    ORDER BY name ASC]]></query>  
            <live><![CDATA[true]]></live>  
            <driver><![CDATA[com.mysql.jdbc.Driver]]></driver>  
            <connection><![CDATA[jdbc:mysql://someip/someDB]]></connection>  
            <user-id><![CDATA[reporting]]></user-id>  
            <password><![CDATA[reporting]]></password>
          </component-definition>
        </action-definition>
      
        <action-definition>
          <component-name>SecureFilterComponent</component-name>
          <action-type>Prompt/Secure Filter</action-type>
          <action-inputs>
            <productGroup_result type="result-set"/>
            <GroupId type="string"/>
          </action-inputs>
          <component-definition>
            <selections>
              <GroupId style="list-multi" prompt-if-one-value="true">
                <filter value-col-name="GroupID" display-col-name="name">productGroup_result</filter>
                <title>Choose all of the product groups you would like to filter the report by:</title>
              </GroupId>
            </selections>
          </component-definition>
        </action-definition>
    
        <action-definition>
          <component-name>JavascriptRule</component-name>
          <action-type>productGroupIdSQLFilter</action-type>
          <action-inputs>
            <GroupId type="string"/>
          </action-inputs>
          <action-outputs>
            <productGroupSqlFilter type="string"/>
          </action-outputs>
          <component-definition>
            <script><![CDATA[function getSQLFilter(groupId){
        var groupIdFilter = ' AND (';
        var lngth = groupId.length;
        for(var i = 0; i < lngth; i++){
            if(i>0){
                groupIdFilter += ' OR';
            }
            groupIdFilter += ' psc.GroupId = \'' + groupId[i] + '\'';
        }
        groupIdFilter += ')';
        return groupIdFilter;
    }
    
    getSQLFilter(GroupId);]]></script>
          </component-definition>
        </action-definition>
    Last edited by ethnarch; 07-05-2007 at 03:18 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.