Its a long shot but....

Ram Manohar Tiwari rammanohar.tiwari at gmail.com
Tue May 10 22:48:32 EDT 2005


Hi Alon,

Just trying to add some value to my earlier suggestion:

> In case a program ( outside the WF ) determines the decision WIs of a
> workflow and shows it as a list to the user.
> Further, user selects one of the decision WIs and executes ( which in turn
> calls the WAPI and completes the decision WI ).
> 
> I think if you need that next WI ( of the WF ) should appear immediately (
> not in the Inbox but through your outside program  ), then your program :
> 
> 1. Should call the WAPI first for chosen decision WI ( which will be
> completed by the user ).
> 
> 3. Determine the subsequent WI which is sent to the Inbox and execute it
> from your program. But then there are asynchronous activities involved  (
> context change from Program --> WF ---> Program ) so your program may not
> find the Inbox work item immediately.

To find the WI in the Inbox ->
Do 10 times.
 Select  WI_ID from SWWWIHEAD where SWWWIHEAD-TOP_WI_ID eq 'Decision
WI used in WAPI in the first step'.

if sy-subrc eq 0.
  exit.
else.
  wait for 0.1 sec.
endif.

ENDDO.
Then you can use SAP_WAPI_EXECUTE_WORKITEM to execute it directly from
your program.

I think it might be better than asking your user to open the inbox and
execute it from there . No where near to a perfect solution but again
some more food for thought ...

Thanks,
Ram
 
On 5/10/05, Tiwari, Rammanohar <rammanohar.tiwari at logicacmg.com> wrote:
> Hi Alon,
> 
> Do you mean ...But ...where is the answer? :-)
> 
> Well, it's clear that there is no straightforward solution to it and I'm not sure if SAP will have it either.
> So I've given my suggestion as a food for thought only.
> 
> Anyway thanks for calling me a consultant as I don't like be called a Manager for obvious reasons :-)
> No offence mean to anyone.
> 
> Thanks,
> Ram
> 
> -----Original Message-----
> From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu]On Behalf
> Of Alon Raskin
> Sent: Tuesday, May 10, 2005 3:31 PM
> To: 'SAP Workflow Users' Group'
> Subject: RE: Its a long shot but....
> 
> Hi Ram,
> 
> You are a true consultant (I know because I am one too!)....
> 
> Everything you said is 100% correct but....
> 
> :-)
> 
> Alon Raskin
> e: araskin at 3i-consulting.com
> w: http://www.3i-consulting.com
> 
> -----Original Message-----
> From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of
> Tiwari, Rammanohar
> Sent: Tuesday, May 10, 2005 5:44 AM
> To: SAP Workflow Users' Group
> Subject: RE: Its a long shot but....
> 
> Not sure if I got the problem right.
> 
> In case a program ( outside the WF ) determines the decision WIs of a
> workflow and shows it as a list to the user.
> Further, user selects one of the decision WIs and executes ( which in turn
> calls the WAPI and completes the decision WI ).
> 
> I think if you need that next WI ( of the WF ) should appear immediately (
> not in the Inbox but through your outside program  ), then your program :
> 
> 1. Should call the WAPI first for chosen decision WI ( which will be
> completed by the user ).
> 
> 3. Determine the subsequent WI which is sent to the Inbox and execute it
> from your program. But then there are asynchronous activities involved  (
> context change from Program --> WF ---> Program ) so your program may not
> find the Inbox work item immediately.
> 
> Thanks,
> Ram
> 
> -----Original Message-----
> From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu]On Behalf Of
> Michael Pokraka
> Sent: Tuesday, May 10, 2005 2:23 PM
> To: SAP Workflow Users' Group
> Subject: Re: Its a long shot but....
> 
> Hmmm, I interpret Alon's description differently. I think what he didn't
> describe clearly is that the WAPI is called through some user action outside
> the WF which completes the decision..... Alon?
> 
> If this is the case then this is a very curious situation indeed. There is
> no 'advance with dialog' as it is not within a workflow context, but
> nevertheless the WAPI could put the process into a WF context. However, the
> WAPI could be called within a LUW which needs to complete, or something
> which has it's own sequence of events.
> 
> Advance with dialog causes a potential paradox: what if the WAPI is called
> from a different WF in a dialog task, which has it's own advance with dialog
> successor? Which task is the user shown next?
> 
> I suspect the WAPI just changes the state and triggers the WF engine into
> action to progress the WF - outside the user context.
> I'm curious about any possibilities though, it wouldn't hurt to ask OSS (and
> let us know if you do).
> 
> Cheers
> Mike
> 
> --- Thomas Maue <Thomas.Maue at ipaper.com> wrote:
> 
> >
> > Alon,
> >
> > This is working as designed.  If there are two dialog steps together
> > then it works, but when a background step is placed in between the
> > Advance with Dialog will not work (makes sense if you think about it).
> >
> > You might try taking off the background processing indicator for the
> > background task and then setting the Advance with Dialog for the
> > background/dialog step.
> >
> > Regards,
> > Thomas Maue
> >
> >
> >
> >
> 
> >              "Alon Raskin"
> 
> >              <araskin at 3i-consu
> 
> >              lting.com>                                                 To
> 
> >              Sent by:                  "SAP Workflow Users' Group"
> 
> >              sap-wug-bounces at m         <sap-wug at mit.edu>
> 
> >              it.edu                                                     cc
> 
> >
> 
> >                                                                    Subject
> 
> >              05/09/2005 04:38          Its a long shot but....
> 
> >              PM
> 
> >
> 
> >
> 
> >              Please respond to
> 
> >                "SAP Workflow
> 
> >                Users' Group"
> 
> >              <sap-wug at mit.edu>
> 
> >
> 
> >
> 
> >
> >
> >
> >
> > I am not sure if there are going to be any takers for this one but
> > then you guys/gals always surprise me....
> >
> > I am calling the WAPI provided in 4.7 called SAP_WAPI_DECISION_COMPLETE .
> > This Function Module allows me to programmatically enter a decision
> > item for an outstanding work item. It is a thing of beauty and works
> perfectly.
> >
> > But (and there's always a but)....
> >
> > The WAPI does not respect the Advance with Dialog flag that I have set
> > on my workflow. When I execute this work item from my inbox it
> > proceeds to immediately take me to the next step. However, when I
> > complete the work item via the WAPI, the chain is broken and I am not
> taken to the next step.
> > The subsequent step does appear in my inbox but I want it to popup
> > straight away.
> >
> > Is this working as designed or do you think this could be an OSS note?
> >
> > Any ideas/suggestions?
> >
> > Alon Raskin
> > e: araskin at 3i-consulting.com <mailto:araskin at 3i-consulting.com>
> > w: http://www.3i-consulting.com
> >
> > (See attached file: winmail.dat)
> > _______________________________________________
> > SAP-WUG mailing list
> > SAP-WUG at mit.edu
> > http://mailman.mit.edu/mailman/listinfo/sap-wug
> > > _______________________________________________
> > SAP-WUG mailing list
> > SAP-WUG at mit.edu
> > http://mailman.mit.edu/mailman/listinfo/sap-wug
> >
> 
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
> 
> This e-mail and any attachment is for authorised use by the intended
> recipient(s) only. It may contain proprietary material, confidential
> information and/or be subject to legal privilege. It should not be copied,
> disclosed to, retained or used by, any other party. If you are not an
> intended recipient then please promptly delete this e-mail and any
> attachment and all copies and inform the sender. Thank you.
> 
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
> 
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
> 
> This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
> 
> _______________________________________________
> 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