on 2010 May 19 9:31 PM
Hello Experts,
I am fairly new to workflow and I am hoping you can clear some of my basic questions. I am triggering a workflow from my webdynpro application (this works) like this -
CALL FUNCTION 'EWW_WORKFLOW_START'
EXPORTING
X_TASK = 'task number'
IMPORTING
Y_WORKFLOW_ID = WF_ID.
Can anyone throw more light on this WF_ID. I imported this value and its a integer value. Does this value remain the same throughout a workflow instance?
Can you please let me know what is the difference between WF_ID (Worflow Id) and wokitem id.
I am also researching on ways to pass parameters back and forth between my webdynpro app. (abap) and workflow. Would be very helpful, if you can give me a good starting point.
Appreciate all your help! Thanks, Liz
Hello,
As far as I know, it's not recommended to use EWW_WORKFLOW_START; better to use SAP_WAPI_START_WORKFLOW and best to use SAP_WAPI_CREATE_EVENT.
I would guess that the workflow id is the workitem id of the top level workitem ofthe workflow. That should be all you need to read workflow container values using SAP_WAPI_READ_CONTAINER.
regards
Rick Bakker
Hanabi Technology
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
If you use SAP_WAPI_START_WORKFLOW then the WORKITEM_ID parameter will give you the workitem id of the workflow.
If you use SAP_WAPI_CREATE_EVENT then you could use fm SAP_WAPI_WORKITEMS_TO_OBJECT and fm SAP_WAPI_GET_WORKITEM_DETAIL to get data from the workflow.
Was that the question?
regards
Rick Bakker
Hanabi Technology
Hi Rick,
I guess I should asked my question more elaborately.
In my requirement, I first call start workflow from a webdynpro view and i have used the FM you gave. At this stage I know the workflow id - WF_ID.
Now the workflow gets triggered, goes thro some steps and then again calls the Webdynpro application (Webservice config has been done for this and its working). At this stage ie when the workflow calls the WDN browser, I have to pass the work item id to WDN. So now my ques is how to pass the work item id from workflow to wdn.
I have a parameter in the workflow container that gets filled out when the WDN browser is called. I have tested this and it works. How do I access this parameter in the Webdynpro View as the view doesnt know this field.
Hope I am clearer now. Sorry about that.
Thanks, Liz
I think you can make use of the URL Parameters concept in order to get the workitem ID into the compoenent view.
I hope you will be pretty much clear about how to make use pf url parameters, but the second thing that you have to make a note is that the workitem id needs to be passed to the application,
I think inorder to acces the work item you have two ways
1. Either in the webservice that you have defined , create a Parameter WI_ID of tyep SWW_WIID.
2. The otehr way is, once you start the workflow by using the above mentioned function modules, you can get the parent workitem ID into your action method. Make use of the FM SAP_WAPI_GET_DEPENDENT_WIS, inorder to get the woktiem ID that is waiting for a user interaction then , to this FM pass the parent workitem ID that you ahve imported from starting the worklflow, then this FM will return you all the workitems now you have to read the table with workitem type equal to W and workitem status is equal to ready...
Hi Pavan,
Your first choice is what I am doing, but I guess I am missing something.
I have defined a parameter in the webservice - WF_ID (import parameter for webservice). This parameter gets the workitem id in the workflow container (I am checking this in the WF log). In my WDN application, I have defined this parameter as well. But the value is not populated.
I would be very greatful if I can find a step by step document to verify my configuration, But i am still searching for one.
Also, can you throw more light on the URL Parameters concept that you mentioned.
Pls. advice, Liz
Found my solution here -
http://wiki.sdn.sap.com/wiki/display/WDABAP/IntegratingWebDynproABAPapplicationswithUWLforworkflowin+Portal
All,
Can you please advise how I can get the work item ID in my web dynpro component. I realise that I can thereby try to use SAP_WAPI_READ_CONTAINER, SAP_WAPI_WRITE_CONTAINER methods to get the container values , and put the container values back.
Thanks in advance! Liz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
67 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.