Attachment when starting a WF via WAPI

Mike Pokraka wug at workflowconnections.com
Fri Sep 19 14:39:39 EDT 2014


Hi Kjetil, 

Didn't think of trying to change  _ATTACH_OBJECTS to an importing element, good idea will give it a go.
Nothing to do with implicit mapping, it's rather explicit with an information message "Container element _ATTACH_OBJECTS ignored" or to that effect returned by the WAPI.

It just seems such an obvious thing to do - a flavour of start workflow with form - that I figured it should be WAPI-able.
This particular WF is already way too container-heavy for my liking to add another intermediate element, but thanks for the idea.

Kind regards, 
Mike

On 19 Sep 2014, at 13:05, Kjetil Kilhavn <list.sap-wug at vettug.no> wrote:

Torsdag 18. september 2014 21.45.32 skrev Mike Pokraka:
> SAP_WAPI_START_WORFKLOW doesn't allow anything in the _ATTACH_OBJECTS
> container element.

Do you by that mean that you get an error message from SAP_WAPI_START_WORKFLOW 
when you add _ATTACH_OBJECTS to the container, or just that whatever you pass 
is not passed on to the workflow?

I can not access any SAP system at the moment so I can not check, but my guess 
is that _ATTACH_OBJECTS is not an importing container element, and that is why 
your solution will not work as expected (definition: as you want it to work).

Have you tried defining an importing container element and passing your 
object(s) there, or changing - if that is possible - _ATTACH_OBJECTS to be an 
importing container element. The downside to the former is of course that you 
need to add a container operation step to your workflow to move the object(s) 
to _ATTACH_OBJECTS.

Perhaps SAP cleaned up the solution and quit doing implicit mapping of 
container elements with the same name -- or perhaps they never did that when 
workflows started?

> And doing a SAP_WAPI_ATTACHMENT_ADD afterwards is not only ugly, it is
> also unreliable if the workflow does a few background steps in the
> beginning.
> 
> I can do it via the internals, so a plan B is not what I'm after; the
> question is really about whether it's possible with WAPIs. (No events
> either, it would mean a major reengineering of an existing WF).
> 
> Thanks & regards,
> Mike
-- 
Kjetil Kilhavn / Vettug AS (http://www.vettug.no)
_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug



More information about the SAP-WUG mailing list