cancel
Showing results for 
Search instead for 
Did you mean: 

Work Item don't disappear after execution

Former Member
0 Kudos

Hello,

I have a work item needs to be sent to five USERS. When any one of them USER execute it's corresponding work item, all other work items must disappear from their Inbox. It's going fine. But some cases like 2 out of 10 the work items don't disappear from their corresponding Inbox after someone executes it.

We have used Rule in Decision step for Agent determination.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

 

Actual agent is blank because any user has not taken any action yet , thats why you can see all the agents in the log .You will not find any actual agent untill anyone of them takes action on the workitem .

Ask any user to approve the workitem , this will disappear from the inbox of others if at the same time any other user is not using the same workitem .

Thanks ,

Ashish Gaur

I042439
Employee
Employee
0 Kudos

Hi Bikash

Some silly questions from my side.... In the WF Log, you said that Agents are visible... so I can safely assume that you are checking the ActiveX log. Did you check the Technical Wf Log? Is it that there is a loop in the workflow which sends a new work item?

Have we checked the workitem IDs of the Executed workitem and the workitem which stays back - is the work item ID same or different inthe Technical WF Log?

Regards,

Modak

Former Member
0 Kudos

Hi Modak,

I have also checked the Technical Details.

No there is no loop used in this Workflow.

The status of the Work item is Ready as the new work item status of another workflow i have compared.

I042439
Employee
Employee
0 Kudos

Hi Bikash

So there is no NEW workitem ID generated and it is the same WI  !!!

Have we confirmed with the user that they ACTUALLY executed this very workitem? If yes, do we see that user's name in the step history of that WI in technical log? It would be good to see the Step History screen shot of that WI which the users say that they executed (but still shows as READY).

Also, is there any dynamic parallel processing implemented for this step?

Regards,

Modak

Former Member
0 Kudos

Hi Modak,

I have checked the Step History. The user didn't execute the work item instead of he just reviewed it and cancelled it many times and the workflow is in Process Status.

But the problem is Database is updated without completion of workflow.

I042439
Employee
Employee
0 Kudos

Hi Bikash

Now that's confusing.... earlier, you said the work item is in READY status and now the "Database" is updated without completion of Workflow!!!! What Database? What values? are we talking about workflow status in database? or is it suppose to set something AFTER the approval and it is set but WF is not completed?

High time you give a screen shot of explaining as to what is happening in the WF (ActiveX as well as Technical Logs) and what is set in "Database". Please give a clear picture of what is happening and what is required ...supported by relevant screenshots

Regards,

modak

Former Member
0 Kudos

Hi Modak,

First of all many many thanks for your quick reply.

Now, I got clear about the Workflow. I am explaining the issue.

When ever a capitalization form is Submitted my workflow triggers and approvals are send to several users according to Rule. Any one of them approves it from portal then my workflow ends sending a notification and WBS elements are updated in Custom Table. Here all like BO,  Event, Workflow, Form screen(Webdynpro) are Custom.

Now the problem is USER has seen(but not Executed) the work item several times. It's status is Ready,

But my data has been updated in Table which should not be.

paul_bakker2
Active Contributor
0 Kudos

Hi,

If the workitem has not been executed then obviously something else (not the workflow) is updating your custom table. Do a where-used on your custom update method. It's probably being called from some unexpected place in your custom webdynpro.

As you have built a custom solution there's not much more we can do to help... it doesn't seem to be a workflow issue.

cheers

Paul

I042439
Employee
Employee
0 Kudos

Hi Bikash

I would agree with Paul..... check how that Table was updated ....

Also, is there a specific setp in the workflow AFTER the approval which updates the table or is it part of that work item? How does the workflow updates this table?

Regards,

Modak

Former Member
0 Kudos

Hi Modak,

Can we retrieve value of APPROVE from workflow user decision step when executed ?

Regards,

Bikash

I042439
Employee
Employee
0 Kudos

Hi Bikash

I am not sure why you are asking this...can you please elaborate?

Where do you want to read this? In the WF or outside the WF (in an ABAP program).

Once the decision items are completed, the decision option which was selected is stored in the Container element "_RESULT"  of the Workitem container (not the workflow container).

If APPROVE' is the first option, then _RESULT will be 0001.....the number corresponds to the index number of decision option.

If you want to SEE the value, you can check the technical workflow log-> select the completed decision step-> click tab 'container' -> check value of _RESULT

If you want to read via an external ABAP code, you can call FM SAP_WAPI_READ_CONTAINER , pass the Workitem ID of the completed decision step and then read the table SIMPLE_CONTAINER where ELEMENT = '_RESULT', you will have the decision number in col VALUE.

Hope this is what you wanted ...else kindly do elaborate further. Why do you think that getting the Approval result will help you in this case and what are your plans to do with it 🙂

Regards,

Modak

Former Member
0 Kudos

Hi Bikash ,

Yes , You can get the name of approver from the decision step . Do it like this in the binding  :

Here in this example we are getting &_WI_ACTUAL_AGENT& from decision task to workflow in variable &GV_CHECKER&.

Thanks ,

Ashish Gaur .

Former Member
0 Kudos

After investigation i got to know that the workflow is integrated with webdynpro. It imports the Work item to it and uses it according requirement and completes it through SAP_WAPI_WORKITEM_COMPLETE. But some how data is updated but work item does not complete.

Regards,

Bikash.

paul_bakker2
Active Contributor
0 Kudos

Hi,

Check the call to SAP_WAPI_WORKITEM_COMPLETE. Perhaps it's not setting a legal result for the workitem (which it does through the simple_container parameter).

You're almost there , it's just a case of debugging now.

cheers

Paul

paul_bakker2
Active Contributor
0 Kudos

Or the 'COMMIT WORK' after the WAPI is missing?

I042439
Employee
Employee
0 Kudos

Hi Bikash

I totally agree with Paul - check for the two things he has mentioned.

Plus, there is a scope of improvement.... if SAP_WAPI_WORKITEM_COMPLETE is giving an 'E' message, the WD Application should give an error instead of proceeding to update the table.

Regards,

Modak

Former Member
0 Kudos

Hi,

We did contact to USER and he told out the exact problem faced. After he pressed the approve button in UWL, it processed for couple of sec and got timed out. There fore i think the data passed without completing the work item.

The process written in WD : It receives the Approve event, save data and then complete the work item(figured it out through Debug). So i think it stuck in Save data.

After analyzing i decided not to change the code(may be i am wrong) cause may happen more problem in future.

Do you have any suggestions ?

former_member185167
Active Contributor
0 Kudos

Hello,

Check in the workflow log (SWI1) to see if there are any error messages and also to check if the users really did execute it.. Also check ST22 for any shortdumps.

regards

Rick Bakker

Former Member
0 Kudos

Hi Rick,

I have already checked it in SWI1. The work item is in Ready Status and also displaying the agents who can approve it. The actual agent is blank.

I have also checked ST22 and there are no short dumps.

anjan_paul
Active Contributor
0 Kudos

Hi,

  Users have to refresh their sbwp inbox, then check workitems are there or not

Former Member
0 Kudos

Yes Anjan, they have done it.

I have already mentioned that the work items are visible for Agents in Workkflow Log.

anjan_paul
Active Contributor
0 Kudos

Hi,

Check in SWPC, is there any entries are there for you item. If there present execute it