<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Unable to complete webservice task</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1528" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=879405611-14022006><FONT face=Arial
color=#0000ff size=2>Jacob, </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=879405611-14022006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=879405611-14022006><FONT face=Arial
color=#0000ff size=2>I'd actually advise not worrying about the
webservice.completed event as that is generally not useful in telling you if the
user has actually completed the work. That event is really for the
internal handling of the webservice object when called from SBWP.
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=879405611-14022006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=879405611-14022006><FONT face=Arial
color=#0000ff size=2>Better to add your own terminating events to the task that
actually confirm that the necessary work has been done. You then
don't have to worry about webservice instantiation - just complete the task by
raising the appropriate event for your object, e.g. if webservice called a trip
expenses approval webdynpro app you might add terminating events TRIP.APPROVED
and TRIP.REJECTED to your task and raise those events in your webdynpro app at
the appropriate time. </FONT></SPAN></DIV>
<DIV> </DIV><!-- Converted from text/rtf format -->
<P><SPAN lang=en-us><FONT face=Arial size=1>Regards,</FONT></SPAN> <BR><SPAN
lang=en-us><B><FONT face=Arial color=#000080 size=1>Jocelyn
Dart</FONT></B></SPAN> <BR><SPAN lang=en-us><FONT face=Arial color=#808080
size=1>Senior Consultant</FONT></SPAN> <BR><SPAN lang=en-us><B><FONT face=Arial
color=#808080 size=1>SAP Australia Pty Ltd.</FONT></B></SPAN> <BR><SPAN
lang=en-us><FONT face=Arial color=#808080 size=1>Level 1/168 Walker
St.</FONT></SPAN> <BR><SPAN lang=en-us><FONT face=Arial color=#808080
size=1>North Sydney </FONT></SPAN><BR><SPAN lang=en-us><FONT face=Arial
color=#808080 size=1>NSW, 2060</FONT></SPAN> <BR><SPAN lang=en-us><FONT
face=Arial color=#808080 size=1>Australia</FONT></SPAN> <BR><SPAN
lang=en-us><FONT face=Arial color=#808080 size=1>T +61 412 390
267</FONT></SPAN> <BR><SPAN lang=en-us><FONT face=Arial color=#808080
size=1>M + 61 412 390 267</FONT></SPAN> <BR><SPAN lang=en-us><FONT
face=Arial color=#808080 size=1>E jocelyn.dart@sap.com</FONT></SPAN>
<BR><SPAN lang=en-us><FONT face=Arial color=#808080 size=1><A
href="http://www.sap.com/">http://www.sap.com</A></FONT></SPAN> </P>
<P><SPAN lang=en-au><FONT face="Times New Roman" color=#ff0000 size=1>The
information contained in or attached to this electronic transmission is
confidential and may be legally privileged. It is intended only for the person
or entity to which it is addressed. If you are not the intended recipient, you
are hereby notified that any distribution, copying, review, retransmission,
dissemination or other use of this electronic transmission or the information
contained in it is strictly prohibited. If you have received this electronic
transmission in error, please immediately contact the sender to arrange for the
return of the original documents. </FONT></SPAN></P>
<P><SPAN lang=en-au><FONT face="Times New Roman" color=#ff0000 size=1>Electronic
transmission cannot be guaranteed to be secure and accordingly, the sender does
not accept liability for any such data corruption, interception, unauthorized
amendment, viruses, delays or the consequences thereof.</FONT></SPAN></P>
<P><SPAN lang=en-au><FONT face="Times New Roman" color=#ff0000 size=1>Any views
expressed in this electronic transmission are those of the individual sender,
except where the message states otherwise and the sender is authorized to state
them to be the views of SAP AG or any of its subsidiaries. SAP AG, its
subsidiaries, and their directors, officers and employees make no representation
nor accept any liability for the accuracy or completeness of the views or
information contained herein. Please be aware that the furnishing of any pricing
information/ business proposal herein is indicative only, is subject to change
and shall not be construed as an offer or as constituting a binding agreement on
the part of SAP AG or any of its subsidiaries to enter into any relationship,
unless otherwise expressly stated. </FONT></SPAN></P>
<DIV> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> sap-wug-bounces@mit.edu
[mailto:sap-wug-bounces@mit.edu] <B>On Behalf Of </B>Crane,
Jacob<BR><B>Sent:</B> Tuesday, 14 February 2006 5:06 AM<BR><B>To:</B> SAP
Workflow Users' Group<BR><B>Subject:</B> RE: Unable to complete webservice
task<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><SPAN class=624470218-13022006><FONT face=Arial
color=#0000ff size=2>As a follow-up, I was able to complete the workitem by
using SAP_WAPI_CREATE_EVENT after manually setting the object key to the
workitem ID. Is there a function that can be used to set the key of an
object in the container? I tried SAP_WAPI_WRITE_CONTAINER but could only
inset a new container element with the name of my object.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=624470218-13022006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=624470218-13022006><FONT face=Arial
color=#0000ff size=2>Thanks,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=624470218-13022006><FONT face=Arial
color=#0000ff size=2>Jacob</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> sap-wug-bounces@mit.edu
[mailto:sap-wug-bounces@mit.edu] <B>On Behalf Of </B>Crane,
Jacob<BR><B>Sent:</B> Friday, February 10, 2006 3:45 PM<BR><B>To:</B>
sap-wug@mit.edu<BR><B>Subject:</B> Unable to complete webservice
task<BR></FONT><BR></DIV>
<DIV></DIV><!-- Converted from text/rtf format -->
<P><FONT face=Arial size=2>Hi,</FONT> <BR><FONT face=Arial
size=2> I am using the webservice object to launch a BSP
in the UWL and am having difficultes getting the task to complete. This is
on 4.7 with WAS 6.20. I have tried to raise the WEBSERVICE.COMPLETED event
with SAP_WAPI_CREATE_EVENT but cannot because my webservice never instanciates
(at least when I look at the container). SWK_WI_COMPLETE_WITH_EVENT
returns the message "Work item 000000734457 could not be accepted" with error
code 3, and I haven't had any luck with setting the workitem to completed using
SAP_WAPI_WORKITEM_COMPLETE or similar functions for setting the status. I
tried to use the callback function, but haven't had any luck with that,
either. Does anybody have an idea of why I can't complete the webservice
and what we might be able to do about it?</FONT></P>
<P><FONT face=Arial size=2>Thanks for the help,</FONT> <BR><FONT face=Arial
size=2>Jacob</FONT> </P><BR><BR></BODY></HTML>