Office, programming, What the...

Birthday Alerts app [version 2]

When i wrote last time how i made the birthday alerts app , i wrote, how, because of a property of SLA, the data had to be entered at that time of the day when you want to receive on the desired day.  (I know i am being confusing because i am trying to say it all in one line, read the previous post and you will understand).  Well now you don’t have to,  and have made the logic behind the app mucho simpler.  Well, the process flow part is just one activity, apart from start and end, unlike the previous time, when it was like, 7 or 8 activities.  It is still 7 fields, and all logics have been moved to actions.

The activity Reminders has  a SLA set on it.  The time duration is obtained from the field RemindIn.  The two actions in this are, one to calculate the time, when to remind and the other one, to send the reminder and reset it for the next round.  The changed datamodel is as follows.

The calculations done to get the RemindIn time duration is as follows.

  • DayNextYear = (DATE(YEAR(NOW())+1,MONTH(Birthday),DAY(Birthday)))
  • DayThisYear = (DATE(YEAR(NOW()),MONTH(Birthday),DAY(Birthday)))
  • RemindIn = IF(Birthday>NOW(),(Birthday-TODAY()-1)*24+HOUR((TODAY()+1)-NOW()),IF(DayThisYear>NOW(),(DayThisYear-TODAY()-1)*24+HOUR((TODAY()+1)-NOW()),(DayNextYear-TODAY()-1)*24+HOUR((TODAY()+1)-NOW())))
Well that’s it.  Think anything is amiss, or some other thing, that should be there, lemme know.
About this app:
This is a simple app, which takes in the date on which you have to be reminded, and sends you a mail about what you want to be reminded.   It will automatically remind you every year [since, you see, birthday’s / Anniversaries come only yearly].
Office, programming, What the...

Delete records along with Worktop count change

Well, well, well, sometimes, in your application you would have to delete your records because you created one request extra, or instead of raising a request in this you raised a request under another category.

If the application is developed in Orangescape,  if you delete a record, the count in the worktop will not go down, it will continue to show the count which was there before the record was deleted.  So how do you delete the records, and also have proper count in worktop?!!!

Orangescape, it seems is done with the assumption that no transaction record will be deleted, but will be archived.  Yeah, but in some places, it is not a requirement, you are free to delete the records.  So how to do that.  Let’s see how to do it.

Warning :  This involves using System Models, if not done properly, could lead to problems, and i am not to be held responsible

Assumptions :  I hope you know how to delete a record from inbox, because that is the method, am gonna use and am not going into the details.  Also, i hope that you guys understand the relationships which exist with your models and the system models.

Ok.  So, if you still reading, lets do it.  before that, a little explanation,  We will be dealing with one System Model => Process Instance.  But because of the procedure which we are going to do, data in two system models will be affected. They are => Process Instance, Process Audit.  Process Instance and Process Audit, together hold the who did what in the application,  information.    OK, lets get down, and get our hands dirty, shall we?

Open the Process Instance Model, Create a new action, and name it something, lets say, “Eraser”.  In that action, add the delete command.  Save the Model and close it.

Now, open the model where you want the delete functionality.  add a new action or you can also use the existing action which you have configured to delete the record.   The first command that you are going to add in this action is CallParentAction.  in CallParentAction properties,

  • for Parent – Model you will choose ProcessInstance(ProcessInstance).
  • for ParentAction-Name you will choose the action which we created now, in this case “Eraser”

the next command that you will add is the delete command. that’s it.  The action design should look like this.

Now add this action to the inbox…  Now Whenever you execute this action,  the Worktop count  will also be recalculated to reflect the changes…..

Woah!  Howzzzzat?!

Update:  as @Vaithi_G puts it, this is good for models with straight process flow, but if there are branches you will have to include atleast two more CallParentActions for each OR or AND branches, which will make the config tedious for every branching in process, as he had suggested, you can use RCall command once instead of CallParentAction command.  If you use RCall, the Parameter configuration is as follows

  • Choose ProcessInstance in Model-Name list.
  • for CallAction-Name enter the Action Name, again in this case “Eraser”
  • for Search-Criteria enter =Criteria(ProcessInstance.InstanceId=SheetId)

