cancel
Showing results for 
Search instead for 
Did you mean: 

Completion of workitem for webdynpro abap application - 2

Former Member
0 Kudos

Hi,

i start a webdynpro abap application from a workitem with BO WEBSERVICE, method PROCESSDIALOG. Terminating event is COMPLETED from BO WEBSERVICE.

After i complete the workitem with FM SAP_WAPI_WORKITEM_COMPLETE in the webdynro application, workitem is processed, but workflow is set to error.

error message:

Work item 000000400230: Object FLOWITEM method EXECUTE cannot be executed

Error when defining successor for node 0000000036

Error during result processing of work item 000000400232

Error when defining successor for node 0000000036.

When I execute the BO sepearately, I get an exception, " url_creation_failure "

I have gone through the below link. The thread is answered, but I could not find the solution.

Can any one suggest me the solution for this.

Thanks

Sai.

Accepted Solutions (1)

Accepted Solutions (1)

bpawanchand
Active Contributor
0 Kudos

You have to use the FM SAP_WAPI_CREATE_EVENT and you have a use event COMPLETED of the same BOR WEBSERVICE the workitem ID which you are pasing to the fm which you said , try to pass it as to this FM

Before this, the task which you created for the webservice in that task you need to make and entry in the terminating events tab BOR ---> WEBSERVICE ---> COMPLETED

you can goto there by using t he PFTC txn and by selecting the standard task and specifying the 8 digit task number open in the change mode.

Former Member
0 Kudos

Hi,

Thanks for the reply.

I had done that and raised the event explicitly from my webdynpro application. But still it has not been working.

Any further inputs please.

Thanks

Sai.

bpawanchand
Active Contributor
0 Kudos

MAke sure you are passing the workitem id of the task which you created for the WEBSERVICE , May be you are passing the parent or TOP workitem id. if you pass the parent or top workitem id it wont work.

check it

Former Member
0 Kudos

Yes. It is the same workitem id, that I am passing. But still the problem is there.

bpawanchand
Active Contributor
0 Kudos

I think after calling the FUNTION MODULE you might have missed to write COMMIT WORK statement did you?

Former Member
0 Kudos

No. COMMIT WORK also is there. And the event is also seen with the key as the workitem id.

Former Member
0 Kudos

Hi Pawan,

Can I have your contact Number ?

bpawanchand
Active Contributor
0 Kudos

I cannot share it with you,which is against the rules, but , Please can you explain a bit more clear about the workflow template and how you are trying to start the workflow. and what are the parameters that you have created in the WEBSERVICE and

can can you let me know what is the message class of the error message , I personally feel it is not able to create the next node which is after the webservice task. what is the next step after the webservice task?

Former Member
0 Kudos

Hi, I uderstand the rules and Thank you.

Following are the details of the errors and the error message class

Workflow error

Work item 000000489104: Object FLOWITEM method EXECUTE cannot be executed

Message no. WL821 ( Message Class WS & Message Number 821 )

Error when defining successor for node 0000000028

Message no. SWP009

task error

Error during result processing of work item 000000489108

Message no. SWP029

Error when defining successor for node 0000000028

Message no. SWP009

Also, I observed that,

Although the binding between the terminating event and the task is existing and in properplace, the task parameter instance for WEBSERVICE is not instantiated, when the terminating event is created.

Also,

I checked with diff types of the steps, for after the webservice task.

It is a problem with the webservice task. It is not able to complete that workitem successfully. It has a problem with Result Processing.

The parameters are

a few import parameters to the task, which are succesfully retrieved from within the application

a few export parameters from the task to the workflow, which I can see the workflow after the completion of the task.

The only thing is, the Webservice instance is not instiated.

I have checked the binding.. It is also fine.

Any further inputs please

Former Member
0 Kudos

Hi Pavan,

Any other clues please.

Thank you,

Sai

former_member185167
Active Contributor
0 Kudos

Hello,

When you run this workflow entirely within SAP (ie no webdynpro) does it work okay then?

Those errors look like there may be a problem with the workflow definition. Check if it is activated.

When did the errors start?

regards

Rick Bakker

Haabi Technology

Former Member
0 Kudos

Hi,

The workflow is active and consistent.

The problem is, once i raise the event 'COMPLETED' of WEBSERVICE from abap web dynpro application after application, the respective event is created and i can see it the log.

But the result processig of the respective workitem is not successfully completed. Do we have to make any configuration for call back of the workitem from url, like configurations in tcode 'WF_HANDCUST'.

Anyway, to answer, your question, I have tried to execute the workitem from R/3, where it could not open the workitem, and thrown into error.

Anyway,

Incase my above approach is wrong, lets start from the root.

Can anyone tell the best approach, in detail, to have a custom approval screen which can be launched from UWL and once the necessary action is taken from the UWL screen, the control should come back to the R/3 and the workflow should resume.

Request your help.

Thanks,

Sai.

former_member185167
Active Contributor
0 Kudos

