cancel
Showing results for 
Search instead for 
Did you mean: 

BPM Archival - Job Scheduler - bpm_proc_write

0 Kudos

Hi All,

I'm trying to archive my BPM process that are more than x number of days in Completed and Cancelled state. I understand that the archive job can be scheduled via Java Scheduler for task bpm_proc_write.

My main concern is if i enter the Completed_Time_Period as x number of days, the processes before x number of days from current are selected. But i actually wanted in reverse way. Below is my example

Say I have

10 Process - Completed on April 25th

10 Process - Completed on May 25 th

10 Process - Completed on Jun 25th

10 Process - Cancelled on July 25th

10 Process - Completed on Aug 24th

I will schedule my bpm_proc_write task to be run on every Saturday. In the bpm_proc_write parameters I just filled

Completed_Time_Period : 90 days

Cancelled : checked

Completed: checked

Actual Hapenning:

Below process are archived

10 Process - Completed on May 25 th

10 Process - Completed on Jun 25th

10 Process - Cancelled on July 25th

10 Process - Completed on Aug 24th

My Expectation:

Only the process that are completed/cancelled state and its in the database for more than 90 days must be archived

10 Process - Completed on April 25th

Could you please advise me how to achieve this?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

The checkbox for 'Completed' means to archive ALL COMPLETED process instances regardless of when they were completed.

From the SAP Help ( Process Data Archiving - Monitoring and Managing BPM Systems, Processes, and Tasks - SAP Library )

Completion Period Days: Select only the process instances that have stayed in completed or cancelled state for more than the specified number of days .

Completed: Select the Completed checkbox to archive all process instances in completed state.

As you can only archive process instances which are completed or cancelled there's no other context for this flag. If you set this flag it will override all other settings. Therefor, to archive only selected process instances you need to set the right number of days completed OR you can explicitly set the data range. To check your settings  you can run the archive in SIMULATION mode first then go look at the job logs where you will see the result - it will show you the instance IDs to be archived and provide the condition statement used to select them. These are the logs under Operations / Jobs / Java Scheduler