Another Update@VivekMadurai says, that in next version, the first method (using CallParentAction) itself will delete all Process Instances even though there are multiple branches.  so for the sake of performance, don’t use the RCall Command method after 2 weeks.

Office, programming, What the...

Birthday Alerts App

A few months back during a discussion in the office @JohnPrawyn was talking about some difficulty in doing a birthday alerts app using orangescape, (orangescapian’s birthday alerts is his responsibility).  Then I just forgot about it.

2 days back,  i fell asleep while reading, and i had a dream about the implementation of the birthday app,  I woke up and quickly noted down what ever i had remembered.  It was simple, but there were some small problems….  So here is the process flow, which i had dreamed.


There are no ways to schedule things as of now (maybe some feature is on the pipeline!),   so i decided to use the SLA feature.  Checks are done to find the Birthday every month / week / day (based on the nearness of the alert day).

The above process flow, is flawless on the paper, now have set some data to check it.

So, are you still wondering what was the small problem that i had talked about.  Yeah, there is a problem there.  A feature of SLA is that the time duration to check will start off once the request reaches the particular activity.  which means, for ex.  In the Process Flow above, if the request reaches the activity Initialize, at say evening 4:30 and the SLA hours are set as 24 hours, then the activity will next happen tomorrow at 4:30 in the evening.  Which means, to get the reminder at the beginning of the day, i should sit at the beginning of the day and set the reminder.  Will need to find a work around on that.  (i have one, but let me first finish the testing of this first, it everything works fine, then i will implement it out.)

O!  and there are only 6 fields (+ system fields) in the model,


Well anyway, i had dreamed of solutions before, but nothing of this sort has happened.  It would usually be like conversing with someone and coming up with something, but not the complete answer to a question.

Linux, What the...

Chrome Crash2

My woes with Chrome Unstable build still continues.  I tried opening it after installation it crashes again.  I tried to open it again from terminal and i got this output, anyone there who can understand this.

anbarasan@anbarasan-laptop:~$ google-chrome
[31492:31517:5214051937:FATAL:chrome/browser/sync/syncable/] Check failed: SQLITE_DONE == query_result.
–2010-05-01 18:48:55–
Connecting to||:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: unspecified [text/html]
Saving to: `/dev/fd/3′

[<=>                                                                                                                 ] 0           –.-K/s
Crash dump id: ccecdccf19b0deb5
[ <=>                                                                                                                ] 16          –.-K/s   in 0s

2010-05-01 18:48:59 (543 KB/s) – `/dev/fd/3′ saved [16]


Anyway armed with this knowledge, now i will wade thru the internet in search of a solution.

Linux, What the...

Upgrading Karmic to Lucid.

As I said in the previous post.  I tried to do what was said in ubuntu website to upgrade to lucid. i pressed Alt+F2 and then typed update-manager -d and pressed enter, Update Manager opener, there was a message at the top that Ubuntu 10.04 was available, and i clicked the upgrade button, but then after some 15 seconds a message comes saying that Could not download Release Notes. Please check your internet connection.  The internet is working, i was checking the ubuntu website that time.

A little Google Check confirmed that some others to have faced this error.  One person told after doing a complete update of latest packages in Karmic, the problem got solved.  Assuming that could be the problem, i sat thru another half hour of updates.  Then again when i tried to upgrade to lynx, i got the same error.  I searched some more, but could not find anything,

Then i saw there was some upgrade notes, which talked about some software which could be causing problems.  I followed thru everything, which started the installation, in the screen after release notes, it said, again some problem, with updating software, and said it will not continue. (I had to u ninstall, Chrome, VLC, Mplayer)

Defeated I decided to  download the alternate install CD to do the upgrade.

After 2 power cuts during download and  me blacking out for the rest of the night.  I resumed again.  I had backed up a few files of mine to Ubuntu One. Then mounted and started the upgrade.  Everything went fine.  Upgrade completed after a wait of 2 hours.  And restarted into Lucid.  It was disappointing.

The Grub Menu was black again.  this is not nice, atleast something more colorful, like Chamelon would have been nice.  or atleast theming options would have been great,  But still it is black, then the screen remained black for the entire time it moved to the login screen, when i saw the new purple theme.  Ok now the login screen looks nice than the previous one.

