Hi folks,
I am new to work flow and I have small peculiar issue in pr creation workflow .
I'm using releasestepcreated Event to trigger a mail to agent inbox.
A work item shoots to the inbox of the relevant agent for approval depending upon the release stratergy defined. but main problem is when the PR creator changes the data in ME52N and when the release strategy changes it again shoots an another work item and the older workitem still exists. when user click either of them it leads to the same ME53N display.Please help me with deletion of older work item from inbox for any particluar PR Number.
The work item should also be triggered for change in PR(ME52N) correspondinlgy deleting the older work item in the agent Inbox.
Please help me with the issue as the issue was placed under priority by the client.
thanks and regards
Krishna Mukthineni
Edited by: krishna mukthineni on Apr 8, 2008 6:26 PM
Hi Krishna,
All workitem status information is store in the table SWWWIHEAD.
If it is not deleting then you can complete the status in the above table corresponding to the workitem
No need for Fork. If you are using the std WF 000000038, the approval task has terminating events and it should take care of the issue you are referring here. Make sure if the terminating events has "SIGNIFICANTLYCHANGED" event assigned. Also make sure if the event trace SWEL records your event when you make changes to the PR.
Regards,
IA
Krishna,
There is one more solution to handle this situation. You can write down Check FM in SWE2 for your workflow template and BO and event releasestepcreated.
Inside this method you can check that if there any active workflow (which is in ready/reserved/waiting/started/error) for same key, if yes then logically delete the work item and you will have always current work item in this case.
There are two tables which would be useful to determine any existing instance of workflow : SWWWIHEAD and SWW_WI2OBJ.
for logically deleting the workflow you can use SWW_WI_ADMIN_CANCEL (dont give explicit commit in do_commit).
Cheers
Jai
Add a comment