cancel
Showing results for 
Search instead for 
Did you mean: 

A Few Problems!

Former Member
0 Kudos

Hi Friends,

Once again, I am in trouble.

<b>1) BLS is not working</b>

It says that the connection has lost (which i dont really understood.. What connection this freak java console is talking about. SQL Server is pretty happy. IIS is cool.. Wht else the moron want?)

I have added the error msg in the end of this message.

<b>2) Can you guyz give me solution for this example problem:</b>

I have a table with five cols:

a b c d date

I want two variables

X = axb

& Y = cxd

I want to plot a graph for Y Vs X

And it should be sth like i can filter for a particular date too.

All i have understood about xMII is Query Templates (using fixed query) and Display Templates. If you guyz can tell a lil bit about how to create such variables and filters in BLS, it would be great. And, yeah, yeah.. I have tried the help documentation.

-


BLS Error Msg

-


[SYSTEM - ActionComponentCatalog]: Error Loading Component Catalog

[SYSTEM - CatalogUtilities]: Catalog Load error: Status (401): Access Denied

java.lang.Exception: Status (401): Access Denied

at com.lighthammer.xml.XMLHandler.getDocument(XMLHandler.java:213)

at com.lighthammer.xacute.common.CatalogUtilities.GenericLoad(Unknown Source)

at com.lighthammer.xacute.core.Globals.getInstance(Unknown Source)

at com.lighthammer.xacute.core.Globals.forceReload(Unknown Source)

at com.lighthammer.xacute.editors.transaction.CMSLogicEditorFrame.ReloadSharedProperties(Unknown Source)

at com.lighthammer.xacute.editors.transaction.CMSLogicEditorFrame.newTransaction(Unknown Source)

at com.lighthammer.xacute.editors.transaction.CMSLogicEditorFrame.<init>(Unknown Source)

at com.lighthammer.xacute.editors.transaction.CMSLogicEditor.main(Unknown Source)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.sun.javaws.Launcher.executeApplication(Unknown Source)

at com.sun.javaws.Launcher.executeMainClass(Unknown Source)

at com.sun.javaws.Launcher.continueLaunch(Unknown Source)

at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)

at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)

at com.sun.javaws.Launcher.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

[SYSTEM - Globals]: Error encountered during global property load Your connection to the server may have been lost.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Claude

<b>1) BLS is not working - </b>

This seems JWS has some possible bugs/mismatched by somehow. However, check this with administrator

<b>2) Solution to the example - </b>

Step 1 : In BLS, first get a Query which gets that table with 5 columns (A,B,C,D & Date).

Step 2 : Define an XML Document (Using <b>Document</b> Action under <b>xMII XML Output</b> tab), in which define 3 columns (X, Y & Date) in Document configuration.

Step 3 : Loop that table (XML Output from Query in Step 1) using <b>Repeater</b> action under <b>Logic</b> tab with XPath Expression : <b>Query_0.Output{/Rowsets/Rowset/Row}</b>

Step 4 : Within that loop, Use action <b>Row</b> under <b>xMII XML Output</b> tab, where in <u>Configure Object</u> select XML Document output (defined in Step 2) as Document Object and in <u>Configure Links</u> select the newly defined column (say X) under the node IlluminatorRow_0 on the right side panel, then in Expression pad, use such expression : <b>Repeater_0.Output{/Row/A} * Repeater_0.Output{/Row/B}</b>.

Step 5 : Similarly, map the column Y, multiplying C & D following Step 4

Step 6 : Simply map the column Date by direct assignment of Date column from Repeater such as <b>Repeater_0.Output{/Row/Date}</b>

Step 7 : Define an output parameter with XML DataType in Transaction Properties

Step 8: Outside the loop (Just add a sequence under the sequence containing Repeater action), use action <b>Assignment</b> under <b>Logic</b> tab, where map the XML Document output (defined in Step 2) to the Transaction output Parameter (defined in Step 7).

Step 9 : Save this BLS as Xacute Query and get the output parameter which will show a new table with 3 columns X, Y & Date, from which u can plot a graph X Vs Y for a particular date shown in 3rd column.

Please ask me further for any issue while doing this, if necessary

Regards

Som

Former Member
0 Kudos

I had a strong belief that you will surely reply.

Anywayz, I tried doing that stuff, but wasnt been able to finish up. Please have a look at the screenshot.

<a href="http://lh4.google.com/mehta.dheeraj/Ru-V9RIPkeI/AAAAAAAAAGE/OGHieaMO0_Y/xmii_bls_transaction.JPG">BLS Screenshot</a>

<b>Query_0:</b> (used a query template which gives me A,B,C,D, date)

<b>Document_0:</b> (added a document and defined X,Y & DATE)