Hello,

You write:

" I have tried to execute the workitem from R/3, where it could not open the workitem, and thrown into error."

In that case I would forget about UWL for now and try to get it working in R/3 first.

Are the errors the same as the ones above (unable to execute, can't find successor node)?

What step is it happening on - what does the step do?

Is it a custom workflow? When did the error start happening?

Is thi in Development? If not, did you check the Transport logs?

regards

Rick Bakker

Hanabi Technology

Former Member
0 Kudos

Hi,

Thanks for your support.

The scenario is like we have a particular type of request, which is to be created from portal.

The request has to be approved from the portal. These are basically ESS applications.

We dont have standard ESS applications.

We have created custom ABAP WebDynpro applications and custom workflow template.

Once the request is created from the portaL, the workflow is triggered and a workitem is sent to the approver's inbox.

The approver's workitem'S standard task is built upon BOT - WEBSERVICE -- Method - ProcessDialog.

The workitem goes to the approver's UWL and the once the approver approves the request, it is able to successfully write back the parameters to the task, henceforth to the workflow but the problem is, the workflow is NOT proceeding ahead, immediately after coming back from the approval task.

It is stuck, just in between the task and its immediate next step in the workflow.

The error is raising right from the approval task itself.

And , the error is appearing at two places,

1. the approval task and then immedately

Here, it is not able to process the result processing of the workitem.

2 in the workflow

here it is not able to find the successor node of the its preceeding step ( ie the approval step's )

So,

I think there is some particular coding/configuration, which i think is missing.

Can any one who has any kind of hint related to this issue, please throw some light on this.

If this approach not is recommeded, please suggest a better approach , for my requirement.

Thanks

Sai.

former_member185167
Active Contributor
0 Kudos

Hello,

As I said before, if you get the error with R/3 as well then forget the

rest for now (webdynpro etc) and concentrate on fixing it in R/3.

So it's a custom workflow.

Are you having this error in Development?

If not, did you check the transport log for errors?

Has this ever worked? Or did it just start happening?

The problem is with an approval task, is this a custom

approval task ie what is the TS number? Does it happen

on all outcomes, or just some?

regards

Rick Bakker

Hanabi Technology

narin_nandivada3
Active Contributor
0 Kudos

Hi Sri Sai Nath,

I have the same scenario like, User has to approve from UWL - where a Webdynpro has been developed for it.

But i did not use any terminating events as such. I used a function module SAP_WAPI_WORKITEM_COMPLETE

where the decision Key value is the order of the workitem decision ("Approve = '01' , Reject = '02' or etc") that has been designed in Workflow.

I had called this function module passing the workitem ID and the decision key based on the button user had clicked.

Try using this process and hope it would work for you as worked for me.

Revert if you have any issues.

Good luck

Narin

bpawanchand
Active Contributor
0 Kudos

WF_HANDCUST you need to [check this|https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/a6d6d4bb-0601-0010-5f92-e5b8bdc74f19&overridelayout=true] page no 681 - 675

Former Member
0 Kudos

Pavan,

I did wf_handcust configuration and when i tested the url, it showed test successful.

I did the config for

1. Lanuch Handler -

2. Call back handler

3. Call back dialog

4. Sys Status = handler server

5. Client Systems

The generated url, when tested shows success

( In fact these were done earlier also )

But still the problem is there.

Any way the code i used, in the web dynpro :

1. 'SAP_WAPI_WRITE_CONTAINER' - to write the parameters to the container

2. 'SAP_WAPI_SET_WORKITEM_STATUS' - to set the workitem status from READY to STARTED

3. 'SAP_WAPI_WORKITEM_COMPLETE' - to complete the workitem

For this step 3, i have two done it in two ways.

a. 'SAP_WAPI_SET_WORKITEM_STATUS' - to set the workitem status from STATED to COMPLETED

In this way, the parent workflow is not set to error,

but is in process state, and stuck and not proceeding ahead and

the result processing of the workitem is not happening, thereby the parameters in binding are not filled into the workflow container.

b. 'SAP_WAPI_WORKITEM_COMPLETE' - to complete the workitem

In this way, the parent workflow is set to error,

and stuck and not proceeding ahead and

the result processing of the workitem is happening, thereby the parameters in binding are filled into the workflow container.

BUT the workflow is in ERROR State.

Anyway, In both the cases, the result is the RESULT PROCESSING is not successful.

The webservice task workitem is taking the 'webflow service executed' path but not able to get to the next node.

One more observation,

The binding elements from the terminating event to the webservice task are not at all populated.

All though I have raised the COMPLETED Event ( terminating event ), it is not taking that path, as there is some basic problem with the result processing.

Former Member
0 Kudos

Sai,

I have, and rather currently doing the exact requirement.

You have written:

"i start a webdynpro abap application from a workitem with BO WEBSERVICE, method PROCESSDIALOG. Terminating event is COMPLETED from BO WEBSERVICE.

After i complete the workitem with FM SAP_WAPI_WORKITEM_COMPLETE in the webdynro application, workitem is processed, but workflow is set to error."

I am NOT doing the 1st past. I am just writing the data to the container and then calling SAP_WAPI_WORKITEM_COMPLETE.

I believe you have the "TASK Workitem ID" in your webdynpro, using which you are writing to the container.

Please try removing the 1st part.

Thanks

Deb

Former Member
0 Kudos

Hi Deb,

Thanks for the reply.

Can you plz give more details like,

1. How did u create the task? Is it a normal standard task or Webservice Task ?

2. What is the BOT and Method u used to call, in the task ?

3. Have you done the SWFVISU config for this task ?

4. Is there any terminating event for your task ? If not how you are terminating the task ?

5. Is it a ABAP Web Dynpro or BSP or EWT-Internet Service-HTML Template or Java WebDynpro ?

Edited by: Sri Sai Nath on Aug 11, 2009 3:48 PM

Former Member
0 Kudos

I was about to replay you and saw your reply.

1) Do not use the Webservice BO

2) Just create a dummy BO & method: with no code inside

