on ‎2014 Apr 08 3:30 PM
Hi Experts,
We are using custom workflow which was copied from WS33700137. We have created notifications within workflow by using Activity/BOR Objects.
Notifications are working fine in case of Create / Withdrawn / Approve / Reject.
We are not able to add BOR Object for Change workflow.
For Example, An employee created leave request for 08.04.2014 and request sent to the Manager. Manager hasn't approved yet and now employee goes and change the leave type or added reason. In this case, it doesn't create new work item. Details are update only in the container.
Even if we see SWI1, it has work item timings which was created at the first time. It doesn't update anything for change.
In this scenario, where we can add our BOR Object for notifications in case of any change. Please go through the SWDD graph and guide us, where we can add change BOR Object Notifications.
Appreciate your kind guidance on this.
Regards,
Ashish
Request clarification before answering.
I don't yet have experience with WS33700137. I suppose this is the "new" leave request workflow?
I am a bit confused that what you mean by notifications? Do you mean the approval work items? What do you want to happen when the employee changes the leave?
Here are couple of pointers that might lead you to right directions:
First of all, at least in the old leave request workflow things worked like this: If employee sent a leave for approval, but changed it before the manager approved it, nothing really happened (because the leave wasn't yet posted to the infotype). No new workflow was started, and the same approval work item stayed in the manager's inbox. BUT if the manager had approved the leave, and it was posted to the infotype, then if the employee changed the leave, a new workflow was started. (You might want to check if this is something that you can change in the IMG).
Secondly, you should probably check the BADIs of the leave request functionality. There are some methods that you can put your own code into, so perhaps you can do whatever you are looking for in one of these methods (=>When leave request is being changed, etc. But please pay attention to what I said earlier: Changing a posted leave request is a different thing compared to the pending leave.).
Kind regards,
Karri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Karri,
Yes this is new leave request workflow. It is useful when organization has multilevel approval.
We are generating notifications to the employee and manager within workflow. If you see screenshot, we have created notifications for withdrawn, creation, approval etc. We have created activity and within activity we using BOR Object to generate email notifications.
In the scenario when employee has created leave request and has not been approved by manager... if emloyee changes this leave request, it doesn't create new workflow. It just updating version in existing workflow. (For example employee created vacation request for date 08.04.2014 and request yet not approved by manager. Now employee goes and change the date to 10.04.2014, in this case work item version gets updated)
In this scenario, we are not able to find the place where we can trigger notification in case of change. We would like to know, how to identify that method which can be used for this change notification.
Regards,
Ashish
Hi,
Based on my previous experience with the old leave request workflow, there isn't a place in the workflow in which you could put your email sending step. The only thing that seems to happen in the workflow is that the existing work item gets updated. Can you confirm this? Before the leave request change the work item (with ID xxxxx) in READY status is till in READY status and having the same ID xxxxx after you change the leave request? No new work item is created and only the container has been updated? (At least the old workflow worked in this manner.)
If the above-mentioned is true, you need to find a way to trigger the email sending. I would say that you have few options and most likely every solution requires a bit of ABAP programming. I would look into the BADIs (perhaps the enhancement implementation CL_PT_ARQ_REQ). There you can perhaps trigger your code when you are changing a leave request. Perhaps you could even send the email directly from the BADI - e.g. use class CL_BCS to send the email => No need to do anything for the workflow. Of course you could also try to make the workflow to send the email, but then you need to e.g. try to trigger an event (From the BADI) that the workflow can catch, and this might be a bi complex, if your workflow is using the standard leave request workflow class. And from experience I know that after you start doing bigger changes to the leave workflow, you might encounter strange problems, since the standard solution might not be expecting big changes (such as restarting the workflow etc).
Regards,
Karri
Changes in workflow are handled by events. one option is to add a fork and wait for event step an send a notification of the changes using a send mail step or loop the workflow and redo the leave notification step. another option is to link the event directly to a function module sending the mail.
I don't know the specific workflow hopefully you already have an event (check the event log - transaction swel activation by swels) if not there are ways to trigger one for example:
Creating Events when Change Documents are Written - SAP Business Workflow - SAP Library
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 13 | |
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.