WF Faq
WF Faq
WF Faq
Answer: Basically, in addition to the specific Customizing actions, you always need three actions for
each workflow:
• The basic Customizing workflow in transaction SWU3 must be complete (note 547419).
• The agent assignment for each step must have been carried out. This includes entering
the possible agents with the individual tasks and the Customizing for the roles (as of 6.10:
Rules) for selecting the selected agents.
• The type linkage must be activated (for example, via transaction PFTC or SWE2) so that
the workflow is started when the trigger event is activated.
• If yes: Who is listed there as a selected agent? Are there error messages in the workflow
log?
• If no: Check in the event log (transaction SWEL) if the relevant trigger event was
activated (before you start the workflow, you must activate the event log using transaction
SWELS).
o If yes: Are there error messages in the event log concerning the start of the
workflow?
If yes: For more detailed information about the error, double-click on it.
If no: Check in transaction SM58 if errors were reported there.
[4] Question: How do I delete work items I no longer need from the system?
Answer: Note that you cannot always delete work items such as e-mails from the inbox. Items only
disappear there if they were processed or if the administrator logically or actually deleted them. If you no
longer need work items, you can either delete them completely from the system using the reports from
note 49545 or, alternatively, you can archive them in the production system using the WORKITEM
archiving object, for example.
The following notes are continuously updated so that they remain up to date. It's worth checking for
updates now and then.
The workflow definition is the set of rules that determine the path that the process takes. For example,
how a purchase requisition is processed, from the initial request to the creation of the purchase order
A Workflow Instance, which is often simply referred to as the workflow, is a single workflow run. For
example, the processing of a single purchase requisition for computers.
The Tasks are the steps in the process, which have to be performed either by people or automatically by
the software. For example, to check for the availability of the spare computers in the company.
A Work item is the task instance that is performed as a single workflow step. For example, check that
there are no spare computers available in the company.
Agents are the people who process the tasks (via the work items). For example, requisitioner and a
member of the purchasing department.
Container is the place where all the data used in the workflow is collected.
Binding is the set of rules that define which data is passed to which part of the process.
Creating a step where a supervisor manually assigns an operator to another workflow step.
Use the business object WF_TASK. There are several possible methods to use. Refer to the
documentation of the methods to determine which is suitable for your task. If the task is customized as a
general task the supervisor can suggest user names directly (using wild cards), otherwise the supervisor
selects from a list of possible agents.
Documentation issues.
Workflow is dynamic. You can change the business process without sending everyone to be retrained so
bear this in mind with your documentation. Your documentation should be written to ensure that any
changes that are made could be done easily and without upsetting any aspects of the process.
Documentation for the operational user can be made available online with a URL included in the work
item description. This documentation should contain help-line numbers, what to do if you receive a work
item intended for someone else (you've left the department), FAQs, whether the user may create ad hoc
attachments (the other users must be aware of the possibility if you want to make use of this
functionality)...
Documentation for administrators should include how to perform periodic health-checks, how to add a
new user to the process (and how to remove someone), what to do when a user is absent for a short
period of time, contingency plans, list of counterparts in different parts of the process if the process is
cross-application.
Technical documentation must include a complete catalogue of all workflows, tasks, business objects and
roles used in the process. There is ample room within the system for documentation about the individual
components but of particular importance the events. These must be documented in the system,
explaining how they are triggered (E.g. program xxx, status changes). The workflow documentation
should explain how the workflow is triggered (E.g. event, program). Subflows should be labeled as such.
Synchronization issues should be documented carefully so that changes can be made without
jeopardizing the process.
Basically I want to call a workflow from a Back Ground program. Can you tell me how to call a workflow
from a background program?
You can use the following function modules to trigger the workflow templates, in background.
SWE_EVENT_CREATE can be used to trigger an event statically, (If triggering events are defined for
your workflow template. Also check whether the event linkage is active or not)
This is the sample code, used in one of my objects, for calling the function module
SWE_EVENT_CREATE.
REPORT ZTESTING1.
TABLES: ZOPM_OBJKEY.
DATA:
* OBJECT KEY
OBJECTKEY TYPE SYSUUID_C,
OBJKEY LIKE SWW_CONTOB-OBJKEY.
* DEFINING THE EVENT CONTAINER
DATA BEGIN OF EVENT_CONTAINER OCCURS 0.
INCLUDE STRUCTURE SWCONT.
DATA END OF EVENT_CONTAINER
* WORKITEM LIST
DATA:
T_WID LIKE SWOTOBJID OCCURS 0 WITH HEADER LINE.
CLEAR EVENT_CONTAINER.
REFRESH EVENT_CONTAINER.
CALL FUNCTION 'SYSTEM_GET_UNIQUE_ID'
EXPORTING
DCE_COMPATIBLE = 1
IMPORTING
UNIQUE_ID = OBJECTKEY.
OBJKEY = OBJECTKEY.
CLEAR OBJECTKEY.
CALL FUNCTION 'SWC_ELEMENT_SET'
EXPORTING
ELEMENT = 'CONTEXT'
FIELD = 'UAD'
TABLES
CONTAINER = EVENT_CONTAINER
EXCEPTIONS OTHERS = 1.
OBJTYPE_NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-
MSGV3 SY-MSGV4.
ENDIF.
Perhaps have a look at these OSS notes as they might help: 939489
In parallel, if you haven't read the Workflow book, a good website to get troubleshooting help is
http://www.workflowbook.com and their tutorials.
http://www.workflowbook.com/TransactionIndex.pdf