cancel
Showing results for 
Search instead for 
Did you mean: 

Purging Completed WorkFlows in MDM

Former Member
0 Kudos

Weu2019re running SAP MDM 5.5 SP 6.

We implemented the SAP Note Number: 1240587 about 1 ½ years ago. Here is the linku2026

http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_mdm/~form...

It really seemed to help initially. We went from 3 hours to load the repository down to 1 hour. Yahoo!

Unfortunately, we are seeing it slow down again (2 ½ hours). After some research, we discovered that the Java Utility will ONLY delete the Workflows that are assigned to the ID that is running the Java Utility. Example: Admin ID will only delete the Workflows that were launched by the Admin ID, such as Syndication and Import Managers Workflows.

We have several hundred people that can initiate a workflow to request a part change or add a new part. So, running this job under their IDs is not an option.

1) Is there some way to create a Supper User ID that will delete all the Completed Workflows and not just the ones for the ID that is running the job? If so, how do you create this ID, since we currently donu2019t have an id like that?

2) Is there some way we can change this job to loop through individual IDs to delete the completed Workflows?

3) Or did someone get the Database Trigger to work that I read in a few discussions?

4) Any other suggestions?

Your help is greatly appreciated!!!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear Henry,

First, let me tell you the concept:

It is Workflow Owner which has a special privilege to delete the Workflow Job at any point of time. The moment any user triggers a Workflow Job, Owner can see the status at any point of time and can take the control from any other user id.

There are two options to define or declare a Workflow Owner:

a) Any Specific User ID like in your case it is Admin. or

b) The launcher who initiates the Workflow Job.

Now your questions:

1) Is there some way to create a Supper User ID that will delete all the Completed Workflows and not just the ones for the ID that is running the job? If so, how do you create this ID, since we currently donu2019t have an id like that?

Ans: It is just like any other user id which are created in MDM Console. Yes you make a user id through Console and assign Admin Role to it. Now put this user id in Workflow Owner property and then you can execute your Java Utility to establish a session of this user id and delete all completed Workflow Jobs. It would not make any difference as this id will be like Admin.

2) Is there some way we can change this job to loop through individual IDs to delete the completed Workflows?

Ans: In this case you need to make Workflow Owner as Launcher and now whoever will trigger Workflow Job, that will become the Workflow Owner. Now you need to retrieve all user ids from MDM Console and establish a user session using Java utility, then you can delete all completed jobs which were assigned to an individual user ids. You need to customize your java utility here.

3) Or did someone get the Database Trigger to work that I read in a few discussions?

Ans: Better to use Java Utility instead of Database commands and schedule java program in background.

4) Any other suggestions?

Ans: Nothing :).

BR,

Alok Sharma

Former Member
0 Kudos

Thank you Alok

1) Will this work for all Prior Workflows or just ones created from the time the change is made in Workflow? Currently, weu2019re using the Launcheru2019s ID for 2 of the 4 workflows, which are the ones giving us trouble. My assumption is that it will NOT help with the old Work Flow cleanup.

2) Since I'm a novice programmer in Java and WebDynpro, do you have an example of how I can u201Cretrieve all user ids from MDM Console and establish a user sessionu201D

Former Member
0 Kudos

Dear Henry,

Yes you are right, the moment you will make change in MDM Workflow configuration the changes will be effected after that and only for the new workflow job ids. To delete previous, you should use the java utility as it is as you configured.

Otherwise one thing you can do is, Logon to Data Manager manually using Workflow Owner user id i.e. Admin in your case and delete all completed jobs by selecting small-small chunk. Don't try to delete all completed Job Ids in one go. It will kill MDM server processes if the number is large.

After this you can try the new Workflow Configuration and new java utility.

To retrieve user ids, i can only help in theory part as i am also same like you in Java.

1. You need to set a repository session.

2. Then use GetUserListCommand to retrieve the list of users for a repository). I find this command under Package com.sap.mdm.security.commands. Or you need to do your own R&D.

BR,

Alok Sharma