Workflow - marking work items as obsolete

I'm working on a workflow that allows cost center managers to approve or reject purchase requisitions.  I'm trying to create some logic that will trigger the workflow when the purchase req is significantly changed, in addition to just being created.  When it gets changed, I want to be sure that it's not deleted.  If it was deleted rather than being changed some other way, I want to mark all active work items for that particular req as obsolete so they're no longer out there for approval.  I put in a "set obsolete" step for each piece of the workflow that creates a work item prior to terminating the workflow.  When I try to test this, however, the workflow DOES recognize that the req was deleted, but it doesn't even show the "set obsolete" steps in the log, it just terminates.  The "set obsolete" step doesn't seem to have much to it, but is it possible that I'm just doing something wrong?
Thanks,
Eric

Hi Eric
You shouldn't use "set obsolete" for this.
Depending on your version, you can either use a fork and a wait for the event "Deleted" in one of the branches or simply, in the new version, define a terminating event on the header level.
Check this thread, it explains how, the example is based on restart, but you can use the methodology to cancel you workflow instances as well.
Re: Restart Workflow ?
Regards
Morten Nielsen

Similar Messages

  • Binding from workflow to work item aborted

    Hi,
    In my workflow  the first two steps are  multi condition.
    after my second condition  i have created activity   step   - Task   and  binding the  bapi attribute value.
    i checked binding  no error.
    I am getting error in this part.
    The error is
    Workflow 'TEST' step number 1039: work item could not be created                          
    Source (expression '&PurchaseRequisition.Zvalue&') of binding assignment is not available   
    Error in the evaluation of expression '&PurchaseRequisition<???>.Zvalue&' for item '20'     
    Step 15 of WS23000111: Binding from workflow to work item aborted                               
    Error when determining attribute 'Zvalue' of object instance '[BO.BUS2105.001039]'   
    Step 15 of WS23000111: Binding from workflow to work item aborted
    Message no. WFEA031
    Diagnosis
    Serious errors have occurred in the binding from workflow to work item in step 15 of multistep task WS23000111. As a consequence, workflow 1039 has been forced into error status.
    Procedure
    "Change Workflow Container" then "Restart After Error" may suffice. It is probable, however, that the binding definition in WS23000111, step 15will have to be changed.
    pl help me to proceed further.
    Thnks in advance.
    sharma

    Hi,
    Seems that your custom BOR is not delegated to the supertype, please do the same in SWO6 and
    also check the binding from event to workflow.
    Thanks and Regards,
    Swaminathan

  • Workflow - passing work item automatically from one inbox to the next one

    Hi,
       We have a pretty customized work flow and SAP is configured to start the workflow after creation of PO. For some POs created by a user, we want the POs / work item to be sent automatically  / by background job from that user's inbox to his /her manager's inbox for approval without manually executing the work item.
    I looked at the FM SWU_PROCESS_MANUEL_DECISION, but could be called only by dialog. I checked the transaction SWIA, but need manual input.
    We are in 4.6b, can anyone tell me how to do the same?
    BTW, I tried to create a custom FM based on above, but lots of issues on that as well.
    If I can change the workflow, all I want is, check the initiator and PO types then based on that either forward directly to next approver or just leave it in the inbox of the initiator so that the initiator can approve manually after verifying the PO.
    Regards,
    Sundar.

    Moderator note: As per comments, IA's answer was accepted as correct, thus marked accordingly.
    Please note that even if you found the answer before someone posted the same, it is still a good idea to mark an answer as correct:
    Firstly they did make the effort to help you, and - more importantly - it shows someone else reading this thread later on what the correct answer is.

  • Workflow error " Work item could not be found"

    Hi Experts,
    I used transaction SWI2_DIAG to diagnose the error and tried to restart the workitem manually .The changes were made to Org chart  and now everything is fine but I am still getting error message:
    Work item could not be found                                                             
    Workflow 'Post with Clearing Workflow' step number 4: work item could not be created     
    Agent determination for step '0000000004' failed                                         
    Workflow WS93000005 no. 000004806372 activity 0000000004 role 'AC00000168': No agent found
    Resolution of rule AC00000168 for task TS93000019: no agent found   
    Can someone explain what this error message mean and why i cant restart the workitem manually?
    Thanks.

    This is my message from Production:
    Resolution of rule AC00000168 for task TS93000019: no agent found                         
    Workflow WS93000005 no. 000004806372 activity 0000000004 role 'AC00000168': No agent found
    Agent determination for step '0000000004' failed                                          
    Workflow 'Post with Clearing Workflow' step number 4: _work item could not be created_      
    This is my message from development.. I recreted the scenario and getting different message.
    Workflow 'Journal Entry Approval- Approval WF' step number 36: work item could not be created 
    Agent determination for step '0000000036' failed                                              
    Workflow WS93000001 no. 000000986124 activity 0000000036 role 'AC93000003': No agent found    
    Resolution of rule AC93000003 for task TS00007914: _no agent found_
    Edited by: Sergey on Nov 2, 2010 5:05 PM

  • Setting work item as obsolete

    Hi Experts,
    We are using modeled deadline monitoring. We are setting the " Workitem to obsolete" in the process control step.
    Does this imply that the approver will not be able to execute the work item once it crosses it deadline.
    In case of repeated deadline monitoring, what do we need to do.
    Could you kindly guide us on the same.
    Cheers,
    Belinda Clarke

    Hi Gautam,
    Thanks for your response.
    You have specified Loop using status change in the second branch.....what i wanted to know whether is it necessary to validate whether the work item was processed in the second branch.
    Correct me if i am wrong....the concept of using a FORK is to have 2 activities running in parallel. Let us say that we have the first branch having the approval process and the second branch is having the loop using status change.
    In the second branch, if we create a DUMMY method and set a deadline to it as 1 day. Let us set a container variable say lv_deadline as 'X' in the DUMMY method. Below that we put in a send mail step that sends the mail to the approver. This happens inside a loop in which we set the condition as Loop until lv_deadline = X.
    Now in the case of FORK, these two activities will be running in parallel. The second branch will run after 1 day. If the work item is processed in the first branch, the control will go to the step after the FORK.
    Is my understanding correct....do we need to validate in the second branch whether the work item was processed.
    Kindly advice.
    Regards,
    Belinda Clarke

  • Invoice Workflow : Dialog work item created

    Hi,
    I am not fully aware of workflow but can manage to check the logs and status.
    My question is: My Invoice workflow status is 'READY' but i dont know how to find to whom the work item it currently held.
    When i check the log it says:
    WF-BATCH                       Dialog work item created
    How can i check, which approver currently held work item so that i can chase them to approve the item.
    There are no agents assigned to the workflow and it is General Task.
    I would apprecaite if you could share me some information about this.
    Thanks,
    Macs.

    Hi,
    About Invoice Workflow :
    WS10400016 – Without approval,
    WS10400017 – One-step approval,
    WS10400018 – Two-step approval,
    WS10400021 – Administrator approval
    The relevant approval workflow is started, depending on completion status, invoice category (credit memo or invoice), creator role, and total value of the invoice.
    You should have maintained approver in your org structure (PPOMA_BBP)
    Please have a look at  :
    http://help.sap.com/saphelp_srm50/helpdata/en/58/c14e3c59bfe747e10000000a11402f/frameset.htm
    Kind regards,
    Yann

  • Calling Interactive Adobe Form from workflow work-item

    Hi Experts,
    Here is the requirement.
    WE have Interactive Adobe Form developed and now the requirement is to call this form in our workflow as work-item.
    When the work-item agent double-click on the work-item he must call the adboe form.
    Please provide your inputs/suggestions/Solution/Tips.
    Regards
    Krishna

    Hi Gurprit,
    Thanks for answering my question , appreciated.
    When I am in transaction SWFVISU in the drop-down for the Visualization type I dont see "Adobe Form" .  Whether we need to create an ABAP Webdynpro to call Adobe form.
    Please explain.
    Regards
    Krishna

  • Terminating Event to Event Queue due to Work Item Lock

    I have a dialog workflow task based on an asynchronous method defined with a terminating event.  When the user executes the work item, the method generates the terminating event (via a V2 change document) but the work item is enqueued (locked) by the same user (locked when they execute the work item from SBWP) and therefore the terminating event goes into error and is placed in the event queue.  The background job which processes the event queue does not redeliver the event so it stays in the event queue and the work item fails to complete.  Other than dequeing the work item lock myself with a function call how do I get around this catch 22?

    Hello Martin,
    Actually, the locking happens whether I have the task as asynchronous or synchronous.  The problem is the timing. If the user does not release the lock (by backing out of the dialog which is executed) prior to the terminating event attempting to enqueue and complete the work item then the event goes into error and is inserted into the event queue (and lingers there indefinitely, almost). Another issue with the asynchronous approach is that even if the user backs out of the dialog before the event actually attempts to complete the work item they will still see the work item in the inbox unless they click the refresh button when they get back to the inbox. 
    I have changed the task to synchronous but here is my scenario and another question.
    The process being workflowed is the approval of service entrysheets (similar to an invoice if you are not familiar with External Services).  In our process, there are a large number of documents being created and requiring approval by particular approvers.  It is a normal scenario for an approver to have, lets say 25 documents in his inbox awaiting approval. It was not practical for him to have to navigate back and forth between his inbox and the approval task screen.  Therefore, I give the users the option of (when executing a work item) having all the documents in his in-box (for this particular task) be presented in an approval list screen.  They can then do a mass approval of the 25 documents with 1 click and 1 navigation.  This list screen is also available to be executed outside workflow via a tcode.  So, when the user executes the mass approval (either from the inbox or outside workflow) the work items are terminated via the terminating event assigned to the approval task.
    A couple of issues remaining:
    1) Given my example of 25 work items (user executes 1 work item from in-box
    and I displayed all 25) being approved, when the user returns to the in-box, the 24
    items remain in his inbox until he clicks the refresh button since these were not actually "executed" from the workflow engines point of view.  However, these were terminated successfully because they were not "locked".
    <b>Question:</b> Is there a way (user exit?) to trigger the inbox refresh automatically.
    2) Now, the issue with the actual work item which the user executes from the inbox.  As I mentioned, the work item is locked as soon as the user executes it and is not released until they back out of the dialog or logoff.  So, here is what happens:  If the terminating event is sent before the lock is released the event is sent to the event queue.  If they then back out back to the in-box, its OK since I put some code in the SWO1 object type program (rememeber, its now synchronous) which will determine if they did the approval/rejection and the work item will complete and the event in the event queue will be deleted the next time the Event Queue Background job runs (it deletes any events for work items already in COMPLETED status). However, lets say they simply log off rather than backing up to the in-box or they don't do anything and are eventually logged off by timeout. In this case the code in the object type program to determine if the approval/rejection was done does not get executed (control does not return to the object type program) and the work item remains in "STARTED" status and remains in the users inbox and the event is in the event queue. So, now we have a work item that should be completed still sitting in the users in-box and the terminating event in the event queue. So the next time the user goes to their inbox the work item is still there.  The interesting thing is that though this may be confusing to the user, if they then attempt to execute the work item, they will get a message: "Work item currently being completed by event" (Message SWF_RUN 644) and the event sitting in the event queue gets redelivered and completes the work item.  To alleviate this problem I was thinking of adding a call to SAP_WAPI_WORKITEM_COMPLETE in the approval list screen after they do the approval but I'm guessing it wont work since it probably will try to enqueue the work item and it will still be locked. 
    Hopefully you haven't nodded off reading this rambling note...
    Thank you,
    Bob

  • Work Item redirected to different approver without substitution

    Hi All,
    We are facing an issue for Purchase Order Approval Workflow whereas Work Items are going to different approver without substitution is activated.
    Regards
    Chayan

    Hello,
    Look in the workflow log (SWI1), it will tell you exactly what happened.
    Is it possible they were forwarded?
    regards
    Rick Bakker

  • Error when executing a work item (cannot execute a method, biding problem?)

    Hello,
    I created a specific workflow, triggered by an event, from a class I also created.
    From this event, I get some data about a Document (CV01/02/03N...).
    The first step is a task which refer to a method (from the same class above).
    The binding Task <=> Method is the data about the Document and the Workflow ID.
    After I start the workflow, I execute the work item in SWI1, with a breakpoint in the method.
    I can't go in debug, and the work item is in error (in Workflow log) :
    - "Work item 000000590208: Object ZCL_SA3_WF_GED_RECL_FOURN method UPDATE_FID cannot be executed"
    - "EXECUTE_METHOD_OBJECT_SYNC : Dereferencing of the NULL reference".
    Note: The task is not in background processing, in the aim of debugging the source code.
    I did SWU_OBUF and quit/relog SAP.
    Do you have any ideas to solve this problem ?
    I think it's a biding problem, because I can' t even go in debug mode...
    Thanks.
    Regards
    (sap version: ECC 6.0)

    Hi
    Looking at the error message I feel like there is something wrong in the task object and object method. You are using a class in the task make sure that class has the IF_WORKFLOW. Mak sure the task is enabled with synchronous task method check box.
    Regards
    Pavan

  • Terminating the work item

    Hi,
    I have an requirement where in i need to terminate the workitem after a user decision step. The termination should happen when the user decision is a 'Reject'.
    The termination needs to happen immediately after the rejection happens without any deadline monitoring.
    Can anyone please let me know how to set the work item to obsolete when the user decision is a reject?
    Many thanks,
    Raghav.

    My bad....I was a bit hasty in answering that!!
    Did you try activating the 'Processing obsolete' in the outcomes tab of the decision step? You should do that, and leave the path empty if you don't have any logic to add.
    Let me know if this works.
    -Krisnan
    Edited by: Krisnan Kumar on Jul 29, 2008 9:24 PM

  • Work item 000000399133: Object 000000399133 method SENDTASKDESCRIPTION can

    hi experts,
                       sometimes frequently i get this kind of wrror after executing my workflow.
    Work item 000000399133: Object 000000399133 method SENDTASKDESCRIPTION cannot be executed..how to correct this??what might be the problem?

    HI,
    Please check user to whom you are sending mail are populated OR not ,Please check your rule  .
    For confirmation just hardcode user and then trigger the workflow .
    regards,
    Deepanker Dwivedi

  • Work item could not be accepted

    Hello,
    I have created a simple Workflow in a 4.6C system. The first step is a User Decision step, with two possible decisions. When I assigned standard user decision task TS00008267, it works fine when I test the workflow. But since I want a custom text in the Work Item description, I have copied this task into a custom one, with the same options and everything.
    Now, when I test the workflow, the Work Item is generated, but I can't see it in my Business Workplace.
    I can see it using SWI1, in status Ready. If I display it and try to execute the activity, I get the message :
    Work item could not be accepted (->function canceled)
    Without any long text. I have searched everywhere for this, and cannot find why it does that.
    Does anyone have an idea ?
    Thanks in advance.
    Thomas
    Edited by: Thomas Debouverie on Jun 11, 2009 10:53 AM

    HI,
    Open your task. In that go to Additional Data --> Agent Assignment --> Maintain. Select the task. Then click on attributes & select general task there.
    Save and try testing your workflow again.
    Hope it works.
    Regards,
    Raj

  • Authorization to disable SAP Inbox Forward function for specific Work Items

    Hi.
    I recently solved a case for a customer of mine regarding authorizations for work items. They have several workflows running, but for this specific custom developed workflow, users should not be allowed to use the SAP Inbox Forward button.
    I started by creating a new task classification (Z_FW) which I implemented on the workflow tasks where the forward functionality should be disabled. Now for test purposes I created a dummy user which I initially gave only authorization to the tcode SBWP, then I manually added the authorization object S_WF_WI.
    For this entry I allowed all activities for work item type W and F for classification 1, 2, 3 and NO_CLASS (SAP Standard classification).
    Now to my understanding this would give the test user authorization to perform all activities on Work Items and Workflows which are classified with one of the above, but also prevent me from doing anything with Workflows and Work Items with classification Z_FW.
    However, to my surprise everything seems to work perfectly with just this entry. I am able to execute and forward work items with the standard classification, while I am able to execute, but not forward, work items with classification Z_FW.
    My intention was to add another entry for authorization object S_WF_WI, for classification Z_FW with all activities except forwarding. But when I tried that, the only change was that forwarding was enabled for the work items with classification Z_FW, which I didnu2019t want.
    Now can anyone explain to me why this is working? I am not too familiar with SAP Authorization as my area is mainly ABAP and WF, but his just does not seem logical.
    Hoping someone can give me an explanation....
    Thanks

    Does the standard function not do what you want?
    Task -> Additional data -> Agent Assignemt -> Maintain -> Attributes -> Forwarding not allowed.

  • Obsolete and batch users can receive work items

    Dear Experts,
    Currently, we have found a problem that obsolete and batch users can receive work items by manual forwarding from someone. The roles and responsibilities of obsolete users were removed and users have been locked. For Batchuser, it's only created for some certain job with limited roles.
    Could you help advise if this's a behavior of workflow or it's from some authorization problem? We have concern for business impact since no one is really handling work items and important messages are out of sight.
    Thank you very much in advance.
    Regards, Kae

    Hello,
    This is standard behaviour. It is even possible to send work items to users who do not yet exist (e.g. someone who is due to join the company).
    The easiest way to workaround is to set up a substitution for any users that get locked and for background users. Personal substitutes can be maintained directly in table HRUS_D2, you could possibly write your own maintenance transaction for this if it is to be an ongoing issue.
    Hope that helps,
    Mike
    Message was edited by:
            Mike Pokraka

Maybe you are looking for

  • Intercompany transfer for free goods

    Hi, Please suggest me in the following scenario a very low cost item is received as free alongwith a shipment for a particular PO. The GR is done in one of the plant. Now this item is distributed to another plant belonging to different company code v

  • Solaris 10 on V20z - Help!!!

    Hi all, I installed S10 (06/2005) on a V20z with bge0 using DHCP. I also installed the necessary BIOS and service processor as well as the 64-bit NWSnps package. After rebooting I het the message: Failed to configure IPv4 DHCP on interface(s) bge0 I

  • Load balancing with ABAP based system

    Dear Gurus, I'm newbie on SAP. I searched in SAP library but cannot find exact information. I was wondering, if a user already logged on a to ABAP based SAP system, how dialog work processes assigned to user?For example, does the user get a work proc

  • I have Version 11 in the Adobe Reader now.  Now I can't open-password won't work

    I have downloaded my new verison 11--now I can't open. Password won't work

  • Which Carbon Copy Cloner backup is the best?

    I want to restore my iMac to a CCC backup. Which is the best type of backup to use? Should I use a regular "backup everything" or should I create a "disk image"? Any help. Thanks!