Skip to Content
avatar image
Former Member

Workflow work item, two agents, and status IN PROCESS -> READY

Hi

As from Workflow standard SAP behaviour, when workitem with asynchronous task (for example method EDIT of business object), has two agents, they both receive item in their SAP Inbox. Workitem has status READY. When one of them double clicks on the work item in Inbox, status of the workitem changes to IN PROCESS, and the item disappears from another agent Inbox. The first agent does not do anything, just exits the edited document, and the workitem stays in status IN PROCESS, and only one of the agents see the workitem in his SAP Inbox.

Is it possible to change the behaviour, so that when the user goes into the workitem in his inbox, and does not trigger event to terminate the task (I have two, AGREE and DENY which are terminating events for the task), the workitem does not stay in status IN PROCESS but is changed back to READY, so that all the agents have the workitem in their Inbox?

I thought about adding the code in business object method EDIT, just after, to execute SAP WAPI f. module to change the status from IN PROCESS to READY, but the workitem is locked then, and I could not determine whether the event was triggered or not (to check whether user trigerred event to terminate the task).

Another solution I think about, is ti write background job program, which checks all the workitems in IN PROCESS status and not locked, to change the status to READY.

Is there any way to achieve such strange requirement by the customer?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 14, 2011 at 12:15 PM

    Hi,

    User has option to change the status of workitem. When user will execute the workitem and then if he wont take any action and come out of it, then status become 'IN PROCESS' from READY status.

    If you want to change the status, selct the workitem which has already status 'IN PROCESS', then rightclick on it, you will get option 'REPLACE'. Just select that option, your workitem status becomes READY again and all other users will b able to see that workitem in their sapinbox.

    Smit

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hello,

      This is standard SAP, that Cancel becomes Reserve. It doesn't make sense, I know, but the usual response is that the users should be trained to realize and avoid this.

      Is this in SBWP, UWL, forms? I think I have seen it fixed in UWL.

      regards

      Rick Bakker

      hanabi technology

  • Jul 21, 2011 at 06:46 AM

    I think it might be possible to fulfill the weird requirement of your customer.

    But it is way easier to just train people to use their tools properly.

    And use SWI5 to find out if there are processes which take too long to process.

    Kind regards, Rob Dielemans

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 15, 2011 at 05:11 AM

    it is not about CANCEL status. User just goes to SBWP, goes into the task by double clicking, and goes out, the status goes to IN PROCESS. I would like that when user goes back without doing anything except displaying document (it is asynchronous task), that status remains READY status.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      It is an asynchronous task. Task is a business object (PM Notification) of EDIT mode. In EDIT mode I have extended with two buttons (ACCEPT/DENY) which triggers terminating events.

      So the user in Inbox double clicks his position, just displays the notification, and does not click on any trigerring event buttons, but just exits the notification and goes back to his Inbox.

      Result is that another Agents do not see in their inboxes that workitem because it is in status IN PROCESS. I would like to change this behaviour and the person who does not trigger terminating event, the workitem stays in READY status.

  • avatar image
    Former Member
    Jul 21, 2011 at 06:37 AM

    I don't think it will be possible for you to change the workitem status when it is stil processing (i.e. locked).

    Instead i propose that you make a loop around the task, that exits if one of the terminating events have occurred. To do this, you also need to complete the workitem on exit as well as on the terminating events (remove EXIT_CANCELLED from method). When the user exits, the workflow loops, creating a new workitem in status READY for both agents.

    Hope my input was helpfull.

    Best regards

    Poul Steen Hansen

    Add comment
    10|10000 characters needed characters exceeded