Evaluate xmla expression in a variable

Hi,
I have a xmla code which I'm trying to put it in a variable. While evaluating the expression I'm getting the error as 
 The expression might contain an invalid token, an incomplete token, or an invalid element. It might not be well-formed, or might be missing part of a required element such as a parenthesis.
Here is my xmla expression 
"Select '
<Batch xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<ErrorConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200" xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300" xmlns:ddl400="http://schemas.microsoft.com/analysisservices/2012/engine/400" xmlns:ddl400_400="http://schemas.microsoft.com/analysisservices/2012/engine/400/400">
<KeyNotFound>IgnoreError</KeyNotFound>
</ErrorConfiguration>
<Parallel>
<Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200" xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300" xmlns:ddl400="http://schemas.microsoft.com/analysisservices/2012/engine/400" xmlns:ddl400_400="http://schemas.microsoft.com/analysisservices/2012/engine/400/400">
<Object>
<DatabaseID>IIS_Version2</DatabaseID>
<DimensionID>Application</DimensionID>
</Object>
<Type>ProcessAdd</Type>
<DataSource xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200" xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300" xmlns:ddl400="http://schemas.microsoft.com/analysisservices/2012/engine/400" xmlns:ddl400_400="http://schemas.microsoft.com/analysisservices/2012/engine/400/400" xmlns:dwd="http://schemas.microsoft.com/DataWarehouse/Designer/1.0" xsi:type="RelationalDataSource" dwd:design-time-name="1a3cb292-9bce-4c59-a182-177d6b3506ff" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<ID>IISDW</ID>
<Name>IISDW</Name>
<ConnectionString>Provider=SQLNCLI11.1;Data Source=CO1MSFTSQLHKT02;Integrated Security=SSPI;Initial Catalog=IISDW</ConnectionString>
<!--<ImpersonationInfo>
<ImpersonationMode>ImpersonateAccount</ImpersonationMode>
<Account>phx\v-chveng</Account>
<ImpersonationInfoSecurity>passwordremoved</ImpersonationInfoSecurity>
</ImpersonationInfo>
<Timeout>PT0S</Timeout>-->
</DataSource>
<DataSourceView xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200" xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300" xmlns:ddl400="http://schemas.microsoft.com/analysisservices/2012/engine/400" xmlns:ddl400_400="http://schemas.microsoft.com/analysisservices/2012/engine/400/400" xmlns:dwd="http://schemas.microsoft.com/DataWarehouse/Designer/1.0" dwd:design-time-name="b0b61205-c64d-4e34-afae-6d4d48b93fb3" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<ID>IISDW</ID>
<Name>IISDW</Name>
<DataSourceID>IISDW</DataSourceID>
<Schema>
<xs:schema id="IISDW" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop">
<xs:element name="IISDW" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:design-time-name="a6676059-1f9d-4cf2-8dcf-40b8f31e3332">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Application" msprop:design-time-name="6022ab52-0da7-49db-a3d3-b38704d0559b" msprop:IsLogical="True" msprop:FriendlyName="Application" msprop:DbTableName="Application" msprop:TableType="View" msprop:Description="" msprop:QueryDefinition="SELECT Application, DATEADD([hour], DATEDIFF([hour], 0, [Timestamp]), 0) AS [Timestamp], ServerName, CAST(ServerName AS char(3)) AS DataCenter, CS_URI_Stem, CAST(HashBytes("'MD5'",Application + ServerName + CS_URI_Stem + CAST(DATEADD([hour], DATEDIFF([hour], 0, [Timestamp]), 0) AS varchar(24))) AS uniqueidentifier) AS Server_URI_Identity&#xD;&#xA;FROM IIS_6 AS a LEFT OUTER JOIN&#xD;&#xA;Dimension_Pointer AS b ON a.Application = b.Application&#xD;&#xA;WHERE (b.ProcessedFlag = 0) AND (a.Application = "+(DT_WSTR, 100) @[User::Application]+")&#xD;&#xA;GROUP BY Application, DATEADD([hour], DATEDIFF([hour], 0, [Timestamp]), 0), ServerName, CS_URI_Stem" msprop:QueryBuilder="SpecificQueryBuilder">
<xs:complexType>
<xs:sequence>
<xs:element name="Application" msprop:design-time-name="8b794def-ecf7-48c5-8f41-8829e00cf235" msprop:DbColumnName="Application" msprop:FriendlyName="Application" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Timestamp" msdata:ReadOnly="true" msprop:design-time-name="00274b1e-7459-4197-8a22-f2f5de0c4af1" msprop:DbColumnName="Timestamp" msprop:FriendlyName="Timestamp" type="xs:dateTime" />
<xs:element name="ServerName" msprop:design-time-name="793900a3-304a-45a4-8f3f-87352b3fb70f" msprop:DbColumnName="ServerName" msprop:FriendlyName="ServerName" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DataCenter" msdata:ReadOnly="true" msprop:design-time-name="6cfa5bef-833b-4ac1-bfde-1b7a89516140" msprop:DbColumnName="DataCenter" msprop:FriendlyName="DataCenter" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="3" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CS_URI_Stem" msprop:design-time-name="4cee9248-c545-4ff1-8887-c553e2932403" msprop:DbColumnName="CS_URI_Stem" msprop:FriendlyName="CS_URI_Stem" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="4000" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Server_URI_Identity" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msdata:ReadOnly="true" msprop:design-time-name="6666d716-ac3c-4a5a-a331-9398a6bbd8cc" msprop:DbColumnName="Server_URI_Identity" msprop:FriendlyName="Server_URI_Identity" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1" msprop:IsLogical="True" msdata:PrimaryKey="true">
<xs:selector xpath=".//Application" />
<xs:field xpath="Server_URI_Identity" />
<xs:field xpath="Timestamp" />
</xs:unique>
</xs:element>
</xs:schema>
<IISDW xmlns="" />
</Schema>
</DataSourceView>
<WriteBackTableCreation>UseExisting</WriteBackTableCreation>
</Process>
</Parallel>
</Batch>' as ProcesAdd
can anyone help me plz