After logging in it was even more disappointment.  The system was slow as hell, nothing was responding,  Accessing the menus froze the system.  I feared for a result worse than what i had achieved with mandriva.  So I pulled the plug, and went off to get sleep some more.

Later sat thru and decided that those xubuntu desktop which i had installed was somehow causing these problems.  System Update said it can do a partial upgrade, which confirmed my suspictions.  i did a

sudo apt-get remove xubuntu-desktop

, which did not work.  the other software was not removed.

Then again searching i arrived at a page saying you could easily remove things with aptitude instead of apt-get.  Which gave me the thought that i am right path of removing xubuntu-desktop, to get my system back to performing like before.  then i did a

apt-get install xubuntu-desktop

after completion, i searched the internet to remove xubuntu-desktop completely.  again psychocats came to my rescue.  I executed the command.

sudo apt-get remove a2ps abiword abiword-common abiword-plugin-grammar abiword-plugin-mathview app-install-data-commercial aumix aumix-common catfish exaile exo-utils fortune-mod fortunes-min gigolo gimp gimp-data gnumeric gnumeric-common gnumeric-doc gtk2-engines-xfce libabiword-2.8 libaiksaurus-1.2-0c2a libaiksaurus-1.2-data libaiksaurusgtk-1.2-0c2a libbabl-0.0-0 libexo-0.3-0 libexo-common libgdome2-0 libgdome2-cpp-smart0c2a libgegl-0.0-0 libgimp2.0 libgoffice-0.8-8 libgoffice-0.8-8-common libgtkmathview0c2a libjpeg-progs liblink-grammar4 libmng1 libotr2 libots0 libpsiconv6 librecode0 libscim8c2a libsdl1.2debian-alsa libsexy2 libt1-5 libtagc0 libthunar-vfs-1-2 libwv-1.2-3 libxcb-keysyms1 libxfce4menu-0.1-0 libxfce4util-bin libxfce4util-common libxfce4util4 libxfcegui4-4 libxfconf-0-2 libxmlrpc-core-c3 link-grammar-dictionaries-en mousepad murrine-themes orage oss-compat pidgin pidgin-data pidgin-libnotify pidgin-otr psutils python-cddb python-mmkeys python-mutagen python-sexy ristretto scim scim-bridge-agent scim-bridge-client-gtk scim-gtk2-immodule scim-modules-socket scim-modules-table scim-tables-additional tango-icon-theme tango-icon-theme-common tcl thunar thunar-archive-plugin thunar-data thunar-media-tags-plugin thunar-thumbnailers thunar-volman thunderbird ttf-lyx usb-creator vim-runtime wdiff xchat xchat-common xfce-keyboard-shortcuts xfce4-appfinder xfce4-clipman xfce4-clipman-plugin xfce4-cpugraph-plugin xfce4-dict xfce4-fsguard-plugin xfce4-mailwatch-plugin xfce4-mixer xfce4-mount-plugin xfce4-netload-plugin xfce4-notes xfce4-notes-plugin xfce4-panel xfce4-places-plugin xfce4-power-manager xfce4-power-manager-data xfce4-quicklauncher-plugin xfce4-screenshooter xfce4-session xfce4-settings xfce4-smartbookmark-plugin xfce4-systemload-plugin xfce4-terminal xfce4-utils xfce4-verve-plugin xfce4-volumed xfce4-weather-plugin xfce4-xkb-plugin xfconf xfdesktop4 xfdesktop4-data xfprint4 xfswitch-plugin xfwm4 xfwm4-themes xscreensaver xubuntu-artwork xubuntu-default-settings xubuntu-desktop xubuntu-docs xubuntu-gdm-theme xubuntu-icon-theme xubuntu-plymouth-theme xubuntu-wallpapers && sudo apt-get install ubuntu-desktop
Then, as if it was magic, everything was back to normal, the system was performing cool.  The sluggishness had gone off.
The system is working fine, now i have installed VLC again, have to install libdvdcss, chrome and picasa again.  Then i am off to check how Lucid is….
Linux, What the...

Chrome Crash!!!

I don’t know what i did, but Chrome keeps crashing in ubuntu in my laptop for the past 2 weeks even after two updates.  I don’t know why.  I even removed it via synaptic (with the option saying Remove Completely).  restarted the machine, and then installed it again, only to find it saying chrome did not close properly message, and crash again.

