Tuesday, February 2, 2016

How to configure java in streamserve control center

In some senarios we want to call external jar files via streamserve direclty . By doing that we can extending the functionally . There is a  nice article about calling java programs throguh streamserve in streamshare by Stefan Cohen. please read it . it explains in details the process of calling the jar file .
http://streamshare.streamserve.com/Articles/Article/?articleId=559
So for that as a prerequisite we need to configure java in control center . Even though control center admin guide has been explained the process, i thought its worth the explain here again with pictures.
First install the java.
https://www.java.com/en/download/
Right click on the application what ever you want to configure java.
image
Then change vender to the Oracle .Thats all for the control center .
image
Then we need to set STRS_JVM and STRS_JAVA_HOME variables in .environment file so for that navigate to the streamserver installation folder .
In my case its like below
C:\Program Files (x86)\OpenText\StreamServe\Applications\StreamServer\5.6.1\Server\bin and open .environment file under admin mode. Other wise it will not allow to save.
image
Set STRS_JVM  and  STRS_JAVA_HOME accroding to the your java installtion .
We are done now . then resrat the service. if there are no issues service will be started .other wise errors will be deplayed on strs_boot.log file .

Enable log in streamserve(dsrv.log)

In some senarios control center application log file (dsrv.log) missing . dsrv.log is very important to the mom developer as it contains the all the project related errors, warning and information .without that very hard to do the developments .
image
In order to display dsrv log we should activate logging  in the relevent platform file .
Go the relevent platform in the design center .
image
right click on the platform and go to the configure platform option.
image
Here after below dialog will be displayed . under log tab check the enable logging check box and there are fiew other options whci you can configure .
image
You can define the name for log file and specifiy the log level as well.
If these setting are ok drsv log should be diplayed on your control center .
Apart from above fact there may be few another cases where dsrv log not displayed in the control center . please refer the below url for that .(from steamshare forum)
http://streamshare.streamserve.com/Forum/Topic/?topicID=4313

Tuesday, January 26, 2016

How to configure mail in StreamServer project(5.x)

one of my customer wants to the deliver his purchase order as email .These email address are defined in the stream file header. These entries are based on the CRS945 and MNS205.
image_thumb9_thumb[1]
According to the above example Mail should goes to the fromMailAddres@test.lk and from address should be tomail@test.lk.
As first step Mail server settings should be defined in the relevant Platform settings in the design center.
Go to the relevant platform .
image_thumb11_thumb[2]
Then right click on the mail settings and go to the settings tab and click the connector .
image_thumb13_thumb[1]
Then need to select the Connector type .There are several inbuilt connects types available with streamserver . For this case I'm use the STMP(MIME)(Legacy) connector .
Please note that by default this connector use the 25 as the mail port for sending emails and if your client use separate port then you have to you another connector . Ideally STMP MIME connector.
then provide relevant mail server address and UN and PW based on the customer site mail configuration .You can ask these information for IT administrator of the customer site.
After configuring the platform we need to configure the Runtime settings .
Below is the runtime settings for my PO.In run time we need to set from email /to email /subject and other required settings for the email.
When stream serve begin the execution, stream server agent create some set of initial variables for all the entries which stated with * sign in the streamfile and assign values .
image_thumb15_thumb[1]
For my case below are the variables generated by the agent.Please refer the below url for all agent generated values .(http://streamshare.streamserve.com/Forum/Topic/?topicID=990).
Stream File Name
Agent Generated Name
Value
*TOMAIL1
$mvx_tomail
fromMailAddres@test.lk
*FRMAIL1
$mvx_frmail
tomail@test.lk
*SUBJECT1
$mvx_subject
M3 output
image_thumb28_thumb[1]
right click on mail settings and go the settings and select respective platform .
image_thumb30_thumb[1]
And then go the Edit mail.
image_thumb32_thumb[1]
And fill the From/to/subject etc based on the agent generated variable  and click ok .
Then you are good to go. Save export and deploy the project.

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.

Friday, August 15, 2014

System.BadImageFormatException: Could not load file or assembly(Windows service)

Recently I have created a windows service and I wanted to to install that service to the my QA server.for that I used InstallUtil command.So for that below command in my command prompt.

image

But that command failed with below message

System.BadImageFormatException: Could not load file or assembly '{WriteOffService.exe}' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Then after my check dependencies those were placed fine.After I search I found the reason for this. Smile

I have complied my application according to the 32 bit configuration and I used 64 Bit installUtil to the install application. after I installed it using 32 bit installUtil and its worked as expected.

After you install .Net framework(in my case it is version 4.0) its created the two separate folders for 32 bit and 64 bit.In side those folders for according to the Framework version

Intallation root:\Windows\Microsoft.NET\

 image

(here you can see two different folders Framework(32) and Framwork64(64)).That each folder contains two InstallUtil versions according to the .Net Framework version.

image

64 bit version

image

32 bit version