Tuesday, February 17, 2015

Sort blocks in the StreamServe

Some instances we need to sort blocks in the stream server mom development. Think a scenario like below. I have stream file in below architecture.

2M

1L

1L

1L

2M

1L

2M

But I need to print it like below,

1L

1L

1L

1L

2M

2M

2M

There are several way to achieve this task.Doing by MAK is very extensive task.So here im going to play with block sorting option.

I  use PMS241 as my demo project.

First go the event.and double click on it

image

Identify the blocks that you want to sort and apply the sort block priority as below.(In my case case blocks are PMS2414L and PMS2414M.

Set 4L block priority

image

Set 4M block priority.

image

We are done now.Block sort priority lower one come first.That means number is low, then it is get prioritized. same as the M3 print out sorting order.

Finally save and deploy. It should work.  Smile

Thursday, February 12, 2015

Adding site binding gives object null reference error in IIS7

Recently I have tried to add new binding to the my existing site using IIS GUI. But when fill the relevant information and click ok button its ended up with prompting object null reference to me.

image 

But I could not find solution for this but found the another way to do the same task using Appcmd.exe(only available in IIS 7 or above). I want to add new net.tcp biding to the site and I ran below code in the command prompt(please make sure to run comman prompt as Administrator mode- other wise there will be another errors.).

appcmd set site /site.name: contoso /+bindings.[protocol='https',bindingInformation='*:443:'].

Wednesday, February 11, 2015

How to hide overlay in StreamServe

In some times you have to hide the overlay in stream serve dynamically. For a example if the activity is print you want to skip the overlay and if its mail need to continue with the overlay.But in this case you cannot use normal Skip function as overlays are static content. But there are several ways to do this task and in this post am going tell you to do this via a variable which is used the the overlay properties.

So first you have to go to the overlay properties and assign variable for it.

Untitled

image

Assign variable name as mentioned above(you can have any name for the variable and same should use in the script part.) Please make sure to Tick the “supress overlay” check box.

Now we are done in the overlay.

Then move the Body or what ever page that you use the overlay and add a script before page load event and apply below code.

In this example I going to skip the overlay when the activity is prints

if(&mvx_activity ==”PRINT”){

$prabodha = “TRUE”;

}else{

$prabodha = “FALSE”;

}

Bingo it should work.