Hi,
Background information:
We are in the process of investigating the workflow functionality. We have already configured the purchase req release strategy (line item level) successfully. Now we're in the process of taking it one step further using workflow. Based on my limited knowledge and information from other threads, I have been able to configure the workflow using the standard template WS00000038. Everything seems to be working as expected, with the exception of one scenario.
In our business model, we have multiple departments. Each department has their own managers who approve their purchase reqs. The way we differentiate one department from the other, is using the req. tracking number field (EBAN-BEDNR). So when a user creates a req, they would populate this field with the department number. The respective manager would then approve/reject the req.
Problem:
As you know, in WS00000038 the moment a release strategy is determined and the req is saved, the workflow gets triggered. Now, sometimes there could be cases where the field BEDNR does not get populated (MRP generated reqs or the user forgot to populate BEDNR). For these cases, the workflow is send to a generic user (like wf admin) since we don't know which department the req belongs to yet.
Later, when the user changes this req using ME52N and updates the BEDNR, a new agent is determined because we now know which department the req belongs to (we accomplished this using user exit M06B0001). However, I'm not able to find a way to automatically re-trigger the workflow or forward the existing work item to the new agent.
Since changing the tracking number (BEDNR) is not considered a significant change, I have enhanced BUS2009 using SWO1 and added BEDNR as an attribute and also added a new event called TRACKINGNUMBERCHANGED. I also added an entry in SWEC for change doc BANF, business obj BUS2009 and event TRACKINGNUMBERCHANGED with field restriction EBAN-BEDNR from * to *.
For task TS00007986, I added TRACKINGNUMBERCHANGED as a triggering event with the necessary binding and activated it. Unfortunately, this did not work. I could see in the event trace that the event was getting triggered but, the workflow was failing with this message: "Import container contains errors (are any obligatory elements missing?)"
I even tried using a fork and parallel events based on suggestions from other scn threads. One branch is the regular purchase req creation. The other branch has the TRACKINGNUMBERCHANGED event. But even this does not seem to work.
I would really appreciate any help to tackle this problem. Sorry for the long message. But I thought it was important to give you the whole picture.
Thanks,
Srini