But no such issue was happening in the Desktop or on windows in my laptop.  I was kinda missing it, so i decided to go uninstall the unstable one and install the beta one.  Any one else having the same issue out there with the unstable builds….

Office, What the...

Securing your DimensioN Portal – enabling https

I had to do this for one of the clients. This is the procedure which i followed. It was a real headache. Got into some difficulties and then found out things and stuff. I am writing down the exact procedure which i had followed, during development time, and during the setting up of the server with a thawte certificate, and enable SSL and HTTPS. Hope this helps someone.

DimensioN is based on JBoss,  So SSL on JBoss should also be the same, but i can’t guarantee
To Enable SSL in DimensioN.

For development
Step 1: keytool -genkey -alias [alias name] -keypass [password] -keyalg RSA -keystore [keystore name]

to get ssl certificate from issuing authorities.

Perform the steps to generate the key , CSR and install SSL certificate. (ref:1)

STEP 1 : keytool -genkey -keyalg RSA – alias [alias name] -keystore [keystore name] (use the password same as alias.)
STEP 2 : keytool -list -keystore [keystore name]
STEP 3 : keytool -certreq -alias [alias name] -keyalg RSA -file certreq.csr -keystore [keystore name]
STEP 4 : keytool -import -alias [alias name] -trustcacerts -file [downloaded certificate name] -keystore [keystore name]

for eg:
STEP 1 : keytool -genkey -keyalg RSA – alias tomcat -keystore dimension.keystore (use the password same as alias.)
STEP 2 : keytool -list -keystore dimension.keystore
STEP 3 : keytool -certreq -alias tomcat -keyalg RSA -file certreq.csr -keystore dimension.keystore
STEP 4 : keytool -import -alias tomcat -trustcacerts -file mysignedcert.crt -keystore dimension.keystore

Use the CSR file which is generated after step 3 to apply for the SSL certificate from the concerned authorities. apply step 4 with the file which you get back from the signing authority.

If after doing this procedure, if you still get the error that is a self signed certificate, then the certificate you have downloaded is not in PKCS#7 format.(ref:3)
you will have to create a chain certificate from the one which you have.
The procedure to follow in windows is as follows.(ref:2)

1. Double click on the .crt file, which you had downloaded.
2. Click on the Details Tab at the top
3. Click on ‘Copy to file’
4. Click ‘Next’
5. Tick the third option: “Cryptographic Message Syntax Standard – PKCS#7 Certificates (.P7B)”. Also tick “Include all certificates in the certification path if possible”
6. Click ‘Next’
7. Select a file name or browse to a path where you’d like to save this chained certificate.
8. Click ‘Next’
9. Click ‘Finish’
10. Your export should be successful, then click ‘OK’.

configuration in DimensioN:

Step 1 : copy the generated keystore to [DimensioN_Server_install_Directory]\DimensionServer\server\default\conf
Step 2 : open server.xml file in [DimensioN_Server_install_Directory]\DimensionServer\server\default\deploy\jbossweb-tomcat50.sar
Step 3 : find the below section in that file.

<! – – < port=”8443″ address=”${jboss.bind.address}” maxthreads=”100″
minsparethreads=”5″ maxsparethreads=”15″ scheme=”https” secure=”true”
clientauth=”false” keystorefile=”${jboss.server.home.dir}/conf/chap8.keystore”
keystorepass=”rmi+ssl” sslprotocol = “TLS”> – – >

remove the comments by removing the < ! – – and — > from the beginning and end of the section.
give the keystore name in the line  keystoreFile=”${jboss.server.home.dir}/conf/[keystore name]”
give the keystore password in the line keystorePass=”[keystore password]”
Step 4 : find the below section in that file

<Connector port=”6666″ address=”${jboss.bind.address}”
maxThreads=”150″ maxHttpHeaderSize=”8192″
minSpareThreads=”25″ maxSpareThreads=”75″
enableLookups=”false” redirectPort=”8443″ acceptCount=”100″
connectionTimeout=”20000″ disableUploadTimeout=”true” compression=”on”
compressableMimeType=”text/csv”/ >

comment out this section by adding < ! – – and – – > at the beginning and end of the section respectively.