<b>Repeater_0:</b> ( Used repeater with xPath expression: Query_0.Results{/Rowsets/Rowset/Row} :: i needed to change Query_0.Output to Query_0.Results otherwise it gave error when i click 'execute' under transaction)

<b>Row_0:</b> Executed Step 4 for A & B

<b>Row_1:</b> Executed Step 4 for C & D

<b>Row_2:</b> xPath-> Repeater_0.Output{/Row/date}

<b>Assignment_0:</b> Assigned Row_0 to X, Row_1 to Y, DATE to date

Also, created xml data type (but it says type: input)

But, not sure how to perform step 9. Basically, It doesnt ask for any option of saving it as Xacute Query. I want a spc chart type graph or something like that here as output.

Former Member
0 Kudos

Claude

Sorry for late reply. Here i hv made a complete guide how to do with BLS and Display for Graph

<a href="http://www.esnips.com/web/SomFolder/BLS">Click here</a>

Regards

Som

Former Member
0 Kudos

That was Goddy!!!

The effort you took to compile that document was truely amazing. I owe you one for this.

Former Member
0 Kudos

Hey, Just one more question..

Adding to the previous scenario.. Say I defined 4 variables instead of 3 i.e.

X, Y, Z, date

Z should hold the value X/Y

I tried selecting Z from the right panel and X & Y from the left panel with '/' operator. I assigned them this value but it gave me 'NA' as the value.

I tried using ((ab)/(cd)) but still 'NA'

Former Member
0 Kudos

Claude

R u using Evaluate button for checking the value? It will return the Null Value, though it will show the expected value at runtime. Just check the Values for Z in XacuteQuery instead of Evaluate

Use this logic ((ab)/(cd)) in Row action for Z column. [Dont use X, Y columns which are columns for output]

Regards

Som

Former Member
0 Kudos

yups.. its workin in there.. thanks.

But calculations will get much more complicated with increase in data. There must be some way to use X & Y instead of using from primitive data fields like a,b,c etc.

Former Member
0 Kudos

Claude:

You can "chain" together multiple actions. Thus, you can calculate X and Y in one calculation action, and provide the output of this as the input to another calculation action. That's a quite common practice.

Rick

Answers (3)

Answers (3)

Former Member
0 Kudos

Claude,

Getting multiple outputs from a query template is more black magic than a science, unfortunately. Forget the *. It's is a nice idea, but it won't help you.

I've done a lot of this sort of thing, and here's what I ended up with as my standard.

When you want various output schemas from your query template, in the BLT create different xMII docs for each.

Use the Union action to put them together into one doc. You will end up with multiple Rowset nodes under the root Rowsets.

When you use this with a display template, it will put the first Rowset ONLY into the chart, grid, whatever. The other Rowsets are ignored. But when you do a showDetail on the Applet. it will show all Rowsets. So they are all being delivered, but only the first one is charted.

When you want to get at the other Rowsets, you have to do the same query again using iCommand. Then you can access any data in any Rowset using getValue against the iCommand.

So even though ALL the data is delivered by the query template, you can only access Rowsets after the first using iCommand, which means running the Query template again. For me that presented a performance issue, which I solved with query template caching (that was another 2 weeks of experimenting to figure that out).

Good luck,

Bill

Former Member
0 Kudos

I am still clueless on how to move further.

Former Member
0 Kudos

Hey

I did it!!!

Thanks Bill.. I didnt understood you exactly but, i saved both bls outputs as separate qt and then created an aggregated query which gave me both the results in one go.

Then, I created a new BLS using this aggregated query and rest was click click click (Thanks to Som).

I am really happy to get this working.. May be there will be smaller ways to do this but its working outta my own guesses. Thanks a lot guys.

Former Member
0 Kudos

Claude

Great Job! Keep it up man ;-).

I know ur capacity to learn urself n hv blast with time going 8-)

Regards

Som

Former Member
0 Kudos

Claude,

If your calcs are going to get much more complicated, than I agree with Sue and suggest you learn about the Calculate Columns action. It is a much cleaner way to do the sort of things you are trying to do. For any data manipulation you need to do in your BLT, a thorough understanding of all the XML Functions actions is essential. Of course, your first priority is always to do these calcs in your datasource, .e.g stored procedures, views, etc. But if that's not possible and you have to do logic against data inside the xMII transaction, you'll need the XML Functions.

Regards,

Bill

Former Member
0 Kudos

Thanks Bill.

Can anyone throw some light on how to use Calculated Columns & Aggregated Statistics. I tried using Aggregated Statistics but always got 'NA'.

You can please take the same example of X & Y & say i want to calculate standard deviation for the values of X in Z.

Former Member
0 Kudos

