I'm trying to load em spots using massload. I'm finding the internal alias method of idresgen.bat is only resolving the internal alias for foreign key references, but I need to use the value in dmelementnvp value column which doesn't have a foreign key reference.
In the sample code below the last dmelementnvp definition is rejected with an error that value could not be resolved. Does anyone know how to resolve the emspot id to populate the value column required?
<emspot
emspot_id="#emspot_id_1"
storeent_id="&MAR_STOREENT_ID;"
name="Home_BestSellers"
description="Display catalog entry recommendations from Coremetrics Intelligent Offer on the home page."
usagetype="MARKETING"
supportedtypes="P"
/>
<dmactivity
dmactivity_id="#dmactivity_bestseller1"
storeent_id="&MAR_STOREENT_ID;"
name="HomePageBestSellersActivity"
description="The test activity for the home page best sellers"
published="1"
state="1"
behavior="1"
dmcampaign_id="#campaign_initial_launch"
/>
<dmelement
dmelement_id="#dmactivity_bestseller_elem1"
name="Flow0.0"
dmeletemplate_id="6"
dmactivity_id="#dmactivity_bestseller1"
sequence="0"
/>
<dmelement
dmelement_id="#dmactivity_bestseller_elem2"
name="Coremetrics Target"
dmeletemplate_id="339"
dmactivity_id="#dmactivity_bestseller1"
sequence="1500"
parent="Flow0.0"
/>
<dmelement
dmelement_id="#dmactivity_bestseller_elem3"
name="Espot Target"
dmeletemplate_id="105"
dmactivity_id="#dmactivity_bestseller1"
sequence="1000"
parent="Flow0.0"
/>
<dmelementnvp
dmelement_id="#dmactivity_bestseller_elem2"
name="zoneIdList"
value="ZoneA"
/>
<dmelementnvp
dmelement_id="#dmactivity_bestseller_elem3"
name="emsId"
value="#emspot_id_1"
/>
I would ask this question to IBM Software Support.
Related
I'm trying to create a basic proxy server so I can keep track of what my kids are doing web wise - I know there are products out there but I thought it would be an interesting exercise to write one myself.
I have the following code that kind of works but doesn't pull any images or css through - I guess because it makes another call to the remote server and gets confused
<cfhttp url="https://www.bbc.co.uk">
<cfhttpparam type="header" name="Proxy-Connection" value="keep-alive" >
<cfhttpparam type="header" name="Accept" value="application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5">
<cfhttpparam type="header" name="Accept-Language" value="en-US,en;q=0.8">
<cfhttpparam type="header" name="Accept-Charset" value="ISO-8859-1,utf-8;q=0.7,*;q=0.3">
</cfhttp>
<cfset html = cfhttp.FileContent />
<cfoutput>#html#</cfoutput>`
What am I missing?
What you want to use is the resolveurl parameter of - set it to yes/true. This defaults to no.
What this parameter does is resolves relative paths to absolute paths automatically for you.
Now, if you want to change those paths as well, you would change them to also route through your http proxy script, but there won't be much use as you won't know much about the content regardless.
resolveurl should hook you up with what you are looking for. cheers.
https://cfdocs.org/cfhttp (look for resolveurl tag attribute)
I am wanting to run a standard script task in package level events (OnError, OnPreExecute, OnPostExecute) for logging.
Ideally I would like to be able to just copy and paste the Script task, but it needs to know the Event that it is running inside of. Currently I pass that in as a use variable, but this means that I need to manually set the variable to store the name of the event. That's not too arduous, but it is easily forgotten. Thus my question is, is there a performant way to detect which event the script task is running within.
My suspicion is that this is not easy as essentially this is the same as finding out the name of the parent container, which turns out to be next to impossible.
Another option is to be able to sniff the scope of standard event variables, such as 'EventHandlerStartTime', but I can't find a way to determine the scope of a variable from within the script task.
Any help is much appreciated.
Since #Mark mentioned Biml, I thought I'd take a moment to explode out the concept of using some very basic concepts to make this happen.
Assuming I had a pathetic logging table like
CREATE TABLE
dbo.DoWhat
(
PackageName nvarchar(150) NULL
, ParentContainerGUID varchar(38) NULL
, SourceDescription nvarchar(1000) NULL
, SourceName nvarchar(150) NULL
, SourceParentGUID varchar(38) NULL
, EventName varchar(20) NULL
);
then I could define a "function" in a file called inc_events.biml
What that says, this file expects a parameter of type string that will populate the eventName variable. I then use a classic ASP style syntax for subbing in that value <#=eventName#>
So, this biml will create an Event. That event has a Variable named WhereAmI that is scoped to the Event. I then have an Execute SQL Task in there that does an insert into the logging table passing along System variables and my local variable name.
You're looking to use a Script Task so you'd replace the Execute SQL Task but the concept is the same. There's a something in there that's going to use our local variable that had the event's name assigned to it.
<## property name="eventName" type="String" #>
<Event EventType="<#=eventName#>" ConstraintMode="Linear" Name="<#=eventName#>">
<Variables>
<Variable DataType="String" Name="WhereAmI"><#=eventName#></Variable>
</Variables>
<Tasks>
<ExecuteSQL ConnectionName="tempdb" Name="SQL Log notes">
<VariableInput VariableName="User.QueryLog"></VariableInput>
<Parameters>
<Parameter DataType="String" VariableName="System.PackageName" Name="0" />
<Parameter DataType="AnsiString" VariableName="System.ParentContainerGUID" Name="1" DataTypeCodeOverride="129" />
<Parameter DataType="String" VariableName="System.SourceDescription" Name="2" />
<Parameter DataType="String" VariableName="System.SourceName" Name="3" />
<Parameter DataType="AnsiString" VariableName="System.SourceParentGUID" Name="4" DataTypeCodeOverride="129" />
<Parameter DataType="AnsiString" VariableName="User.WhereAmI" Name="5" DataTypeCodeOverride="129" />
</Parameters>
</ExecuteSQL>
</Tasks>
</Event>
Using the include file
I add a second Biml file, so_27378254_inc.biml to my project. This one is going to demonstrate how we use the function/include file.
I define an OLE DB database connection in Connections collection called tempdb
In my Packages collection, I define a new package called so_27378254_inc. It has a Variable, QueryLog which just contains the format for an insert statement into my log table.
In the package's Events collection, I then invoke CallBimlScript 3 times, one for each Event Handler I want to add at the package level scope.
Into the Tasks collection, I add a Sequence Container just so I can get some variety in my log.
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Connections>
<OleDbConnection Name="tempdb" ConnectionString="Data Source=localhost\dev2014;Initial Catalog=tempdb;Provider=SQLNCLI10.1;Integrated Security=SSPI;" />
</Connections>
<Packages>
<Package ConstraintMode="Linear" Name="so_27378254_inc">
<Variables>
<Variable DataType="String" Name="QueryLog">
<![CDATA[INSERT INTO
dbo.DoWhat
(
PackageName
, ParentContainerGUID
, SourceDescription
, SourceName
, SourceParentGUID
, EventName
)
SELECT
? /* AS PackageName */
, ? /* AS ParentContainerGUID */
, ? /* AS SourceDescription */
, ? /* AS SourceName */
, ? /* AS SourceParentGUID */
, ? /* AS EventName */
;]]>
</Variable>
</Variables>
<Events>
<#=CallBimlScript("inc_events.biml", "OnError")#>
<#=CallBimlScript("inc_events.biml", "OnPreExecute")#>
<#=CallBimlScript("inc_events.biml", "OnPostExecute")#>
</Events>
<Tasks>
<Container Name="SEQC Container on Control Flow" ConstraintMode="Linear">
</Container>
</Tasks>
</Package>
</Packages>
</Biml>
So, what do you do with it? You right click on the so_27378254_inc.biml file and whoosh, a new package is generated.
How the heck do I sell this?
You mention in your comments, and rightfully so, concerns over anything that would "add friction to adoption".
My counter to that is
BIDS Helper is free and if you're not using it, you're not being as effective in your delivery as you could be. Especially pre-2012, there's just too many sharp edges in the product.
Using an approach like this will get everyone to a consistent starting point, without some of the hassles that come with template packages (IDs are not automatically updated until 2012)
You don't have to go all in on the Biml approach. Assuming you're the architect/lead developer, use it to define best practices. Everyone has logging turned on, apply configurations, get the standard connections defined, etc. All people have to do is instead of creating new SSIS, they right click and generate the template package and then rename it to something appropriate and they're off the races worrying about data flows and file acquisition, etc.
I'm currently evaluating the Spring-db4o integration. I was impressed by the declarative transaction support as well as the ease to provide declarative configuration.
Unfortunately, I'm struggling to figure how to create an index on specific fields. Spring is preparing the db during the tomcat server startup. Here's my spring entry :
<bean id="objectContainer" class="org.springmodules.db4o.ObjectContainerFactoryBean">
<property name="configuration" ref="db4oConfiguration" />
<property name="databaseFile" value="/WEB-INF/repo/taxonomy.db4o" />
</bean>
<bean id="db4oConfiguration" class="org.springmodules.db4o.ConfigurationFactoryBean">
<property name="updateDepth" value="5" />
<property name="configurationCreationMode" value="NEW" />
</bean>
<bean id="db4otemplate" class="org.springmodules.db4o.Db4oTemplate">
<constructor-arg ref="objectContainer" />
</bean>
db4oConfiguration doesn't provide any means to specify the index. I wrote a simple ServiceServletListener to set the index. Here's the relevant code:
Db4o.configure().objectClass(com.test.Metadata.class).objectField("id").indexed(true);
Db4o.configure().objectClass(com.test.Metadata.class).objectField("value").indexed(true);
I inserted around 6000 rows in this table and then used a SODA query to retrieve a row based on the key. But the performance was pretty poor. To verify that indexes have been applied properly, I ran the following program:
private static void indexTest(ObjectContainer db){
for (StoredClass storedClass : db.ext().storedClasses()) {
for (StoredField field : storedClass.getStoredFields()) {
if(field.hasIndex()){
System.out.println("Field "+field.getName()+" is indexed! ");
}else{
System.out.println("Field "+field.getName()+" isn't indexed! ");
}
}
}
}
Unfortunately, the results show that no field is indexed.
On a similar context, in OME browser, I saw there's an option to create index on fields of each class. If I turn the index to true and save, it appears to be applying the change to db4o. But again, if run this sample test on the db4o file, it doesn't reveal any index.
Any pointers on this will be highly appreciated.
Unfortunately I don't know the spring extension for db4o that well.
However the Db4o.configure() stuff is deprecated and works differently than in earlier versions. In earlier versions there was a global db4o configuration. Not this configuration doesn't exist anymore. The Db4o.configure() call doesn't change the configuration for running object containers.
Now you could try to do this work around and a running container:
container.ext().configure().objectClass(com.test.Metadata.class).objectField("id").indexed(true);
This way you change the configuration of the running object container. Note that changing the configuration of a running object container can lead to dangerous side effect and should be only used as last resort.
As described in http://n4.nabble.com/Grails-Data-Binding-for-One-To-Many-Relationships-with-REST-tp1754571p1754571.html i'm trying to automatically bind my REST data.
I understand now that for one-to-many associations the map that is required for the data binding must have a list of ids of the many side such as:
[propName: propValue, manyAssoc: [1, 2]]
However, I'm getting this exception
Executing action [save] of controller [com.example.DomainName] caused exception: org.springframework.orm.hibernate3.HibernateSystemException: IllegalArgumentException occurred calling getter of com.example.DomainName.id; nested exception is org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of com.example.DomainName.id
However, even weirder is the update action that is generated for the controller. There we have the databinding like this:
domainObjectInstance.properties = params['domainObject']
But, and this is the really weird thing, params['domainObject'] is null! It is null because all the domainObject fields are passed directly in the params map itself. If I change the above line to
domainObjectInstance.properties = null
the domainObject is still updated! Why is this happening and more important, how can I bind my incoming XML automatically if it comes in this format (the problem is the one-to-many associations):
<product>
<name>Table</name>
<brand id="1" />
<categories>
<category id="1" />
<category id="2" />
</categories>
</product>
It's not 100% clear from your example - what exactly is the contents of your "params" when you try to bind.
If you don't have "domainObject.xxx=yyy" post parameters defined, then nothing will be in params['domainObject']. Namespacing like that is not necessary in most cases, and required the form fields to use the prefix.
I'm guessing your data is coming in as "xxx=yyy" not "domainObject.xxx=yyy".
Furthermore, I'm not sure that [1,2] for associations is right either. Surely that should be [id:1, id:2] ?
AFAIK it's done like this:
Product:
<Merge Id ="HelpInstaller" SourceFile="HelpInstaller.msm" Language="1033" DiskId="1">
<ConfigurationData Name="SurpressInstallation_Config" Value="&HelpFeature"/>
</Merge>
Merge Module:
<Property Id="SupressInstallation" Value='0' />
<Substitution Table='CustomAction' Row='SetSupressInstallationProperty' Column='Target' Value='[=SupressInstallation_Config]'/>
<CustomAction Id='SetSupressInstallationProperty' Property='SupressInstallation' Value='[SupressInstallation]'/>
<InstallExecuteSequence>
<Custom Action='SetSupressInstallationProperty' Before='RegisterHelp' />
<Custom Action='RegisterHelp' After='CostFinalize'>(NOT Installed) AND (NOT UPGRADINGPRODUCTCODE) AND SupressInstallation = 3) </Custom>
</InstallExecuteSequence>
But when i did it like above i get an error:
Encountered an unexpected merge error of type 'msmErrorDataRequestFailed' for which therer is currently no error messagte to display.
Can anyone tell me howto solve that problem? What i basically want to do is to execute a custom action in the merge module only when a certain feature is selected..Is this the right way to do it? Thanks Daniel
You have to define Configuration node under module:
<Property Id="SupressInstallation" Value='0' />
<Configuration Name="SupressInstallation_Config" Format="Text"/>
<Substitution Table='CustomAction' Row='SetSupressInstallationProperty' Column='Target' Value='[=SupressInstallation_Config]'/>
<CustomAction Id='SetSupressInstallationProperty' Property='SupressInstallation' Value='[SupressInstallation]'/>
<InstallExecuteSequence>
<Custom Action='SetSupressInstallationProperty' Before='RegisterHelp' />
<Custom Action='RegisterHelp' After='CostFinalize'>(NOT Installed) AND (NOT UPGRADINGPRODUCTCODE) AND SupressInstallation = 3) </Custom>
</InstallExecuteSequence>
That sounds like a bug. You should at least get a more descriptive error message explaining what went wrong. Feel free to file the bug at http://wixtoolset.org/bugs
A feature has a dependency on a merge module, not the other way around. Nothing in the merge module should have a reference to anything outside of the merge module such as a ProductName, ProductCode or Feature name because that would tightly couple the merge module to a specific product rather then being a generic reusable module. Doing such would essentially create a circular reference and is not idea.
What you probably need ( hard to say without knowing more information ) is to use the action state of one of the Components in the merge module for your condition.
For example if component1 has file1 and you need customaction1 to fire when this component/file is being installed then you'd use an expression of:
$component1=3 //INSTALLSTATE_LOCAL
That way if this merge module gets merged into Product1, Product 2 or Product3 with Feature Name A, B or C it won't matter because the association is at the component level.
If the feature you are trying to tie off of is a different feature then this all needs to be moved into a different merge module that get's merged into that feature. You might need to create a dummy component to associate to.
Now if you want to ignore all of this advice, then look at the Feature Action state operator and tightly couple away.
Conditional Statement Syntax