Hi Katherine,
Thanks for your reply;
Here is my Control flow which gives you some idea what I'm trying to do:
I'm using a for each loop container and inside it I have a Execute SQL task which generate the XMLA script (which I have passed it in a variable for which I used the connection type as ADO.net ); later I have written a script to check wheather it is returning
the correct xmla script or not and than processing the dimension.
Everything works good until the Script task and when it comes to the Process ADD it fails.
EXECUTE SQL TASK (Get XMLA Query processADD) variable value:
"SELECT '<Batch xmlns=\"http://schemas.microsoft.com/analysisservices/2003/engine\">
<ErrorConfiguration xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ddl2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2\" xmlns:ddl2_2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2/2\" xmlns:ddl100_100=\"http://schemas.microsoft.com/analysisservices/2008/engine/100/100\" xmlns:ddl200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200\" xmlns:ddl200_200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200/200\" xmlns:ddl300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300\" xmlns:ddl300_300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300/300\" xmlns:ddl400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400\" xmlns:ddl400_400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400/400\">
<KeyNotFound>IgnoreError</KeyNotFound>
</ErrorConfiguration>
<Parallel>
<Process xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ddl2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2\" xmlns:ddl2_2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2/2\" xmlns:ddl100_100=\"http://schemas.microsoft.com/analysisservices/2008/engine/100/100\" xmlns:ddl200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200\" xmlns:ddl200_200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200/200\" xmlns:ddl300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300\" xmlns:ddl300_300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300/300\" xmlns:ddl400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400\" xmlns:ddl400_400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400/400\">
<Object> <DatabaseID>IIS_Version2</DatabaseID> <DimensionID>Application</DimensionID>
</Object>
<Type>ProcessAdd</Type>
<DataSource xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ddl2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2\" xmlns:ddl2_2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2/2\" xmlns:ddl100_100=\"http://schemas.microsoft.com/analysisservices/2008/engine/100/100\" xmlns:ddl200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200\" xmlns:ddl200_200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200/200\" xmlns:ddl300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300\" xmlns:ddl300_300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300/300\" xmlns:ddl400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400\" xmlns:ddl400_400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400/400\" xmlns:dwd=\"http://schemas.microsoft.com/DataWarehouse/Designer/1.0\" xsi:type=\"RelationalDataSource\" dwd:design-time-name=\"1a3cb292-9bce-4c59-a182-177d6b3506ff\" xmlns=\"http://schemas.microsoft.com/analysisservices/2003/engine\">
<ID>IISDW</ID>
<Name>IISDW</Name>
<ConnectionString>Provider=SQLNCLI11.1;Data Source=CO1MSFTSQLHKT02;Integrated Security=SSPI;Initial Catalog=IISDW</ConnectionString>
<Timeout>PT0S</Timeout>-->
</DataSource>
<DataSourceView xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ddl2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2\" xmlns:ddl2_2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2/2\" xmlns:ddl100_100=\"http://schemas.microsoft.com/analysisservices/2008/engine/100/100\" xmlns:ddl200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200\" xmlns:ddl200_200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200/200\" xmlns:ddl300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300\" xmlns:ddl300_300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300/300\" xmlns:ddl400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400\" xmlns:ddl400_400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400/400\" xmlns:dwd=\"http://schemas.microsoft.com/DataWarehouse/Designer/1.0\" dwd:design-time-name=\"b0b61205-c64d-4e34-afae-6d4d48b93fb3\" xmlns=\"http://schemas.microsoft.com/analysisservices/2003/engine\">
<ID>IISDW</ID>
<Name>IISDW</Name>
<DataSourceID>IISDW</DataSourceID>
<Schema> <xs:schema id=\"IISDW_x0020_1\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" xmlns:msprop=\"urn:schemas-microsoft-com:xml-msprop\">
<xs:element name=\"IISDW_x0020_1\" msdata:IsDataSet=\"true\" msdata:UseCurrentLocale=\"true\" msprop:design-time-name=\"72037318-e316-469d-9a45-a10c77709b39\">
<xs:complexType>
<xs:choice minOccurs=\"0\" maxOccurs=\"unbounded\">
<xs:element name=\"Application\" msprop:design-time-name=\"7f579e7e-e8b7-4a9d-8a93-a255fccbbfbe\" msprop:IsLogical=\"True\" msprop:FriendlyName=\"Application\" msprop:DbTableName=\"Application\" msprop:TableType=\"View\" msprop:Description=\"\" msprop:QueryDefinition=\"SELECT a.Application, DATEADD([hour], DATEDIFF([hour], 0, a.[Timestamp]), 0) AS [Timestamp], a.ServerName, CAST(a.ServerName AS char(3)) AS DataCenter, a.CS_URI_Stem, CAST(HashBytes(''MD5'', &#xD;&#xA; a.Application + a.ServerName + a.CS_URI_Stem + CAST(DATEADD([hour], DATEDIFF([hour], 0, a.[Timestamp]), 0) AS varchar(24))) AS uniqueidentifier) AS Server_URI_Identity&#xD;&#xA;FROM IIS_6_OLD AS a LEFT OUTER JOIN&#xD;&#xA; Dimension_Pointer AS b ON a.Application = b.Application&#xD;&#xA;WHERE (b.ProcessedFlag = 0) AND (a.Application IN ("+(DT_WSTR,100) @[User::strDistinctApplication]+"))&#xD;&#xA;GROUP BY a.Application, DATEADD([hour], DATEDIFF([hour], 0, a.[Timestamp]), 0), a.ServerName, a.CS_URI_Stem\" msprop:QueryBuilder=\"SpecificQueryBuilder\">
<xs:complexType>
<xs:sequence>
<xs:element name=\"Application\" msprop:design-time-name=\"f3074e98-4a82-4bc5-a818-916203f7758b\" msprop:DbColumnName=\"Application\" msprop:FriendlyName=\"Application\" minOccurs=\"0\">
<xs:simpleType>
<xs:restriction base=\"xs:string\">
<xs:maxLength value=\"255\" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name=\"Timestamp\" msdata:ReadOnly=\"true\" msprop:design-time-name=\"2662e3a8-8b1a-4d77-aecb-575329b84dc1\" msprop:DbColumnName=\"Timestamp\" msprop:FriendlyName=\"Timestamp\" type=\"xs:dateTime\" />
<xs:element name=\"ServerName\" msprop:design-time-name=\"ced26d49-cd6e-4073-a40c-ff5ef70e4ef1\" msprop:DbColumnName=\"ServerName\" msprop:FriendlyName=\"ServerName\" minOccurs=\"0\">
<xs:simpleType>
<xs:restriction base=\"xs:string\">
<xs:maxLength value=\"255\" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name=\"DataCenter\" msdata:ReadOnly=\"true\" msprop:design-time-name=\"4583e15a-dcf1-45a2-a30b-bd142ca8b778\" msprop:DbColumnName=\"DataCenter\" msprop:FriendlyName=\"DataCenter\" minOccurs=\"0\">
<xs:simpleType>
<xs:restriction base=\"xs:string\">
<xs:maxLength value=\"3\" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name=\"CS_URI_Stem\" msprop:design-time-name=\"10db5a79-8d50-49d2-9376-a3b4d19864b9\" msprop:DbColumnName=\"CS_URI_Stem\" msprop:FriendlyName=\"CS_URI_Stem\" minOccurs=\"0\">
<xs:simpleType>
<xs:restriction base=\"xs:string\">
<xs:maxLength value=\"4000\" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name=\"Server_URI_Identity\" msdata:DataType=\"System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" msdata:ReadOnly=\"true\" msprop:design-time-name=\"018ede0a-e15e-47c2-851b-f4431e8c839c\" msprop:DbColumnName=\"Server_URI_Identity\" msprop:FriendlyName=\"Server_URI_Identity\" type=\"xs:string\" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name=\"Constraint1\" msprop:IsLogical=\"True\" msdata:PrimaryKey=\"true\">
<xs:selector xpath=\".//Application\" />
<xs:field xpath=\"Server_URI_Identity\" />
<xs:field xpath=\"Timestamp\" />
</xs:unique>
</xs:element>
</xs:schema>
<IISDW_x0020_1 xmlns=\"\" />
</Schema>
</DataSourceView>
<WriteBackTableCreation>UseExisting</WriteBackTableCreation>
</Process>
</Parallel>
</Batch>' as XMLAScript_ProcessData"
The Result in the SCRIPT Task does show me the correct XMLA code but when it passes to the "PROCESSADD" Analysis Execute DDL task it fails.
And for validation I have included a breakpoint at the ANALYSIS Service Execute DDl Task (Process ADD) and When I see the value of the variable, I see it as 
<Batch xmlns=\"http://schemas.microsoft.com/analysisservices/2003/engine\">\n\t<ErrorConfiguration xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ddl2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2\" xmlns:ddl2_2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2/2\" xmlns:ddl100_100=\"http://schemas.microsoft.com/analysisservices/2008/engine/100/100\" xmlns:ddl200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200\" xmlns:ddl200_200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200/200\" xmlns:ddl300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300\" xmlns:ddl300_300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300/300\" xmlns:ddl400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400\" xmlns:ddl400_400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400/400\">\n\t\t<KeyNotFound>IgnoreError</KeyNotFound>\n\t</ErrorConfiguration>\n\t<Parallel>\n <Process xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ddl2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2\" xmlns:ddl2_2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2/2\" xmlns:ddl100_100=\"http://schemas.microsoft.com/analysisservices/2008/engine/100/100\" xmlns:ddl200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200\" xmlns:ddl200_200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200/200\" xmlns:ddl300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300\" xmlns:ddl300_300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300/300\" xmlns:ddl400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400\" xmlns:ddl400_400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400/400\">\n <Object> <DatabaseID>IIS_Version2</DatabaseID> <DimensionID>Application</DimensionID>\n </Object>\n <Type>ProcessAdd</Type>\n\t \t<DataSource xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ddl2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2\" xmlns:ddl2_2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2/2\" xmlns:ddl100_100=\"http://schemas.microsoft.com/analysisservices/2008/engine/100/100\" xmlns:ddl200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200\" xmlns:ddl200_200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200/200\" xmlns:ddl300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300\" xmlns:ddl300_300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300/300\" xmlns:ddl400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400\" xmlns:ddl400_400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400/400\" xmlns:dwd=\"http://schemas.microsoft.com/DataWarehouse/Designer/1.0\" xsi:type=\"RelationalDataSource\" dwd:design-time-name=\"1a3cb292-9bce-4c59-a182-177d6b3506ff\" xmlns=\"http://schemas.microsoft.com/analysisservices/2003/engine\">\n\t\t\t<ID>IISDW</ID>\n\t\t\t<Name>IISDW</Name>\n\t\t\t<ConnectionString>Provider=SQLNCLI11.1;Data Source=CO1MSFTSQLHKT02;Integrated Security=SSPI;Initial Catalog=IISDW</ConnectionString>\n\t\t\t<Timeout>PT0S</Timeout>-->\n\t\t</DataSource>\n\t\t<DataSourceView xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ddl2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2\" xmlns:ddl2_2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2/2\" xmlns:ddl100_100=\"http://schemas.microsoft.com/analysisservices/2008/engine/100/100\" xmlns:ddl200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200\" xmlns:ddl200_200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200/200\" xmlns:ddl300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300\" xmlns:ddl300_300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300/300\" xmlns:ddl400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400\" xmlns:ddl400_400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400/400\" xmlns:dwd=\"http://schemas.microsoft.com/DataWarehouse/Designer/1.0\" dwd:design-time-name=\"b0b61205-c64d-4e34-afae-6d4d48b93fb3\" xmlns=\"http://schemas.microsoft.com/analysisservices/2003/engine\">\n\t\t\t<ID>IISDW</ID>\n\t\t\t<Name>IISDW</Name>\n\t\t\t<DataSourceID>IISDW</DataSourceID>\n\t\t\t <Schema> <xs:schema id=\"IISDW_x0020_1\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" xmlns:msprop=\"urn:schemas-microsoft-com:xml-msprop\">\n\t\t\t\t\t\t\t <xs:element name=\"IISDW_x0020_1\" msdata:IsDataSet=\"true\" msdata:UseCurrentLocale=\"true\" msprop:design-time-name=\"72037318-e316-469d-9a45-a10c77709b39\">\n\t\t\t\t\t\t\t\t<xs:complexType>\n\t\t\t\t\t\t\t\t <xs:choice minOccurs=\"0\" maxOccurs=\"unbounded\">\n\t\t\t\t\t\t\t\t\t<xs:element name=\"Application\" msprop:design-time-name=\"7f579e7e-e8b7-4a9d-8a93-a255fccbbfbe\" msprop:IsLogical=\"True\" msprop:FriendlyName=\"Application\" msprop:DbTableName=\"Application\" msprop:TableType=\"View\" msprop:Description=\"\" msprop:QueryDefinition=\"SELECT a.Application, DATEADD([hour], DATEDIFF([hour], 0, a.[Timestamp]), 0) AS [Timestamp], a.ServerName, CAST(a.ServerName AS char(3)) AS DataCenter, a.CS_URI_Stem, CAST(HashBytes('MD5', &#xD;&#xA; a.Application + a.ServerName + a.CS_URI_Stem + CAST(DATEADD([hour], DATEDIFF([hour], 0, a.[Timestamp]), 0) AS varchar(24))) AS uniqueidentifier) AS Server_URI_Identity&#xD;&#xA;FROM IIS_6_OLD AS a LEFT OUTER JOIN&#xD;&#xA; Dimension_Pointer AS b ON a.Application = b.Application&#xD;&#xA;WHERE (b.ProcessedFlag = 0) AND (a.Application IN (search))&#xD;&#xA;GROUP BY a.Application, DATEADD([hour], DATEDIFF([hour], 0, a.[Timestamp]), 0), a.ServerName, a.CS_URI_Stem\" msprop:QueryBuilder=\"SpecificQueryBuilder\">\n\t\t\t\t\t\t\t\t\t <xs:complexType>\n\t\t\t\t\t\t\t\t\t\t<xs:sequence>\n\t\t\t\t\t\t\t\t\t\t <xs:element name=\"Application\" msprop:design-time-name=\"f3074e98-4a82-4bc5-a818-916203f7758b\" msprop:DbColumnName=\"Application\" msprop:FriendlyName=\"Application\" minOccurs=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t<xs:simpleType>\n\t\t\t\t\t\t\t\t\t\t\t <xs:restriction base=\"xs:string\">\n\t\t\t\t\t\t\t\t\t\t\t\t<xs:maxLength value=\"255\" />\n\t\t\t\t\t\t\t\t\t\t\t </xs:restriction>\n\t\t\t\t\t\t\t\t\t\t\t</xs:simpleType>\n\t\t\t\t\t\t\t\t\t\t </xs:element>\n\t\t\t\t\t\t\t\t\t\t <xs:element name=\"Timestamp\" msdata:ReadOnly=\"true\" msprop:design-time-name=\"2662e3a8-8b1a-4d77-aecb-575329b84dc1\" msprop:DbColumnName=\"Timestamp\" msprop:FriendlyName=\"Timestamp\" type=\"xs:dateTime\" />\n\t\t\t\t\t\t\t\t\t\t <xs:element name=\"ServerName\" msprop:design-time-name=\"ced26d49-cd6e-4073-a40c-ff5ef70e4ef1\" msprop:DbColumnName=\"ServerName\" msprop:FriendlyName=\"ServerName\" minOccurs=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t<xs:simpleType>\n\t\t\t\t\t\t\t\t\t\t\t <xs:restriction base=\"xs:string\">\n\t\t\t\t\t\t\t\t\t\t\t\t<xs:maxLength value=\"255\" />\n\t\t\t\t\t\t\t\t\t\t\t </xs:restriction>\n\t\t\t\t\t\t\t\t\t\t\t</xs:simpleType>\n\t\t\t\t\t\t\t\t\t\t </xs:element>\n\t\t\t\t\t\t\t\t\t\t <xs:element name=\"DataCenter\" msdata:ReadOnly=\"true\" msprop:design-time-name=\"4583e15a-dcf1-45a2-a30b-bd142ca8b778\" msprop:DbColumnName=\"DataCenter\" msprop:FriendlyName=\"DataCenter\" minOccurs=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t<xs:simpleType>\n\t\t\t\t\t\t\t\t\t\t\t <xs:restriction base=\"xs:string\">\n\t\t\t\t\t\t\t\t\t\t\t\t<xs:maxLength value=\"3\" />\n\t\t\t\t\t\t\t\t\t\t\t </xs:restriction>\n\t\t\t\t\t\t\t\t\t\t\t</xs:simpleType>\n\t\t\t\t\t\t\t\t\t\t </xs:element>\n\t\t\t\t\t\t\t\t\t\t <xs:element name=\"CS_URI_Stem\" msprop:design-time-name=\"10db5a79-8d50-49d2-9376-a3b4d19864b9\" msprop:DbColumnName=\"CS_URI_Stem\" msprop:FriendlyName=\"CS_URI_Stem\" minOccurs=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t<xs:simpleType>\n\t\t\t\t\t\t\t\t\t\t\t <xs:restriction base=\"xs:string\">\n\t\t\t\t\t\t\t\t\t\t\t\t<xs:maxLength value=\"4000\" />\n\t\t\t\t\t\t\t\t\t\t\t </xs:restriction>\n\t\t\t\t\t\t\t\t\t\t\t</xs:simpleType>\n\t\t\t\t\t\t\t\t\t\t </xs:element>\n\t\t\t\t\t\t\t\t\t\t <xs:element name=\"Server_URI_Identity\" msdata:DataType=\"System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" msdata:ReadOnly=\"true\" msprop:design-time-name=\"018ede0a-e15e-47c2-851b-f4431e8c839c\" msprop:DbColumnName=\"Server_URI_Identity\" msprop:FriendlyName=\"Server_URI_Identity\" type=\"xs:string\" />\n\t\t\t\t\t\t\t\t\t\t</xs:sequence>\n\t\t\t\t\t\t\t\t\t </xs:complexType>\n\t\t\t\t\t\t\t\t\t</xs:element>\n </xs:choice>\n </xs:complexType>\n <xs:unique name=\"Constraint1\" msprop:IsLogical=\"True\" msdata:PrimaryKey=\"true\">\n <xs:selector xpath=\".//Application\" />\n <xs:field xpath=\"Server_URI_Identity\" />\n <xs:field xpath=\"Timestamp\" />\n </xs:unique>\n </xs:element>\n </xs:schema>\n <IISDW_x0020_1 xmlns=\"\" />\n </Schema>\n\t\t</DataSourceView>\n\t <WriteBackTableCreation>UseExisting</WriteBackTableCreation>\n </Process>\n </Parallel>\n</Batch>
Here is the error message I get:
[Analysis Services Execute DDL Task] Error: The -->
text node at line 21, column 3 cannot appear inside the DataSource element (namespace http://schemas.microsoft.com/analysisservices/2003/engine) under Envelope/Body/Execute/Command/Batch/Parallel/Process.
This element can only have text nodes containing white-space characters.

Similar Messages

  • Evaluate math expression

    Hi Guys,
    I need to write java command line program to evaluate a mathematical
    expression input by user without parantheses using Stack approach.
    Can anyone give me the clue how to start of with.
    Is it possible to evaluate the expression in infix notation directly using stack, without converting to prefix notation.
    Thanks in advance

    Is there something nicer?You can also use java 6 and javascripts. I saw a
    thread where someone posted an example.
    KajI posted something a couple of weeks back (reply #2):
    http://forum.java.sun.com/thread.jspa?threadID=5137192
    Of course, you don't need to bind any variables and can do it like this:import javax.script.ScriptEngine;
    import javax.script.ScriptEngineManager;
    import javax.script.ScriptException;
    public class ScriptDemo {
        public static void main(String[] args) {
            ScriptEngineManager manager = new ScriptEngineManager();
            ScriptEngine engine = manager.getEngineByName("js");
            try {
                String expression = "3+4";
                Object result = engine.eval(expression);
                System.out.println(expression+" = "+result);
            } catch(ScriptException se) {
                se.printStackTrace();
        output: 3+4 = 7.0
    */

  • Empty variable/expression result. xpath variable/expression expression

    Hi,
    I am new to BPEL, I have created one Process and trying to Call Procedure with the help of Invoke Process Activity. Database Procedure having one input parameter and one output parameter. When i am trying to execute deployed webservice it gives me error like
    <Faulthttp://schemas.xmlsoap.org/soap/envelope/>
    <faultcode>env:Server</faultcode>
    <faultstring>com.oracle.bpel.client.delivery.ReceiveTimeOutException: Waiting for response has timed out. The conversation id is 94218a8977e86d41:78a12598:12e474197b6:-7f6f. Please check the process instance for detail.</faultstring>
    </Fault>
    Server Trace for this: From Audit Instance
    receiveInput
    [2011/02/21 17:07:04] Received "inputVariable" call from partner "client"More...
    - <inputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
    - <ns1:DBAdaptorParam2ProcessRequest xmlns:ns1="http://xmlns.oracle.com/DBAdaptorParam2">
    <ns1:input>wwww</ns1:input></ns1:DBAdaptorParam2ProcessRequest></part></inputVariable>
    Assign_in
    [2011/02/21 17:07:04] Updated variable "Invoke_DBService_DBAdaptor2_Service_InputVariable" More...
    - <Invoke_DBService_DBAdaptor2_Service_InputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    - <InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/GETCONCATESTRING/">
    <PARAM1>wwww</PARAM1></InputParameters></part>
    </Invoke_DBService_DBAdaptor2_Service_InputVariable>
    Invoke_DBService
    [2011/02/21 17:07:04] Invoked 2-way operation "DBAdaptor2_Service" on partner "DBAdaptor2_Service".less
    - <messages>
    - <Invoke_DBService_DBAdaptor2_Service_InputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    - <InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/GETCONCATESTRING/"><PARAM1>wwww</PARAM1>
    </InputParameters></part>
    </Invoke_DBService_DBAdaptor2_Service_InputVariable>
    - <Invoke_DBService_DBAdaptor2_Service_OutputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
    - <db:OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/GETCONCATESTRING/"><PARAM2>wwww Extra added</PARAM2></db:OutputParameters></part>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="response-headers">[]</part>
    </Invoke_DBService_DBAdaptor2_Service_OutputVariable>
    </messages>
    Assign_out (faulted)
    [2011/02/21 17:07:04] Error in evaluate <from> expression at line "87". The result is empty for the XPath expression : "/ns2:OutputParameters/ns2:PARAM2".less
    oracle.xml.parser.v2.XMLElement@7cc53
    [2011/02/21 17:07:04] "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.less
    - <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    - <part name="summary">
    <summary>
    empty variable/expression result.
    xpath variable/expression expression "/ns2:OutputParameters/ns2:PARAM2" is empty at line 87, when attempting reading/copying it.
    Please make sure the variable/expression result "/ns2:OutputParameters/ns2:PARAM2" is not empty.
    </summary></part></selectionFailure>
    I am not able to fix this issue please help me out.
    Thanks in Advance
    Thanks,Abhijit

    Hi,
    Thanks for reply.
    For the development guideline i had followed "http://www.erpschools.com/apps/oracle-applications/articles/Fusion-Middleware/SOA/BPEL/BPEL-Database-Adapter-Part-2/index.aspx" this document. Instead of using "select" query, here I am using database procedure to get output.
    For this I am giving input as "Abhijit" and database procedure "GETCONCATESTRING" is returning value as "Abhijit Extra added",
    but finally i am getting this error:
    Invoke_DBService
    [2011/02/22 12:55:08]
    Invoked 2-way operation "DBAdaptor2_Service" on partner "DBAdaptor2_Service".
    - <messages>
    - <Invoke_DBService_DBAdaptor2_Service_InputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    - <InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/GETCONCATESTRING/">
    <PARAM1> Abhijit </PARAM1> </InputParameters> </part> </Invoke_DBService_DBAdaptor2_Service_InputVariable>
    - <Invoke_DBService_DBAdaptor2_Service_OutputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
    - <db:OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/ *GETCONCATESTRING* /">
    <PARAM2> Abhijit     Extra added </PARAM2></db:OutputParameters></part>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="response-headers">[]</part>
    </Invoke_DBService_DBAdaptor2_Service_OutputVariable></messages>
    Please Guide me to use Receive Activity for output.
    Edited by: 815926 on Feb 21, 2011 11:41 PM
    Edited by: 815926 on Feb 21, 2011 11:42 PM

  • Evaluate String Expression

    Hi all,
    I am trying to evaluate a string expression against rows of data. If the data satisfys that condition/expression then its selected otherwirse its not.
    To re-iterate how to evaluate a string expression like: "value < 1"
    against data values like: 0, 1, 2 ...n
    Any help will be appreciated. Thanks in advance.
    Here's the code I am using:
          * Evaluates the Expression Either return True or False
          * @return
      public boolean evalExpression() {
              boolean retval = true;
              // Identify the conditional process step
              if (this.isConditional()) {
                   // get the inputs
                   for (int i = 0; i < myInputs.size(); i++) {
                        ContainerDataElement containerDataElement = (ContainerDataElement) myInputs
                                  .elementAt(i);
                        String data = containerDataElement.getValueAsString();
                                            // Get the conditions
                        for (int j = 0; j < myProcessConditions.size(); j++) {
                             ProcessCondition pc = (ProcessCondition) myProcessConditions
                                       .elementAt(j);
                                  Boolean condition = new Boolean(pc.getExpression());
                                                      // Evaluate the expression against the data elements
                             if (condition.booleanValue()) {
                                  retval = true;
                             else {
                                  retval = false;
              return retval;
         }

    ProcessCondion holds the Expression but I need to match the value the expression matches.
    A bit like equals example I am trying out now:
      public boolean evalExpression() {
              boolean retval = true;
              // Identify the conditional process step
              if (this.isConditional()) {
                   // get the inputs
                   for (int i = 0; i < myInputs.size(); i++) {
                        ContainerDataElement containerDataElement = (ContainerDataElement) myInputs
                                  .elementAt(i);
                        String data = containerDataElement.getValueAsString();
                        com.aim.common.DebugLog.debug("dataELEMENTS--------"
                                  + data.toString());
                        // Get the conditions
                        for (int j = 0; j < myProcessConditions.size(); j++) {
                             ProcessCondition pc = (ProcessCondition) myProcessConditions
                                       .elementAt(j);
                             com.aim.common.DebugLog.debug("ProcessCondition--------"
                                       + pc.toString());
                             Boolean condition = new Boolean(pc.getExpression());
                             com.aim.common.DebugLog.debug("condition--------"
                                       + condition.toString());
                             // Evaluate the expression against the data elements
                             if (containerDataElement.equals(condition)) {
                                  com.aim.common.DebugLog.debug("conditionEVALUATED--------"
                                            + retval);
                                  retval = true;
                             else {
                                  retval = false;
              return retval;
         }

  • The Expression Engine failed to evaluate the expression for a Subportal Act

    Anyone seen this error before and know of a fix? We're getting it on our 6.1 MP1 portal after we deployed our custom sso solution.
    "62     12-19-2007     12:58:37.292     Error     Portal_UI_Infrastructure     portal.c27mynrspaxr01.webadm     .NET #32     com.plumtree.portaluiinfrastructure.condition.ConditionTypeManager     The Expression Engine failed to evaluate the expression for a Subportal Action.
    System.NullReferenceException: Object reference not set to an instance of an object.
    at com.plumtree.portaluiinfrastructure.condition.ConditionTypeManager.EvaluateExpressionForSubportalAction(AActivitySpace asCurrentSpace, IApplication application, IXPRequest xpRequest, Object ptUserSession) in e:\buildroot\Release\portalui\6.1.x\ptwebui\portaluiinfrastructure\dotnet\prod\src\com\plumtree\portaluiinfrastructure\condition\ConditionTypeManager.cs:line 260 <ptLogMsgEnd>"

    As far as i know this is a harmless error. Our portal generated that message every time someone browsed /portal/server.pt.

  • How can I use evaluate to get the instance variable in customized tag

    1.
    At first , I create a class called bean,and declared several params in it and do not define any getter function for the param.
    class bean{
    String param = "test";
    SomeClass scObj = new SomeClass();
    2.
    The second ,I use
    request.setAttribute("beanObj",new bean());
    3.
    And then I wanna use the customized tag to show a text box , then initialize it's value.
    <salt:text name="param" value="beanObj.param">
    <salt:text name="obj" value="beanObj.scObj.func()">
    4.
    I tried the evaluator provided by JexlContext ,Struts, JSTL and it seems that if I do not define the getter for the variable ,I can not get the bean's instance variable's value.
    Expression e = ExpressionFactory.createExpression( value );
    JexlContext jc = JexlHelper.createContext();
    jc.getVars().put(strInitBeanName, request.getAttribute("beanObj"));
    Object obj = e.evaluate(jc);
    the result of the obj is null....
    Can anybody recommand some other evaluator can get the value of a instance variable from an object?

    do you have any other suggestion ? Nops, somebody else may have though. AFAIK, all lookups of the type
    beanName.propertyNameuse reflection on the getXXX() methods to access the property.
    Having said that, I guess you could write one though in a custom tag, using the same - reflection (you will ahve to rely on the java.lang.reflect.Field class quite heavily) - but that would be reinventing the wheel for most other functionality that you would have to include (like looking up the bean in scope etc)
    cheers,
    ram.

  • Evaluate function to convert presentation variable to date not working..

    Hi,
    I have a calendar prompt on my dashboard and the presentation variable for this prompt is PV1.
    I am using this variable in my report to create a calculated column. The condition for the calc column runs something like
    case WHEN "Time"."Day" >= ANY(SELECT saw_3 FROM(SELECT "Time"."Start Date" saw_3 FROM "xyz_subject_area" WHERE "Time".Day = CAST(EVALUATE('TO_DATE(%1,%2)' AS DATE, '@{PV1}{@{system.currentTime}[MM/DD/YYYY]}', 'MM/DD/YYYY HH:MI:SS AM' ) AS DATE)) EX1) then "ABC"."Units" else "XYZ"."Units" end
    However when I checked the expression EVALUATE('TO_DATE(%1,%2)' AS DATE, '@{PV1}{@{system.currentTime}[MM/DD/YYYY]}', 'MM/DD/YYYY HH:MI:SS AM' ) is not returning the date always. I am not sure why for some rows it is working correctly and for some it is not returning any value.
    Please let me know if there another better way to convert the presentation variable value to date.

    Hi User,
    What is the data type of the column you are using in the prompt?
    I think a datetime data type will by default cause OBIEE to wrap the presentation variable in the TIMESTAMP syntax if you just do this '@{PRESENTATION_VAR}'.
    If you, did not base it on the datetime data type, then try the following:
    cast( LEFT( '@{MY_DATE}' ,4 ) || '/' || SUBSTRING( '@{MY_DATE}' FROM 6 FOR 2) || '/' || SUBSTRING( '@{MY_DATE}' FROM 9 FOR 2)||' 00:00:00' as date)
    In order to use OBIEE to cast as a DATE, your string needs to be in the form YYYY/MM/DD HH24:MIN:SS
    Good luck!
    -joe

  • ADF Groovy Expression with bind variable and ResourceBundle

    Now I have ViewObject which have WHERE clause with bind variable.
    This bind variable is for language. Within bind variable I can change Value Type to Expression and into Value: I put +(ResourceBundle.getBundle("model.ModelBundle")).getString("language")+.
    Now if I run Oracle Business Component Browser (on AppModule) this works. In my ModelBundle.properties there is language=1 name-value pair. And with different locale I have different language number.
    Now if I put that ViewObject on one JSF, this bind variable expression does not work any more. Error:
    *oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.util.MissingResourceException, msg=Can't find bundle for base name model.ModelBundle, locale my_locale*
    Any ideas?
    10x
    Zmeda

    The most wierd thing is that, if I make ViewObjectImpl and insert this method
    public String getLanguage() {
    return (ResourceBundle.getBundle("model.ModelBundle")).getString("language");
    and call it in Bind Variable Expression Value: viewObject.getLanguage()
    IT WORKS!
    But why with groovy expression it does not work?
    Zmeda

  • Regular Expressions and String variables

    Hi,
    I am attempting to implement a system for searching text files for regular expression matches (similar to something like TextPad, etc.).
    Looking at the regular expression API, it appears that you can only match using string variables. I just wanted to make sure this is true. Some of these files might be large and I feel uneasy about loading them into ginormous Strings. Is this the only way to do it? Can I make a String as big as I want?
    Thanks,
    -Mike

    Newlines are only a problem if you're reading the
    text line-by-line and applying the regexp to each
    line. It wouldn't catch expressions that span
    lines.
    @sabre150: your note re: CharSequence -- so what
    you're suggesting is to implement a CharSequence that
    wraps the file contents, and then use the regexps on
    the whole thing? I like the idea but it seems like
    it would only be easy to implement if the file uses a
    fixed-width character set. Or am I missing
    something...?You are correct for the most basic implementation. It is very easy to create a char sequence for fixed width character sets using RandomAccessFile. Once you go to character sets such as UTF-8 then more effort is required.
    While ever the regex is moving forward thought the CharSequence one char at a time there is no problem because one can wrap a Reader but once it backtracks then one needs random access and one will need to have a buffer. I have used a ring buffer for this which seems to work OK but of course this will not allow the regex to move to any point in the CharSequence.
    'uncle_alice' is the regex king round here so listen to him.
    :-( I should read further ahead next time!
    Message was edited by:
    sabre150
    Message was edited by:
    sabre150

  • Using expression trees to evaluate an expression

    i have a three parameters like age, sex and location. Now, my users while registration, can specify an expression like, age > 25 and age < 30 and sex = male OR location = 'London'. Now i get an incoming request which has certain values for age, sex and location (say: age=26 sex = male location = 'London'). Then i want to get a list of all the users registered with me who satisfies the incoming criteria. Do you think an expression tree would help me in this case? can pls someone guide me?

    actually i have a fixed list of operators and operands. The only variation being that users while registration might use only a subset of those operators and operands e.g. some users may just give an expression such as 'sex=male' and some other users could give an expression such as 'sex = female AND age > 21'. So when i get an incoming request saying sex = female and age = 22 then only my second kind of users would be selected and suppose if i get an incoming message like sex = male , age = 33 then my first kind of users (though no age is specified by that user while registration but still he would be selected as the expression said sex = male and that is one of the parameters of the incoming request) would be selected. Now how do i create such a solution using an expression tree, which would evaluate the incoming request and then match it with the expression specified by the various users to find the list of those users who qualify according to the incoming request parameters. any ideas??

  • Evaluate Regular expression complexity

    Hi all
    I've a problem on regular expression usage in my application.
    I'm using a regular expression to identify objects and fetch them to be served depending on an input string with has to be matched.
    each object has a property representing a regular expression to be matched to be candidate for fetching.
    my program receive an external input string, then loops on the full objects collection identifying which are the object whose regular expression match the input stream.
    doing an example:
    obj1) key = "J*SDK"
    obj2) key = "Ja*6*"
    obj3) key = "JEE*"
    if the input string is "Java 6.0 SDK" obj1 and obj2 are cadidate, while obj3 is discarded.
    up to now everithing is fine, now here is my question:
    i want only one object as output and I want the one best matching my input string.
    this means that
    -> obj1 is matching 4 chatacter ans has only one wildchar
    -> obj2 is matching 3 characters and has two wildcard
    so obj2 is discarded since it's regular expression is more complex than the obj1 one
    my problem is HOW to evaulate correctly such complexity for each candidate object to be able to choose my best object.
    is there some formal rule / api for this?
    I'd like to match all wildcards into the regex, but doing this "by hand" would surely result in some bug due to some missing case, so a "third party" API or a grammar rule would be useful.
    hoping for you help.
    regards
    Michele Sacchetti

    ok, after days and days of research i came up to this solution:
    1) I used this (http://www.brics.dk/automaton) package for regular expression which let me access the internal state automa data
    2) use the getShortestExample() method to retrieve the shortest string matching the given regExp
    3) evaluate the Levenshtein Distance between the given string and the one to be matched
    PROs:
    1) the regexp logic is fully handled by the same state machine which take cares of pattern matching in the first phase
    2) the library provide me a non-regexp string to be used with comparison (e.g Levenshtein Distance evaluation)
    CONs:
    1) the methods getShortestExample is unaware of string to be matched, so if i use "aab|aaa" to match "aab" the method gets the first shortest sort alfabetically, that is "aaa", so I get a LD of 1 even if it should be 0, but it's quite a good deal for my application.
    @endasil : your solution rely on grouping, and is based on a pre-parsing done manually so it basically went back to the "manual" parsing i wanted to avoid
    Another way I'd like to give a try but had to give up was to use ANTLR (www.antlr.org) to create a parser for regular expression and then evaluating the resulting "tree size" of the parser, but wasn't able to find a formal description of RegExp grammar on the net.
    do you have any suggestion or comment on my solution (or other to give a try? )

  • Regular expression result into variable??

    Im dealing with log files here...i use regular expression to detect the values...how can i save these values into variable, for example 25-07-2005 into "date"?
    this is how my output statement look like
    myOutput1.print(matcher1.group(1));
    matcher1.group is the way i use to get the value using regular expression

    thanx...actually i have already match it in groups and it works fine..the problem is im dealing with log files...what im trying to do is reformat back the log files collected...example.."8 Nov" change it to 8-11-2005
    When i match it into the group its actually just finding the pattern, not saving it into variable..if its save in the variable would be easier..
    how can i change "8 Nov" to 8-11-2005?? can anyone help me with a simple code???
    thanks

  • Evaluate binding expressions #{...} from Bean methods?

    Hello all,
    is it possible to evaluate the binding expressions that are usually given in the JSP page (e.g. #{someObject.someProperty} ) from a Bean method?
    I am currently searching for a more convenient way of accessing the resource bundle from a validator and could imagine an access over #{msg.someText}.

    Hello all,
    is it possible to evaluate the binding expressions that are usually given in the JSP page (e.g. #{someObject.someProperty} ) from a Bean method?
    I am currently searching for a more convenient way of accessing the resource bundle from a validator and could imagine an access over #{msg.someText}.

  • Thread to evaluate arithmetic expressions

    I'm trying to write a program that evalutaes arithmetic expression concurrently using Java concurency primitives. The idea behind the threading is to avoid multiple evaluations of common subexpression. I have attached the code that I have written so far but was hoping someone could offer me a hand with the evaluate() and run() methods contained at the end of the program. Thanks.
    public class Example {
         public static void main(String[] args) {
              BinaryOp plus = new BinaryOp() {
                   public int apply(int n1, int n2) {
                        return n1 + n2;
              BinaryOp times = new BinaryOp() {
                   public int apply(int n1, int n2) {
                        return n1 * n2;
              Arith e1 = new Operator(plus, new Number(4), new Number(5));
              Arith e2 = new Operator(plus,new Operator(times, new Number(3), e1),
                   new Operator(plus, e1, new Number(6)));
              Arith e3 = new Operator(times, e2, e2);
              System.out.println(e3.evaluate());
    interface BinaryOp {
         // An operator that can be applied to two numbers
         int apply(int n1, int n2);
    interface Arith {
         // An arithmetic expression that can be evaluated.
         int evaluate();
    class Number implements Arith {
         private int n;
         Number(int n) {
              this.n = n;
         public int evaluate() { // A number evaluates to itself.
              return n;
    class Operator implements Arith, Runnable {
         private BinaryOp op;
         private Arith e1;
         private Arith e2;
         private boolean done = false;
         private int result = 0; // holds the result of previous evaluation
         Operator(BinaryOp op, Arith e1, Arith e2) {
              this.op = op;
              this.e1 = e1;
              this.e2 = e2;
              (new Thread(this)).start();
         public int evaluate() {
         public void run() {
    }

    I'm trying to write a program that evalutaes arithmetic expression
    concurrently using Java concurency primitives. The idea behind the
    threading is to avoid multiple evaluations of common subexpression. Interesting ... the main problem however is to find those common
    subexpressions. Most of the evaluation of those common subexpressions
    can be done in the parse/compile phase though, effectively elliminating
    the need for threads, e.g. (foo+bar)-(foo+bar) can be deduced to be
    equal to zero if both 'foo' and 'bar' happen to referential transparent,
    i.e. they don't have side effects.
    What you're doing now is just starting a new thread for every binary operator.
    This is, most likely, not what you want. The strategy of what thread to
    start for which subexpression must have layed out the sequence of
    threads to start before actual evaluation is started (also see above).
    kind regards,
    Jos

  • Jstl: ExpressionEvaluator.evaluate  versus  Expression.evaluate

    Hi,
    Reading the jstl API, I noticed the method ExpressionEvaluator.evaluate().
    On the other hand, ExpressionEvaluator also returns an Expression, which has its own evaluation method: Expression.evaluate().
    Isn't this redundant ? Which method would be used on which occasion ?
    Also, I was wondering: do I understand correctly, that one could override the ExpressionEvaluator ? So if I write my own evaluator, I could make it so that "${2+2}" evaluates to, say, "5" ?
    Thanks very much.

    Hi,
    Reading the jstl API, I noticed the method ExpressionEvaluator.evaluate().
    On the other hand, ExpressionEvaluator also returns an Expression, which has its own evaluation method: Expression.evaluate().
    Isn't this redundant ? Which method would be used on which occasion ?
    Also, I was wondering: do I understand correctly, that one could override the ExpressionEvaluator ? So if I write my own evaluator, I could make it so that "${2+2}" evaluates to, say, "5" ?
    Thanks very much.

Maybe you are looking for

  • Display Subtotals on ALV Report W/O changing Layout

    Hi , I need to display subtotals of quantity fields in my output of report ,with corresponding production order by using ALV container,Layout default seetings won't work here because user has to do many operations such as sorting filtering etc ,after

  • In pre-CC versions could just type a number to select a page to print and now you can't

    I just recently upgraded to CC and I produce thousands of files and have to output PDF files of each page and name them differently (ie. filename-front.pdf for page 1 and filename-back.pdf for page 2). I used to be able to do this very fast by just t

  • Activating Direct Posting to G/L Accounts and Material Accounts

    Hi, Can anyone plz tell me with some examples ,what is the relevance of this ,'Activating Direct Posting to G/L Accounts and Material Accounts'. Link for this is as below : spro/Materials Management/ Logistics Invoice Verification / Incoming Invoices

  • Macro to convert Units to dollars (Product master)

    Hi experts, We want to forecast in units and convert units to dollars . What is the easiest way to convert units to dollars in planning book . Is there any way I can write a macro which picks up unit forecast in planning book and multiply with unit p

  • Help in Creating a Control

    Dear Friend I am Trying to create a small reporting control. It should contain the Following Featues. 1) Give a Heading 2) Give sub Headings 3) Show database records 4)Print the Page. But i don't have any idea From where to start in Java. I mean how