Step 5 : Start the DimensioN server.  now you should be able to access it via the url https:\\localhost:8443.
you can even set the connector port to 443, so that you can call the url as https:\\localhost.

(1) Generate a key and CSR and install SSL Web Server Certificate on JBoss
(2) Create PKCS7 Certificate
(3) Apache Tomcat – SSL Configuration – How To

Linux, Open Source, programming, What the...

Dom Inspector – Customizing Blogger Theme / Layout/ Template

After a long time looking at others blogs with fancy themes / layouts, today i set out to get my self one different theme, which is not there in the blogger’s default layout set. Since the aim was to get something out of the bloggers default arsenal, i was just looking around for some fancy layouts. and even got thru so many which i just fell head over heels.. But, as soon as applied them, it just felt as though they were not there for my blog.

Then i decided to do something which i would normally not do. play around with the css info in the xml to fit my requirement. first i went around with a fancy theme, but i couldn’t make heads or toes of it.

Since now i had my mind bent on customising a theme for me, i decided to start with a ver simple theme, a minimalistic theme which would have just a background and display. i found one, i can’t remember, from where i took this.. This is the current one, which was named redplanet… I did like the base template but not the splash image which was there at the top below the title.

I started off with Bluefish to edit the xml, and get out with my customization. But somewhere down the line, i remembered kavitha’s saying, something about Dom Inspector in Firefox. Since I’m using IceWeasel in Debian, which is pretty much based on Firefox and is also similar to it, i chanced upon seeing weather it has dom inspector in it. I pressed Ctrl+Shift+I and, lo behold, there appeared Dom Inspector, it was pretty much simple, working with it. Editing the theme was nearly a piece of cake with this Dom Inspector. I had seen kavitha, Sumathi, Santhosh all playing with Dom Inspector for editing / customising look and feel at work, but this is the first time i have used it Dom Inspector. It was interesting to see such a powerful tool hidden away in a browser. I already had a strong belief, as firefox is the browser for developers, and one more reason in my arsenal to drive my point home.

Try using it.

Linux, programming, ramblings, What the...

Video admin

down with fever, and headache, i just was doing nothing. so yesterday i thought i would create something that would let me manage the video collection and let me know to whom i have given to, and such stuff. but sterday was too weak to go beyond thinking of this idea. today too i slept all day, though now feeling a little well, thought i would sit to develop it, i took off with jsp, coz i wanted to referesh it and also to try some thing on java side as i am a little afraid of the language. so there started my adventure, had some problems with mssql server, so uninstalled it and switched over to MySQL,

i have for now created the data entry screen for initial dataentry and also the backend insertion logic for it. and it is working need to beautify the page a little.

will continue tomorrow……

Now playing: Lynyrd Skynyrd – Sweet Home Alabama
via FoxyTunes

Office, Open Source, What the...

An Apache ant way for a management console for SVN

Hmmm, long time been lazy. i been doin nothing other than just working on some dimensions….. But came the saturday(yesterday) and i was stranded, coz i had time with me. Free Time. something, which i did not have for the past few weeks. Well anyway, since being not doing anything was a bit sick, i decided to study the ant manual and learn few more things… and suddenly out of no where, a bulb lit up and an idea came. why not develop a management console kinda thing for SVN, coz the guyz back at office are not gonna be as techie and… and… something like an aspiring geek (like me). so why not develop a GUI kinda stuff for them. and why not use ANT for it. i know, it may be a wrong idea, or even suicide……, but who cares, to play with nature is the work of scientists. so there i went on work and did a pretty decent job at hand. but i know it is not complete yet. am still working on ways to make it perfect. Still there are loop holes. and stuff. I’ll put in the raw code which i have so that if there are any one who wanna help me out or do stuff, then please help me out, coz i do not know ant that very well.

Though ant itself has some thing to address issues with svn i could not get to it. also there was no manual or something from which i can learn which i was unable to find……

I had to also use php for writing the configuration files..(to know the setup which i use for svn server you can check out the post here)… i think this part with php is pretty much solved, but still there is an issue send parameters to the php program from ant…. will soon solve ’em….
Will post the build file and the php progs soon…….

Now playing: Instrumental – Matrix Theme
via FoxyTunes