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 .