Claude

Y r u using Z column with multiple rows to show Standard Deviation which is Calculation Value of a set of Values. That is Standard Deviation is one Value.

Say, u hv a set of values in X column, so ur desired calculated Standard Deviation for that set will b one value. But u may put the same Value of Standard Deviation in Z column just beside X, Y in that table as follows:

X Y Z Date

14 15 13.96 ....

18 9 13.96 .....

21 16 13.96

45 6 13.96

Now u can see the same values of SD in Z column in the above table, which is redundancy issue in Database Table that should be avoided for best practices in real time business.

So pls use separate output parameter that will show the calculated SD.

<b>How to do with Aggregate Statistics</b>

Step 1: Assume same BLS which i sent previously

Step 2: First define (add) another new output parameter with Data Type 'Double' and check the checkbox Output Parameter from Transaction Properties.

Step 3: Just Right after Row Action and under Repeater Action, add a sequence to Repeater Action. Put Aggregate Statistics Action in that block.

Step 4: Right Click Action > Configure > XPath Xpression :

<b>XMLDocument.Output{/Rowsets/Rowset/Row/X}</b>

Right Click same Action > Links > Link Editor > Select the node 'StdDev' under 'Aggregator' in the Right Panel > Drag-Drop the node X under XMLDocument Action from the Left Panel to that selected node in Right Panel

Step 5: Then in the previous Action 'Assignment' (Which should b put just after Action Aggregate Statistics) > Right Click > Links > Just map the node Aggregator.StdDev on the Left Panel to the node Transaction.SD (defined output parameter in Transaction in Step 1)

Step 6: Done. Now from the same XacuteQuery, test the output parameter and see the desired result (Calculated Standard Deviation for the set of X values)

Regards

Som

Former Member
0 Kudos

Hi Som,

Thanks for the suggestion. I wanted to have it separate only, but wasnt sure if such thing is possible in here.

Anyways, I did exactly how you defined in BLS & when i opened Query Template, with Xacute Query, I saw these options in Outputs box:

xml_output

*

SD

-NONE-

I selected SD, Output was a 0. There wasnt any output in xml_output & '*' which i assume is for showing all output parameter also showed same as SD.

While in Link Editor with Aggregate Statistics, where we select Standard Deviation from Right and 'X' from left, Aren't we required to map ValueSource?

Former Member
0 Kudos

Claude

Did u not get the xml_output previously (yesterday) before doing for SD.

ValueSource is of Data Type with <b>String</b>, which can't interpret the Double Values, if this mapped with Double values or any Data Types Values other than String. So this can not calculate the Statistics Values with ValueSource as String.

Instead u may use just only Configure where ValueSource Selection is defined with X node, whereas u may need no use of Link Editor/Mapping.

Anyway, pls give me the BLS ScreenShot wat u hv done. It should not hv any bug since i tested for SD with the help of Aggr. Stat. Action myself before replying to ur post.

Regards

Som

Former Member
0 Kudos

I did got the output yesterday. And, I am getting it again. But SD is still 0.

These outputs I am getting in query_template:

1) xml_output: Getting correct data (as of yesterday)

2) SD: Getting a 0

3) * : Getting a 0

<a href="http://lh4.google.com/mehta.dheeraj/RvEQvtEovCI/AAAAAAAAAGk/rHQjreMwk1A/xmii_bls_with_aggregator.PNG">BLS with Aggregation</a>

Former Member
0 Kudos

Claude

Here u hv done a small mistake in Action Aggregator

Configure > XPath Expression must be as such :

<b>IllumunatorDocument_0.Output{/Rowsets/Rowset/Row/X}</b>

Not this <b>IllumunatorDocument_0.Output{/Rowsets/Rowset/Row}</b>

Be careful while mapping or selection of XPath expression, otherwise it will lead headache

Regards

Som

Former Member
0 Kudos

Ooops

Now i am getting both xml_output as well as SD, but only 'SD' on the '*'.

I selected '*' as the output and saved the QT. Then I tried mapping this QT in Display Template, but here i see only one column i.e. SD.

I want to plot X Vs Y graph. Also, I want to show the value of SD in that graph. Do I need to prepare two different Query Templates?

Former Member
0 Kudos

If you already have your data in a table, why not use the Calculated Columns action block?

You can configure it to the existing table of data, then create a new column which equals the value of a x b and similarly for your second calcuation. That is much faster than doing the repeater.

The limitation is that it is not as tolerant of mixed data. If you have the occasional text or null data mixed in, it is more prone to crashing than if you use the repeater.

Former Member
0 Kudos

Hey, thanks for the response.

My Objective is to learn xMII and getting familiar with the various things.

Thats why i am not calculating it in a separate column.