AW: Triggering workflow from BSP
Workflow
nathanfox at swissinfo.org
Tue May 31 02:10:09 EDT 2005
Hi Pramod
I did this once for an invoice approval workflow. The approval took place
in a web-based java application which connected to SAP via RFC: I tried to
avoid as much as possible embedding the workflow logic in the external (for
you BSP) application, that meant coupling the BSP page loosely to the
workflow engine using as much as possible the raising of Business Object
Events.
- could you start your workflow with the raising of an event instead of
'SAP_WAPI_START_WORKFLOW'?
- could you use a SAP rule for finding the agents instead of hard-coding
them in the container?
The danger is there that you end up reprogramming a lot of functionality
that the workflow-engine already does. We ended up starting a full fledged
SAP workflow in the background (no body actually used the SAP inbox) that
was just event-triggered via the web-based screens, data was updated via
BAPIs and the workflow via SAP_WAPIs.
Just a few points you might consider which would make the design of your
workflow more flexible.
Yours truly
Nate
-----Ursprüngliche Nachricht-----
Von: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu]Im Auftrag
von pramod reddy
Gesendet: Dienstag, 31. Mai 2005 00:49
An: SAP Workflow Users' Group; JZavier at Suncor.com
Betreff: Re: Triggering workflow from BSP
Thank you Jonson for your inputs.
I will work upon your suggestion and update to you.
Regards,
"Zavier, Johnson" <JZavier at Suncor.com> wrote:
Hi Pramod,
Here is some input for your questions.
1. I have triggered without any business objects. Container can be
filled as below and call the workflow using the following sample code.
C_WF_TASK is your task or workflow. Other elements are self explanatory.
..
Data: lt_input_container TYPE TABLE OF SWR_CONT.
..
l_container-element = 'START_DATE'.
l_container-value = is_event-EBEGD.
append l_container to lt_input_container.
* start the workflow
CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
EXPORTING
TASK = c_wf_task
LANGUAGE = SY-LANGU
DO_COMMIT = 'X'
USER = SY-UNAME
START_ASYNCHRONOUS = 'X'
* DESIRED_START_DATE =
* DESIRED_START_TIME =
IMPORTING
RETURN_CODE = l_return_code
WORKITEM_ID = l_workitem_id
NEW_STATUS = l_new_status
TABLES
INPUT_CONTAINER = lt_input_container
MESSAGE_LINES = lt_message_lines
* MESSAGE_STRUCT =
AGENTS = lt_agents
.
2. No idea..
3. This program can be send a link to the portal if you do not have a
SAPGUI at managers desktop. You need to maintain a new text with link
init. Text can be maintained using se61 and use it in RSWUWFML for
'Dialog Text'.
4. Normal object programming, I have used the 'result parameter'. I have
not done it through BSP application. To populate a table container, just
append the same container name with your individual table entries. Then
in the workflow, it will appear as table container.
l_container-element = 'AGENTS'.
l_container-value = 'USXXXXXX'.
append l_container to lt_input_container.
l_container-element = 'AGENTS'.
l_container-value = 'USYYYYYY'.
append l_container to lt_input_container.
Hope it helps.
regards
Johnson Zavier
SAP ABAP/Workflow
Suncor Energy Inc.
Date: Sun, 29 May 2005 20:45:56 -0400From: Pramod Reddy
To: sap-wug at mit.edu
Subject: Triggering workflow from BSP
Message-ID: <4ee33e6d05052917456a45f3ce at mail.gmail.com>
In-Reply-To: <4ee33e6d05052917354bb92a03 at mail.gmail.com>
References: <4ee33e6d05052917354bb92a03 at mail.gmail.com>
Content-Type: multipart/alternative;
boundary="----=_Part_10012_399273.1117413956731"
MIME-Version: 1.0
Precedence: list
Reply-To: SAP Workflow Users' Group
Message: 1
------=_Part_10012_399273.1117413956731
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
>=20
> Hi there,
>=20
> Can anyone please guide me on this.=20
> We are trying to implement web-based approval mechanism for custom=20
> business process.=20
> 1. Requestor submits his request through a BSP page.
> 2. A work item is should go to Manager for approv! al. Manger should
be
abl=
e=20
> to access/execute the work item from the workflow.=20
> 3. When work item is executed/accessed by manger, Approval page of
BSP=20
> application should be opened up in the browser, where he will
either=20
> approval or reject after filling some more details on approval-page.
> 4. Based on approval/rejection, process flow differs in workflow.
[Means,=
=20
> information maintained by Manager on approval-page should be available
ba=
ck=20
> in workflow.
> Notes: No Custom business objects. No custom tables are being used to
sav=
e=20
> the information maintained neither by requestor nor by approver. So,
all=
=20
> details have to be saved into workflow container till the end of
flow.=20
> 1. Trigger the workflow from BSP page by calling a workflow. Std
FM=20
> SWU_START_WORKFLOW_TASK by passing workflow number [WS xxxxxxx] &
contain=
er=20
> table. Question: How to fill the container table. And will there be
any=
=20
> issue because of not having business object as a element in the
container=
?=20
> 2. Generate the tasks for approval page and use this task in
workflow.[=
=20
> with the help of WF_EXTSRV ]=20
> 3. RSWUWFML, I under this program can be used to send mails to for
each=
=20
> work-item but am not sure whether work items can be executed from the
mai=
ls=20
> even when there is no SAPGUI on Manager's Desktop. Can anyone confirm
thi=
s.=20
> 4. How to get the results back into workflow, after manager is done
with=
=20
> his job.
> I have gone through SWXTRAREQ bsp application, but couldn't grasp.
Can=20
> anyone tell me how this can be done.
> I have one more question wrt container which should filled and passed
to=
=20
> std fm . How this table s! hould be populated if my container element
is
a=
=20
> table.
>=20
> Need pointers as early as possible.=20
>=20
> Thanks,
> Pramod.
>
------------------------------------------------------------------------
This e-mail contains confidential information. If you are not the
intended recipient or have received this e-mail in error, please notify the
sender immediately and destroy this e-mail. Any unauthorized copying,
disclosure or distribution of the e-mail or the information it contains, is
strictly forbidden.
_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug
----------------------------------------------------------------------------
--
Yahoo! Messenger NEW - crystal clear PC to PC calling worldwide with
voicemail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20050531/c40e4312/attachment.htm
More information about the SAP-WUG
mailing list