cancel
Showing results for 
Search instead for 
Did you mean: 

Restart the Workflow

Former Member
0 Kudos

Hello Friends,

Good Day!!!

I have 2 questions.

Question 1. I want to restart an workflow which is in error state and workitem is not created becuase rule has not determined any agent. I dont want to change the rule right now. Can i do something so i can able to restart the same workflow again and workitem get created.

Question 2. There were some workflow which are in error state but the Documents belongs to these workflow got released manually. I want to clear them. How to achieve this?

Question 3. Is there any tranaction to see the user outbox. Like SWI5, we can see the user inbox?

Looking forward to you.

Thanks & Regards,

Hemant

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

I think your questions are more or less answered, but as you have not closed the thread, i am replying with some useful information regarding the questions raised, different from the replies you have got already. Hope you find this useful, please do come back if you have any queries regarding the answers.

Question. I want to restart an workflow which is in error state and workitem is not created becuase rule has not determined any agent. I dont want to change the rule right now. Can i do something so i can able to restart the same workflow again and workitem get created.

Answer. Using the SWIA transaction, you can execute a workitem without agent check and forward it to the agent of your choice Else you can use function module SWW_WI_FORWARD to forward the workitem in error to the agent of your choice.

Question. There were some workflow which are in error state but the Documents belongs to these workflow got released manually. I want to clear them. How to achieve this?

Answer. When documents belonging to a worflow get released manually, the related work flow go to permanent error. Such workflows can be deleted in the following way.

get the Workflow instance id from swp_header table or u can get it from technical details view of workflow log. Go to function module SWW_WI_ADMIN_CANCEL and give RFC target and Workflow instance id, to delete the workflow.

Question Is there any tranaction to see the user outbox. Like SWI5, we can see the user inbox?

Answer . To view User Outbox you need to use the function module SWI_OUTBOX_CREATE. You have to give RFC target and user id as arguments to the function call. This function will simulate User Outbox for you.

Regards,

Pranab-Kumar.

Former Member
0 Kudos

Hello Pranab,

Thanks for replying.

This regarding the answer of first question, I have doubt that Workitem have not created. How can i forward the workitem to the reponsible user. Let me explain my workflow desing.

This is call off order workflow which get triggered on event releasestepcreate. Then a fork is there which has three branches.

1. Waiting for change event

2. Waiting for delete event

3. User decision. Here i am using rule . which is giving error if no agent found.

If no agent found then this workitem not get created.

My question is how to proceed in this situtation.

Thanks & Regards,

Hemant

KKilhavn
Active Contributor
0 Kudos

>

> 3. User decision. Here i am using rule . which is giving error if no agent found.

> If no agent found then this workitem not get created.

> My question is how to proceed in this situtation.

Hire a workflow consultant?

Former Member
0 Kudos

Thanks for your suggestion.

I thought this forum is used for discussion and get a suitable solution.

I am working as workflow consultant there. But SAP is very vast, Sometimes you dont know the things.

Anyways thanks you very much.

KKilhavn
Active Contributor
0 Kudos

You are most welcome. Yes, the forums are used for discussions. Yes, SAP is vast and most things in SAP are outside my area of expertise.

The question is: how basic should these forum discussions be? Is it OK to ask questions about logging in to SAP, about creating a program, about creating a transport request? In my opinion, and I know many SDN users (but far from all) agree on this, a question which can be answered by spending less than 20 minutes reading online documentation should not be asked in the SDN forums. We expect you to make an effort yourself first. Such questions waste the time of hundreds of other users who try to follow the forum's traffic and participate in discussions where the solution is not easily found in the documentation, or otherwise not obvious. For some time the debate about how to prevent such questions has been going on, with numerous suggestions having been presented. Time will tell what SAP does to prevent experienced consultants from leaving SDN.

Based on what you have asked in this thread I would say you are abusing the title "workflow consultant" if you present yourself as that. At most you are a "to-be" workflow consultant. In order to learn the basics (answers to your questions here are in most cases easily found in the online help) you would benefit from working together with someone who has more experience - hence the suggestion. This is not meant as an insult, I'm just saying you are starting where everyone else has started. To my knowledge, no-one has yet been a consultant by birth.

Former Member
0 Kudos

Thanks Kjetil.

I think that before posting the doubt in forum, every consultant read the documentation and do his efforts, even than he does not find any suitable solution, then only he post his query in the forum.

