Friday, September 9, 2022

EPCM - A workaround for deleting scheduled jobs

I have found a workaround that enables me to delete scheduled jobs in Enterprise Profitability and Cost Management (EPCM). Check my last post for more details about the error itself.


Here is the error to begin with.




As you can see above, I cannot simply delete the job straight away (this is still a bug as of the date of this post), so what I need to do is create an LCM export for that job, modify the xml file, and re-import the file again.

1. Export the LCM job definition 







2. Export the LCM definition and download the file locally



3.Edit the XML file and change the end dates to a past date


This is the original XML file

In snippet format:
<?xml version='1.0' encoding='UTF-8'?><Scheduler><job name="Compact Outline" type="23"><jobParam name="DefaultQuartzJob:jobApplication" type="java.lang.String" value="FsnEPCM"></jobParam><jobParam name="DefaultQuartzJob:jobClassName" type="java.lang.String" value="com.hyperion.planning.schedulejobs.CubeCompactionScheduleJob"></jobParam><jobParam name="DefaultQuartzJob:jobCreateDate" type="java.util.Date" value="1662724800000"></jobParam><jobParam name="DefaultQuartzJob:jobIdentity" type="java.lang.String" value="epm_default_cloud_admin"></jobParam><jobParam name="DefaultQuartzJob:jobObjectName" type="java.lang.String" value="Compact Outline FsnEPCM.PCM_CLC"></jobParam><jobParam name="DefaultQuartzJob:jobObjectType" type="java.lang.Integer" value="23"></jobParam><jobParam name="DefaultQuartzJob:jobTrigger" type="com.hyperion.calcmgr.scheduler.triggers.DailyTrigger" value="[Daily] [Starts: Fri Sep 09 12:00:00 GMT 2022] [No End Time] [Cron: 0 0 22 1/1 * ? * Australia/Sydney]"></jobParam><jobParam name="DefaultQuartzJob:jobUserInputName" type="java.lang.String" value="Compact Outline"></jobParam><jobParam name="DefaultQuartzJob:origStartTime" type="java.util.Date" value="1662724800000"></jobParam><jobParam name="DefaultQuartzJob:timeZone" value="Australia/Sydney"></jobParam><jobParam name="Job Name" type="java.lang.String" value="Compact Outline FsnEPCM.PCM_CLC"></jobParam><jobParam name="appName" type="java.lang.String" value="FsnEPCM"></jobParam><jobParam name="dbName" type="java.lang.String" value="PCM_CLC"></jobParam><jobParam name="jobObjectKey" type="java.lang.String" value="23"></jobParam><jobParam name="physicalAppName" type="java.lang.String" value="AFsnEPCM"></jobParam><jobParam name="reviewData" type="java.util.LinkedHashMap"><property name="Job Type">Compact Outline</property><property name="Job Name">Compact Outline FsnEPCM.PCM_CLC</property></jobParam><jobParam name="reviewDetails" type="java.util.LinkedHashMap"><property name="Name">Compact Outline</property><property name="Job Type">Compact Outline</property><property name="Job Name">Compact Outline FsnEPCM.PCM_CLC</property></jobParam><trigger type="Daily" origStartDate="1662724800742"></trigger></job></Scheduler>


This is the modified XML file





In snippet format
<?xml version='1.0' encoding='UTF-8'?><Scheduler><job name="Compact Outline" type="23"><jobParam name="DefaultQuartzJob:jobApplication" type="java.lang.String" value="FsnEPCM"></jobParam><jobParam name="DefaultQuartzJob:jobClassName" type="java.lang.String" value="com.hyperion.planning.schedulejobs.CubeCompactionScheduleJob"></jobParam><jobParam name="DefaultQuartzJob:jobCreateDate" type="java.util.Date" value="1662724800000"></jobParam><jobParam name="DefaultQuartzJob:jobIdentity" type="java.lang.String" value="epm_default_cloud_admin"></jobParam><jobParam name="DefaultQuartzJob:jobObjectName" type="java.lang.String" value="Compact Outline FsnEPCM.PCM_CLC"></jobParam><jobParam name="DefaultQuartzJob:jobObjectType" type="java.lang.Integer" value="23"></jobParam><jobParam name="DefaultQuartzJob:jobTrigger" type="com.hyperion.calcmgr.scheduler.triggers.DailyTrigger" value="[Daily] [Starts: Thu Sep 08 13:00:17 GMT 2022] [Ends: Thu Sep 08 13:00:17 GMT 2022] [Cron: 17 0 23 1/1 * ? * Australia/Sydney]"></jobParam><jobParam name="DefaultQuartzJob:jobUserInputName" type="java.lang.String" value="Compact Outline"></jobParam><jobParam name="DefaultQuartzJob:origStartTime" type="java.util.Date" value="1662724800000"></jobParam><jobParam name="DefaultQuartzJob:timeZone" value="Australia/Sydney"></jobParam><jobParam name="Job Name" type="java.lang.String" value="Compact Outline FsnEPCM.PCM_CLC"></jobParam><jobParam name="appName" type="java.lang.String" value="FsnEPCM"></jobParam><jobParam name="dbName" type="java.lang.String" value="PCM_CLC"></jobParam><jobParam name="jobObjectKey" type="java.lang.String" value="23"></jobParam><jobParam name="physicalAppName" type="java.lang.String" value="AFsnEPCM"></jobParam><jobParam name="reviewData" type="java.util.LinkedHashMap"><property name="Job Type">Compact Outline</property><property name="Job Name">Compact Outline FsnEPCM.PCM_CLC</property></jobParam><jobParam name="reviewDetails" type="java.util.LinkedHashMap"><property name="Name">Compact Outline</property><property name="Job Type">Compact Outline</property><property name="Job Name">Compact Outline FsnEPCM.PCM_CLC</property></jobParam><trigger type="Daily" endate="1662642017034" origStartDate="1662642017034"></trigger></job></Scheduler>




4. Finally, import the updated LCM file


Once the file is imported, you will see the updated "Repeats" and "Scheduled End Time"  for the scheduled job.


Depending on whether you have selected an end date in the past, or not, the job will be updated to reflect the new end date and once it passes that date, the job will be completely removed from the scheduler.













Saturday, September 3, 2022

EPCM BUG - Error deleting scheduled jobs

So I came across this error in EPCM that is stopping me from deleting scheduled jobs. 


As of the creation date of this post, I'm unable to delete or edit a created scheduled job in EPCM, so until there is a fix for this, I suggest you do not create scheduled jobs in the interim and look for other workarounds (server side schedules, task manager in another pod etc).


This is the error message I'm getting while attempting to delete the job.





I have create an SR with and they have replicated the same issue in-house (this means it is a bug), I will update this post when I have more information.