3) Do configuration in SWFVISU

4) Re-resgister the system in Portal to get the XML updated for the new task added to SWFVISU

5) Now, when to trigger workflow for the 1st time from webdynpro : use SAP_WAPI_CREATE_EVENT

6) Next time you will get the Work item in UWL

7) launch the Webdynpro from UWL

😎 In the SUBMIT action: Write to container : SAP_WAPI_WRITE_COANTAINER

Set Workitem to complete

Thats all !! Cheers !!

Deb

Former Member
0 Kudos

Hi Deb,

Thanks a lot for your help.

I can see some hope now.

But, the workflow is in IN-PROCESS state indefinitely.

Even the task->workflow binding execution is not happening.

I can see the task parameters' values but not the workflow container elements' values.

And the workflow is actually stopped.

One thing, i had not raised from the beginning of the thread.

This is related to EP.

Once the approver, takes necessary action from the UWL, the workitem is not disappearing from the UWL.

The approver can once again open and see the workitem, by clicking the workitem in the UWL.

To make this workitem disapper, I have to logoff and re-login to the EP system.

Is this what, that is affecting the issue.

Former Member
0 Kudos

For any workitem, we can find

Result Process, after the completion of the Workitem Processing Complete.

But for this case, it is not so.

Once the code to complete the workitem, is executed, the workflow is having the status Workitem processing complete. And it does not have the execution of Result Processing - Executed Action.

So, any hint on the Result Processing ?

Former Member
0 Kudos

Sainath,

I am getting a bit confused with your problems.

1) Let me know if you did exactly what I mentioined in the previous reply

2) The worktime in your UWL is not disappearing because the worklfow is stopped at that task

In my case also it does not diasppear, if for say any reason user presses cancel button on the dynpro.

The work item complete FM is called only when user clicks "SUBMIT" on dynpro.

thanks

Deb

Former Member
0 Kudos

Hi Deb,

Yes. I did exactly what you said.

The 'Complete workitem' FM is called on APPROVE, but still the workitem is not disappearing from the url.

But it will disapper,

after a gap of some time, say 5 to 10 minutes. OR by log-off and log-on.

So, I doubt for any missing portal config. What do you think ?

Thanks,

Sai

bpawanchand
Active Contributor
0 Kudos

In portal settings we have a parmeter where the it will sepcify what is the time interval to refresh the UWL. so I want to you check by clicking the refresh button as soon as you finish the workitem execution.

Former Member
0 Kudos

Yes, as Pavan said..we need to refresh the UWL.

Former Member
0 Kudos

Thanks for all your continued support.

I have refreshed. But bad luck.

Currently, investigating the problem and working out some other alternatives.

Will come back.

Former Member
0 Kudos

Hi Pavan, Rick, Deb.

Finally, I have got this.

Thanks for all your support, friends.

Pavan, I have assigned 6 points for all your support.

Rick, I have assigned 2 points for your concern to help.

Deb, I have assigned 10 points to you. My solution is based on your steps.

Thanks a lot.

Pavan, I need to try with your solution using WEBSERVICE. I will try that.

Regards,

Sri Sai Nath.

former_member185167
Active Contributor
0 Kudos

Hello,

I'm glad it got solved but what was the solution? We don't do this for points, we do it for knowledge.

regards

Rick Bakker

Hanabi Technology

Former Member
0 Kudos

Hi Rick,

As I said in my last post, the solution is just I repeated the steps given by Deb.

Regards,

Sai.

Former Member
0 Kudos

Hi Sainath,

Could you please give me the complete steps to call / trigger a Web Dynpro application from SAP business workflow including the ABAP coding to be done in the web dynpro method to retrieve the workitem id etc.,

I could find some steps through net but are not full fleded. I would be a great help if you can give it.

Thanks,

Gowri.S

Answers (0)