cancel
Showing results for 
Search instead for 
Did you mean: 

Task conmpleted but workflow going into error

ross_goodman
Participant
0 Kudos

Hi,

I have a workflow that I am supporting where a task is completing succesfully but an error is occurring "processing the results"of that task, where the error is that it is failing to find a successor to this step (task).

Once the task is complete the workflow should in fact finish.

The developer has used an event of an abap class he developed as the terminating event for this task. When I inspect this class I see that the event has no event handler and in SWE3 the event receiver is set to WORKITEM.

Can somone help me understand how the event of the abap class is meant to bring about a complete logical end to the workflow? And hopefully explain why this workflow is going into error currently!

I JUST HAD A THOUGHT. What raises the terminating event ?

If I use swe_event_create to create the event, what is the OBJTYPE when trying to trigger an event of a class ( ZCL_INVOICE_WF in this case)?

Cheers,

Ross Goodman

Edited by: Ross Goodman on May 27, 2011 1:21 AM

Edited by: Ross Goodman on May 27, 2011 3:57 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

bpawanchand
Active Contributor
0 Kudos

Hi,

 
When I inspect this class I see that the event has no event handler and in SWE3 
the event receiver is set to WORKITEM.

In brief we use terminating events to complete the tasks of type Asynchronous.. so first make sure that the task is asynchronous task. As you have mentioned that the task is not able to find the next successor node right this is not the problem of the events , but this is the problem with one of the system tables of workflow where it tries to maintain all the predecessor and successor nodes information that table might not be updated properly.. So I would request you to generate one more version of the workflow and delete the successor node which is not able to determine and re insert the same step and update the index of the workflow from basic data of workflow

Basic Data---> additional information -


> Agent assignment -


> Maintain -


> Shift + F1 you should see a message Index updated successfully.

Refresh buffer from swu_obuf and then try... I hope it should work because this problem even i faced a couple of times and performed the same set of steps whatever i mentioned above.

Regards

Pavan

ross_goodman
Participant
0 Kudos

Hi Pavan,

Will do that; but I would like to see the table where the node succession is held just to see what is happening in there. You don't happen to know the table name for that do you?

Ross

bpawanchand
Active Contributor
0 Kudos

Hi,

Ya I know, SWD_NODES & SWD_STEPS are the table name.

Regards

Pavan

Edited by: Pavan Bhamidipati on May 27, 2011 10:55 AM

Former Member
0 Kudos

Hi Ross,

If you want to know the reason behing the error you are getting in the workflow, then just check its log via SWIA. You will get to know the exact error you are getting.

Regards,

Guddan

ross_goodman
Participant
0 Kudos

Guddan,

All SWIA tells me is that it cannot determine the successor node, not why it can't.

I still think the issue is with the terminating event never being raised. In that case where none of the other three outcomes apply this is the only remaining outcome and the event is never raised. This I would imagine causes a problem as there is now no logic to say whwere to go next.

Ross

former_member185167
Active Contributor
0 Kudos

Hello,

Can't the workflow complete without the terminating event as well?

regards

Rick Bakker

hanabi technology

former_member186746
Active Contributor
0 Kudos

Hi,

Maybe the step has determined a different branch, but you didnt model it in the builder.

Kind regards, Rob Dielemans

ross_goodman
Participant
0 Kudos

Hi Rick,

The terminating event is never raised in the code for the workflow at all. The chap that wrote the web dynpro for the workflow uses SAP_WAPI_WORKITEM_COMPLETE to complete the workitem in certain circumstances but does not raise the termiating event ever.

I tried deleting the terminating even from the task but this produces an error when activating the workflow definition. Why do I have to have a terminating event anyway?

Ross

former_member185167
Active Contributor
0 Kudos

Hi Ross,

What error do you get when you try to remove the terminating event?

If the event is never raised, ever, in the whole SAP system, then you don't need it.

This error about not being able to find the successor node (are you still getting that?) I think that often points to inconsistencies in the workflow definition for whatever reason. You may want to try copying it to a fresh new workflow.

regards

Rick Bakker

hanabi technology

ross_goodman
Participant
0 Kudos

Hi Rick,

I remove the terminating event in the standard task definition and check & save it there with no errors. When I go to the workflow definition I first of all get told that as I have changed a task I have to remove the modelled outcome/step (end workflow). When I do I get an error at that point telling me the standard task is not fully defined and I need to

"Define at least one terminatin event for the task used."

Ross

former_member185167
Active Contributor
0 Kudos

Hi Ross,

"Tasks that refer to an asynchronous object method must always be defined with at least one terminating event"

Is that the case here? Maybe you could change that method?

regards

Rick Bakker

hanabi technology