Now, I dont want to argue, See boss, Many things that you know, if anybody ask some thing related to those things, You think what this guy is asking becoz you know the answer. you have face the situation and may be you got the solution from your efforts or might be somebody helped you. So, This is world, No one is perfect, In SAP world, every body is learning and it doesnt matter how big consultant you are.

My dear Friend, I just wanna say that this forum is created for sharing the experience. If you know something and dont want to tell. than don tell, No one is forcing you to tell.

I dont want to say anything about you because i cant judge a person capbalities. I think you know what i want to say.

Instead to giving such a big suggestion, you would have given answer to my querys. I know what would you suggest.

I know all the tranactions but still i am unablet to find it means the problem is not easy.

Anyway thanks for your valuable suggestion. I know where i stand.

Regards,

Hemant

Former Member
0 Kudos

A dirty way to see the Inbox of a user...

Use the function SWL_SUBSTITUTION_DEFINE, as input parameter set the user you want to check. Put your user as substitute and then enter your workplace. Activate the substitution and you'll see all the WI sent to the user you want to check.

It's a workaround but sometimes it's usefull...

Regards,

Gianluca

Former Member
0 Kudos

Manoj,

SWI2_DIAG diagnosis for workflow error

SWIA excute workitem without agent or execute another user's work item also we ahd a report SAP_WAPI_EXECUTE_WORKITEM

SWPR workflow restart after error

enjoy....reward if this helpful to you.

Sunil

Former Member
0 Kudos

I like many others do not recommend deleting workflows via SWLD, rather get a list of these workitems from SWIA or SWI1 and logically delete each of the ones you don't need.

Let me know if you want to know how to do this.

Good Luck

Ravi

Former Member
0 Kudos

Hello Ravi,

Thanks for reply.

Look, There were some workitem which gave error because of rule determination. Later on i have moidifed the rule but during this time, Theese workitem's related document has been released manuaally. But These workitem are in error state yet.

My question is How to clear them and complete them.?

Former Member
0 Kudos

yES YOU CAN FIND THE ARROR WORKITEMS FROM swi2_dIAG tCODE AND THEN EITHER YOU CAN DELETE THE WORKFLOW lOGICALLY OR WRITE A PROGRAM TO DELETE IT. a PROGRAM WILL BE HANDY AND USEFUL.

THANKS

ARGHADIP

Former Member
0 Kudos

Hello Arghadip,

Thanks for reply,

Is there necessary to restart the workagain and delete it logically for the workflow which is in error state.

If yes or if no, in both the case, Could you please tell the whole procedure becoz i could not find any button over there.

Thanks & Regards,

Hemant

Former Member
0 Kudos

No man it is not required If the user has achieved the Functionality of the Workflow manually no requirement. Just logically delete it. Achieving its purpose means suppose there is a PO Workflow and someone release PO from ME29N then the Workflow will go into error as you are releasing a PO that is already Released. In this case the Wflow instance is of no use:)))

Thanks

Arghadip

Former Member
0 Kudos

Hello Arghadip,

You are right that there is no need to restart the workflow again. But i have check SWIA , SWI1 and SWPR Tranaction and could not find any button for workitem logically deletion. Can you please tell me how to do it?

Can we delete (logically) the workitem which is in error state?

and Can we modify the workitem container in PRD?

Thanks & Regards,

Manoj

Former Member
0 Kudos

You have Click on the First Workitem Id Text in the Technical DEtails of the Workflow Log.

Menubar Goto->Technical Workitem Display->EDIT->CHange->Delete Logically.

THanks

Arghadip

Former Member
0 Kudos

Hi Arghadip,

Thanks for replying.

Could you please help me out for below question?

Question 1. I want to restart an workflow which is in error state and workitem is not created becuase rule has not determined any agent. I dont want to change the rule right now. Can i do something so i can able to restart the same workflow again and workitem get created means is there any tranaction to do it in production system.

Thanks & Regards,

Manoj

KKilhavn
Active Contributor
0 Kudos

If you mean restarting after an error occurred you should try SWI2_DIAG, but if you mean starting a new workflow instance SWUE (if it is started by an event) or SWUS (start directly) would be better.

Go to [help.sap.com|http://help.sap.com] and search for "Transaction codes for SAP Business Worfklow" in the documentation for your system's release.

Former Member
0 Kudos

Hemant,

Ans to Q1: Use transaction SWPR to restart the error workflows.

Ans to Q2: Do you mean to delete the workitems?

If yes, you can delete using transaction SWWL.

Ans to Q3: Use SBWP to look into the outbox.

You can also use SWI5 and select the option 'Completed Workitems' and execute.

Thanks