cancel
Showing results for 
Search instead for 
Did you mean: 

Select the approval Agent for Modeled Deadline Monitoring for WF WS14000133

Former Member
0 Kudos

I have setup a deadline monitoring for WF WS14000133 using the modeled approach and added the "Send Mail" Test along with a Loop so that the the appover will get an email every day after three days of not approving a shopping cart.

I noticed in task "109 Subworkflow n-step over Value" there is a task container element "&APPROVALAGENTS.ACT_AGENT&" which contains the approver. I am tring to put it in a Workflow container element that I created referencing "WFSYST-AGENT". When I try to setup a binding to import the value from the task container to the workflow container I get the following error:

"Data object 'APPROVALAGENTS' is elementary )component 'ACT_AGENT' does not exist)

Does anyone know how to fix this or does anyone know another way I can get the approval agent to the WF container so that I can send the email to them in the "send email" step?

According to SAP this can be done....this is what they say on help.sap.com:

"Actual agent: Element WIActual_Agent in the task container

If you want to transfer the actual agent of a work item (available under the element ID WIActual_Agent in the task container) to the workflow container for further use, you define an appropriate element in the workflow container to contain this information.

You create this element with a reference to the ABAP Dictionary field WFSYST-AGENT."

http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4b06d453d11d189430000e829fbbd/frameset.htm

Accepted Solutions (1)

Accepted Solutions (1)

imthiaz_ahmed
Active Contributor
0 Kudos

It's direct and easy. The approval agent is determined before the approval step under the node 141 i.e. determine next approver. It return the agent name under the WF container "ActualAgents". Pass this to you send mail step.

Regards, IA

Former Member
0 Kudos

Hi Imthiaz,

Thanks for the information, but this container element "ActualAgents" is in the sub-workflow WS14000134 of workflow WS14000133. How do I pass that value up to the top level workflow?

By the way, I have granted you points for your helpful answer.

Regards,

-Paul Trauth

imthiaz_ahmed
Active Contributor
0 Kudos

What is the need for passing this value back to WS14000133, where as the deadline has to be attached to the approval step(node 000109) under WS14000134.

Regards, IA

Former Member
0 Kudos

Hi Imthiaz,

Interesting that you should say that. We tried having the deadline on that work item and it failed. The only time the deadline would work is if we set it at the WS14000133 workflow, on task "000109 Subworkflow n-step over Value", and then added a mail send step after that.

I'm just curious have you seen deadline work with it setup in subworkflow WS14000134? Not that I doubt you but I have set it up the same way in WS14000133 and the folow works and I can get emails to goto the creator of the shopping cart just not the approver.

Any further help would be much appreciated.

Regards,

-Paul

Former Member
0 Kudos

I should clarifiy that I mean that we attempted what you said and setup the deadline on the step that you mentioned but the deadline was never reached. We are on SRM 4.0 support pack 6, if that helps.

Regards,

-Paul

imthiaz_ahmed
Active Contributor
0 Kudos

Deadline line should be attached to the approval step and it makes sense and you can't do this to a whole workflow simply bcoz it is not giving you the result. Moreover when I see your SP level 6, it's way down the line. I think the latest is 13 and you should get atleast 12. Again, if you think, that how to pass the actual agent back to the WS14000133, create an appropriate container in this and bind the same with that of the WS14000134. Still I won't recommend you to use deadline on the WF.

Former Member
0 Kudos

Hi Imthiaz,

Thanks for your continued responses. I agree about the support pack but unfortunately that is out of my hands. I will make a second attempt at what you said about putting the deadline in the WS14000134, but in case that doesn't work I am not exactly sure how I pass a value from one container element in WS14000134 to WS14000133. Any chance you can just give me some general guidence on that one? I know how to bind container elements between the task container and the workflow container, just not sure how to do it between a workflow and a sub-workflow. Thanks agian for your help....it is very much appreciated...

-Paul

imthiaz_ahmed
Active Contributor
0 Kudos

It's the same. The sub-workflow is considered as another step like activity. Goto your WS ...133 and then create a container for agent and then select the sub-workflow WS...134 step, bind it.

Regards, IA

Former Member
0 Kudos

I have done what you said but for some reason no container element value is being passed from the subworkflow for the approval agent to my workflow container element. It makes no sense since I know for sure that in the subworkflow the approval agent container is filled. Is it possible that the workflow tasks is exporting the mapped values before the logic of the subworkflow is running?

imthiaz_ahmed
Active Contributor
0 Kudos

Yes, the export data will only be available when the sub-WF executes completely. Therefore this option won't work for you. If at all you have to, then add two background activities, one in sub to store the value in some table or export to memory and one in the Main, to read the value.

Regards, IA

Former Member
0 Kudos

Just to clarify. My deadline is set after the sub-workflow task is executed. In the sub-workflow I tried to setup a binding to move the approval agent from the sub-workflow task container to the WF container. I would think that that move takes place after the sub-workflow is run...is it now? It doesn't make sense to me that the binding from a task container to a WF container would get mapped before the task is executed....I just want to clarifiy that is what you are saying is standard functionality...if so then you are right I'll have to do a bit more complicated stuff to get this done....

Again thanks for your help...i'll continue to grant points...

imthiaz_ahmed
Active Contributor
0 Kudos

Yes. I'll suggest to stick to the approval task deadline instead of complicating. Upon errors you can always raise question to SAP.

Regards, IA

Former Member
0 Kudos

Hi Imthiaz,

Thanks for all of your help figuring out what our problem. In the end as you probably know you were correct. We should setup the deadline monitoring in the approval step(node 000109) under WS14000134 as we had done in the beginning. Since you menationed that is what we should go back to doing we took a second look at why it wasn't working for us. I found that that someone had went to the menu path "GOTO --> Call Workflow Configuration" and setup deadline monitoring there. I had made the change as a modification since we were doing modeled deadline monitoring. Long story short when I deleted the deadline monitoring in the "Call Workflow Configuration" and added modeled deadline monitoring as a modification, it worked!

I do have another question which I will be posting. It regards where and how do I add the code for reading the user id from the "send mail" task container and determining the email address from the user ID and placing the result in a container we added to the "send mail" task.

Thanks again for your help, I will grant you the final points.

Regards,

-Paul

Answers (0)