Tuesday, August 18, 2015

Email Function in essbase calculation




I came across a provision in essbase calc script , where we can send email from within a calc script on execution of the calc script .
The steps are simple and we just need to register few lib files (read the readme,txt in the attachment) and you can use the below command from within the calc script and voila it will send the email . Insert the below command in the calc script . 
RUNJAVA com.hyperion.essbase.calculator.EssbaseAlert "SMTPserver" “to@somedomain.com” "cc@mydomain.com" "" "" "Mail Subject" "Mail Body" "";

http://www.oracle.com/technetwork/indexes/samplecode/essbase-sample-522117.html
This will help in cases where the calc script are long running ones and we cant tell if it finished (unless of course we read the log file ) and users have to bug us to know the status of their calcs, this will notify them directly .

Thursday, July 16, 2015

Hyperion Workspace Taskflow Automation

We have Hyperion Workspace Taskflow which are used for variety of execution of tasks .  But without manually logging into Workspace , we cannot call a taskflow outside Hyperion Workspace .

In this blog , we will see an indirect method to call a taskflow outside Hyperion Workspace . 

I will be using LCM to initiate a taskflow outside Hyperion Workspace .  LCM method will enable the taskflow to run after certain amount of minutes 

To Begin 

1. Export Taskflow definition via LCM (by logging into Hyperion Shared service )

2. Log into the server which host the Foundation service , traverse to the path Oracle\Middleware\user_projects\epmsystem_server_name\import_export .  Then to the folder where you opted to export the artifacts . 

You will see a file name $Taskflowname_sched ($Taskflowname).xml which will contain the schedule of the taskflow 

You will notice a section .  We will tweaking this file to initiate the taskflow to start at the specific time 




3.  The above time is a JAVA date time format , so we will a JAVA program to systematically generate this time .  Write the output into file 



import java.io.BufferedWriter;
import java.io.File;


import java.io.*;
import java.util.*;
import java.lang.Object.*;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;


public class lcmdate {

  public static void main(String[] args) throws Exception {

    long ONE_MINUTE_IN_MILLIS=60000;//millisecs
    long NO_of_Mins = 10 ;  // number of minutes after which the taskflow should be initiated 


    System.out.print( new Date(new Date().getTime() + (NO_of_Mins * ONE_MINUTE_IN_MILLIS)).getTime());

  }

}


4. Then using DOS script we create a Schedule XML file and then import using the LCM batch utility 



NOTE :  I have not given much details on the scripts used .  If you require more information please request so .