Trigger MDM workflow from Webdynpro Java
Hi All,
After updating records in MDM, I want to trigger an MDM workflow from Webdynpro Java and pass those updated records to workflow. Any inputs on how to accomplish this. Workflow has already been developed using MSVISIO by the MDM team.
Thanks,
Tom
By following steps, it is possible to integrate workflow (or any workflow designed in MDM) within portal:
1. UWL (Universal Worklist): The UWL gives users unified and centralized way to access their work and the relevant
information in the portal. It collects tasks and notifications from multiple provider systems. One can expose MDM
workflow functionality on Portal using UWL.
2. JAVA APIu2019s: MDM Java API consists of set of classes related to MDM workflows through which one can create an
application that provide the MDM workflow functionality and expose the application as an iView in the portal.
Similar Messages
-
Trigger MDM Workflow in Webdynpro
Hello,
I want to execute a MDM Workflow from Webdynpro using Java API's. I have the WorkflowId,session Id and the RecordId in the Webdynpro. Can somebody please send the code for the same.?
Any help would be highly appreciated.
Thanks.Hi,
Check the pdf at the below link.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/600333e0-9bf7-2c10-1f99-bf5dcf661949?quicklink=index&overridelayout=true
Try using this code for calling MDM workflow:
RetrieveWorkflowTasksCommand task_command = new RetrieveWorkflowTasksCommand(connections);
task_command.setSession(sessionId);
task_command.setTableId(new TableId(1));
try {
task_command.execute();
} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
//Retrieving the tasks after execting the command
WorkflowTask [] task = task_command.getWorkflowTasks();
for(int i = 0 ; i < task.length ; i++)
WorkflowJob job = task.getJob();
job_id= job.getId();
System.out.println(job_id.getIdValue());//This is will give the Job ID of all the workflows in MDM.
Thanks
Pawan -
Trigger an workflow from webdynpro abap.
hai
gurus!
iam new to webdynpro.iam femilier with workflow . can anybody explain me with an clear example, how to trigger an workflow from webdynpro abap.
regards
roseHi Rose
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/using%20web%20dynpro%20java%20and%20web%20dynpro%20abap%20applications%20in%20universal%20work%20list.pdf">Click</a> Here, to know the step by step procedure of using Webdynpro in Workflows
Use SAP_WAPI_START_WORKFLOW RFC
Regards
Abhimanyu L
Message was edited by:
Abhimanyu Lagishetti -
How to trigger MDM Workflow from ABAP Program.
HI
I have requriment to trigger MDM Workflow(Design in MDM) from My Module pool program. Suggest how to do it?
Thanks in Advance.
Regards,
Shyam Babu Sah.Hi,
This question is for forum SAP Netweaver --> Workflow. There are functions and programmes that SAP delivers for this.
[Example here|Re: How can I trigger workflow from my report] -
Trigger MDM Workflow Using MDM ABAP API
Hi ,
I have requriment to trigger MDM Workflow from ABAP , Please suggest how to do it ?'
Thanks in Advance.
Shyam.Hi,
Are you creating material in MDM using Data Manager or Portal. or Using ABAP API.
If your workflow trigger Action is "Record Create" then it should trigger workflow as soon as new material is created. I don't see any problem in this.
Regards,
Shiv -
Trigger a workflow from ABAP Webdynpro
My Scenario:
Step 1: When a user hits the SAVE button on the webdynpro form, check if that data is consistent only and trigger a message(I have a BAPI to handle this check).
Step 2: If the data is consistent, then trigger a workflow to send an alert to an agent along with the data user entered on the form.
Step 3: AGENT shall review the data(Same form from step 1 should appear here) and will have the option to SUBMIT / POST or REJECT. If SUBMITTED, data will be posted to R/3(I have a 2nd BAPI to handle this). If REJECTED, send an alert back to the USER who entered data in step 1.
I checked lots of threads from the forum, none gave me a complete idea. Can any one give me a good documentation to trigger workflow from webdynpro to handle my requirement.
I am new to webdynpro.
I checked this blogs & articles also...
/people/ginger.gatling/blog/2005/12/14/create-new-uis-for-existing-workflow-tasks-with-abap-web-dynpro-and-universal-worklist
http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20java/wdjava%20archive/using%20web%20dynpro%20java%20and%20web%20dynpro%20abap%20applications%20in%20universal%20work%20list.pdf
Thanks a lot in advance.
Best Regards,
KiranHello Kiran,
I slightly misunderstood you requirement earlier. But if I am not wrong this time, here is what you need to do:
1) The Web dynpro form that you are creating is only for data entry purpose. But the agent who is going to review the data will need an access to this form. So this means that you need to save the content of this form to the database and provide a URL in the workflow workitem which the agent can use to open the web dynpro application with the form data on it.
2) To access the correct form, you need to save the form data in a Z-table with a GUID attached to it. Generate this GUID using GUID_CREATE function module. In the window controller of the Web dynpro component, there will be a handleDefault method where you can read the parameter'GUID' from the incoming request and use it to read the form data from the database to display the form.
3) You can use Object Oriented programming approach for creating Workflow. Check the following article to learn how to do that:
[http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0409e6c-d213-2d10-3cb6-c12d417626c1?quicklink=index&overridelayout=true]
4) Create a Z-class and use this class as object type in your workflow (instead of BOR object).
5) In the constructor of this class, pass a parameter GUID, which would be passed when you create an object of this class in the Web Dynpro forms "OnActionSave" method.
6) Create a method in this class which will do the task of calling the BAPI to save the Acct Document. This method will be used in a Background task in a workflow step (after the agent approves the workitem).
7) Create a method in the class which generates the URL to the webdynpro application with the GUID passed as parameter.
(for eg: http://urltoserver/appname?GUID='guidoftheform').
8) In your save method of WD application, call the method to raise event that triggers the workflow (using OO)
lv_guid = '04AE4546EED7101DE10000000A424026'. "use GUID_CREATE
lv_objtype = 'ZWFCLASS'. " create a Z-class of your own
TRY.
CALL METHOD cl_swf_evt_event=>raise
EXPORTING
im_objcateg = 'CL'
im_objtype = lv_objtype
im_event = 'FORM_APPROVE' " this event needs to be defined in ZWFCLASS
im_objkey = lv_guid.
CATCH: cx_swf_evt_exception.
ENDTRY.
Please read through the workflow using Object Oriented document in the URL that I have mentioned above before you read through these instructions.
There would be a way to do this using BOR objects, but this is the way that I have tried and tested to use trigger workflows from Web dynpro applications.
Best Regards,
Gaurav
Edited by: Gaurav Salkar on Apr 6, 2010 6:13 PM -
Reg: MDM workflow in webdynpro
Hi,
I am using MDM java API (Version: 5.5 SP 06 Patch 2) for webdynpro. I am creating a record in MDM using MDM java API. Once the record gets created in MDM i need to call the MDM workflow. Is there any java API available to call the MDM workflow into webdynpro. If that is not possible, what is the alternative to call the MDM workflow into webdynpro.
Kindly suggest.
Thanks,
Prasanthi.Hi
Check the following doc for workflow
1.[Workflow for SAP NetWeaver MDM|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60559952-ff62-2910-49a5-b4fb8e94f167]
2. [Extending MDM 5.5 Business Package functionality with Web|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/12195312-0e01-0010-a392-debbd32e39d4]
Best Regards
Satish Kumar -
Binding Structure/Internal Table to Workflow from Webdynpro
Hi Gurus,
I have to trigger workflow from WEBDYNPRO application. For now I have two ways they are:
1. Triggering WFLow using SAP_WAPI_START_WORKFLOW (Successfull):
How could I bind Structure/Internal Table (DDIC referred structure) to workflow directly. Presently I am mapping indvidual fields which makes my code complex using FM SAP_WAPI_START_WORKFLOW.
2. Triggering WFLow using SAP_WAPI_CREATE_EVENT (Bindind issues):
Also When I try to submit using BOR event with SAP_WAPI_CREATE_EVENT workflow triggers successfully But I cannot able to bind the values. So are there any specific configuration need to be made.( like making task as General while triggering workflow using SAP_WAPI_START_WORKFLOW).
<<text removed>>
Edited by: Matt on Aug 5, 2011 7:49 PMHi
Please make use of the below code
INCLUDE cntn01_swc.
DATA lt_kna1 TYPE TABLE OF kna1.
DATA lt_cont TYPE TABLE OF swcont.
DATA lv_wiid TYPE sww_wiid.
swc0_create_container lt_cont.
SELECT * FROM kna1 INTO TABLE lt_kna1 UP TO 10 ROWS.
swc0_set_table lt_cont 'CUST' lt_kna1.
CALL FUNCTION 'SWW_WI_START'
EXPORTING
creator = sy-uname
task = 'WSXXXXXXXX'
do_commit = 'X'
IMPORTING
wi_id = lv_wiid
TABLES
wi_container = lt_cont
EXCEPTIONS
id_not_created = 1
read_failed = 2
immediate_start_not_possible = 3
execution_failed = 4
invalid_status = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
The other way to do is you can also make use of OO ABAP classes to trigger the workflow. If you want to create a rfc function module then create a wrapper function module .
SAP_WAPI_START_WORKFLOW cannot transfer structures or tables which are more thatn 255 characters. So the work around is either make use of OO container or SWCONT container.
The above code snippet should be included in the assistance class of the webdynpro application and you need to include the define the include cntn01_swc in the class local types under macros.
and then you create a method ....... and include the above code in that method. excluding the include statement.
Regards
Pavan -
Kicking off workflow from webdynpro using events?
I have abap experience but no workflow. Any advice will be appreciated.
I have to kick off a workflow from webdynpro. I assume that I have to set up a business object (eg. ZOBJECT), create an event therein (eg. ZEVENT).
Then when webdynpro runs I use a rfc function module to trigger this event.
The questions I have are:
1. How do I set up the workflow to be triggered by this event?
2. Do I set up an event in Business object builder or in SM62?
3. How do I trigger an event in a function module. I have found SWE_EVENT_CREATE but don't want to create an event just want to trigger the event and in turn set off the workflow?
Thank you,
Warren.try this below parameters are passed or not
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
object_type = 'BUS2105'
object_key = lv_objkey
event = 'CREATED'
commit_work = 'X'
event_language = sy-langu
language = sy-langu
user = sy-uname. -
SAP MDM Connection with WebDynpro Java
Hi,
I am working with SAP WebDynpro Java (UI) and SAP MDM (Database). I had added the respective jars-
a) I want to test whether I am able to make a connection to the MDM server. Let me know input parameters (sample source code required) which I need to pass from SAP WebDynpro Java (UI) to make a successful connection to MDM (DB). Please let me know this in details.
b) After making connection to MDM, I need to write a query where I need to pass Lot No1 & Lot No2 from WebDynpro Java (UI) & check in a MDM table numbers of records existing and later display the corresponding records details (sample source code required) in the screen.
Your inputs will be highly appreciated.
Thanks.Anmol,
Depending on what version of WAS you are on...you might have WDJ components available that you can use. Just to offer a different view on your question.
Otherwise follow the links above or the following link to get sample code.
Read MDM ItemDetail Record in WDJ
You should get lots of sample code on SDN.
Thanks,
Praveen. -
Passing Parameters via Post Method from Webdynpro Java to a web application
Hello Experts,
I want to pass few parameters from a web dynpro application to an external web application.
In order to achieve this, I am referring to the below thread:
HTTP Post
As mentioned in the thread, I am trying to create an additional Suspend Plug parameter (besides 'Url' of type String) with name 'postParams' and of type Map.
But when I build my DC, I am getting the same error which most of the people in the thread have mentioned:
Controller XXXCompInterfaceView [Suspend]: Outbound plug (of type 'Suspend') 'Suspend' may have at most two parameters: 'Url' of type 'string' and 'postParams' of type 'Map'.
I am using SAP NetWeaver Developer Studio Version: 7.01.00
Kindly suggest if this is the NWDS version issue or is it something else that I am missing out.
Also, if it is the NWDS version issue please let me know the NWDS version that I can use to avoid this error.
Any other suggestion/alternative approach to pass the parameters via POST method from webdynpro java to an external web application apart from the one which is mentioned in the above thread is most welcome.
Thanks & Regards,
AnuragHi,
This is purely a java approach, even you can try this for your requirement.
There are two types of http calls synchronous call or Asynchronous call. So you have to choose the way to pass parameters in post method based on the http call.
if it is synchronous means, collect all the values from users/parameters using UI element eg: form and pass all the values via form to the next page is nothing but your web application url.
If it is Asynchronous means, write a http client in java and integrate the same with your custom code and you can find an option for sending parameters in post method.
here you go and find the way to implement Asynchronous scenario,
http://www.theserverside.com/news/1365153/HttpClient-and-FileUpload
http://download.oracle.com/javase/tutorial/networking/urls/readingWriting.html
http://digiassn.blogspot.com/2008/10/java-simple-httpurlconnection-example.html
Thanks & Regards
Rajesh A -
Call stateless session bean EJB 2.0 from Webdynpro Java UI
Hello,
Can someone please tell me asto how to call a stateless session bean EJB 2.0 from Webdynpro Java UI?
The NWDS version is 7.0.
Thanks and Regards,
AryaHi Aryadipta
Please check this pdfs
https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b00917dc-ead4-2910-3ebb-b0a63e49ef10&overridelayout=true
Steps for calling stateless session bean in Webdynpro java
Go to NWDS -> open perspective ->j2ee
select EJB Module Project ->create a project with name
Open the Project -->RC on ejb-jar.xml -> Select new --> EJB
Give name to EJB Bean (First letter should be in capital letters)
select the type of bean as Stateless session bean and give the package name to store that EJB bean.
After that Expand ejb-jar.xml and then select the <projectEJB>
Double click on this on method tab double click you will get business method where we will create the methods for business logic
Double click on projectEJB and then RC on bean tab and write required business logic in bean window as follows(based on requirement we will design a business logic).
After writing the business logic go to project -> rebuild
Till now we have created one EJB jar file
then go to File-->Enterprise Application Project -->create a project (projectEAR)
After creating a project click on next-> here we will have ear projects and then we select specific project required for our application.(here select projectEJB)
After that Calculate EAR project will be available on j2ee explorer.
Right click on <Bean> here
select New->Web Service->give a name to webservice and select Default configuration type as simple SOAP
-->click next -> Finish.
That webservice and related are created in ejb-jar.xml .
Expand the ejb-jar.xml.and double click on < webservice>
RC ProjectEJB -> Build EJB Archive RC on CalculateEAR ->Build applicationarchive.
Expand the projectEAR->RC on CalculateEAR.ear->Deploy to J2EE Engine
Double click on calculateEAR.ear ->Webservice navigator tab ->we eill servers expand the node
select the specific WebService
Here we test the webservice by click on Test and test it.
After that go to Web dynpro perspective ->create one webdynpro Project and one component
RC on model> Select import Web Service model(last)>give model name and package
and select radio button as local file system or URL
Go to WSnavigator->copy the WSDL path and paste it in model WSDL path and click on finish.
from here onwards steps are same as that adaptive RFC model
Hope it helps
Thanks
Tulasi Palnati
Edited by: Tulasi Palnati on Aug 26, 2009 12:15 PM
Edited by: Tulasi Palnati on Aug 26, 2009 12:43 PM -
Consuming PI Webservice from Webdynpro Java Not working
Hello SAP,
Environment: CE 7.2.
Resolution expected immediately, Helpful answer is highly appreciated.
Is the namespace should not exceed 60char for PI Webservice, for executing the webservice from Webdynpro Java.
I tried with all the options in executing the PI Service from Webdynpro Java, None of the options worked. I am facing the below error while I was calling the PI Webservice.
I don't see any problem from Webdynpro Java, what ever the procedure I have followed is the standard procedure.
Fortunately when I execute the service from Webservice Navigator, it is working as expected. The same webservice when I consume it from Webdynpro Java it is not working
Options tried so far:
1) Published the Services to Service Registry and there by consuming the PI Service from Service Registry - Not worked
2) Tweaked the URL with few options - Not worked (Tweaking the URL, ex: portType, Binding)
3) Changing the Business Systems in PI and there after calling the service - Not worked
4) Initializing the code, instead of creating Service Controller and calling the PI Service - Not worked.
5) Created a Provider System and tried to call the PI Webservice from Provider System - Not Worked
For all the Options, I am facing the same error which is provided in the screenshot.
Below procedure which I have followed for calling the PI Webservice:
1) Created Adaptive Webservice Model
2) Provided PI Webservice URL (It prompts for PI System UserId and Password)
3) Selected Option - No Service Group Configuration
4) Provided Logical Destination
6) Completed creation of Model
7) Added the model as a UsedModel
8) Right Click on Comp Contr. and selected Apply Template and Created a ServiceController for the model (Entire mapping to comp contr, Initializing the nodes is taken care by Service Contr.)
9) Created an Template Action button and there by calling execute method which is auto rendered from CompContr..
10) Build the project.
11) Activated the code and Run the Application.
12) Getting the below error which is showed in the message.
ERROR MESSAGE:
Exception on execution of web service on destination 'GetPIHRPeopleData' for operation 'SI_CreateHRPeopleData_OS' in interface 'SI_CreatePeopleCompany_OS'Hi Sankar,
If the webservice is working fine in the Wsnavigator then there is some problem with importing the webservice in webdynpro for Java. Please check the required parameter for creating the Adaptive Webservice Model. After adding in the used model and compoent controller binding, you need to write code for to execute the webservice model.
Please check the code for initialization and execution for the webservice and then test it.
Best Regards,
Arun Jaiswal -
Creation of purchase requisition from Webdynpro Java
Hi all,
I have a requirement that i should create purchase requisition from webdynpro java. i imported all required BAPI in the webdynpro. But i am not getting what should i have to give as input paramater. I have imported the Bapi_Requition_Create. Please help me on thin what sould be the input parameter i should pass.
Regards,
ShreeharshaShreeharsha,
you can check out the fm inse37 and see what are the importing and tables parameters
Thanks
Bala Duvvuri -
HOW TO TRIGGER AN WORKFLOW FROM A PROGRAM ?
HELLO THERE ,
CAN ANYBODY PLZ TELL ME HOW TO TRIGGER AN WORKFLOW FROM AN PROGRAM AND TO PAS THE VALUE TO THE CONTAINER ?Hello Neon,
If you want to trigger the workflow directly, use the FM, SWU_START_WORKFLOW
CALL FUNCTION 'SWU_START_WORKFLOW'
EXPORTING
task =
* LANGUAGE = SY-LANGU
user =
* SENDER_ID =
* IMPORTING
* RETURN_CODE =
* WORKITEM_ID =
tables
* CONTAINER =
* MESSAGE_LINES =
attachment_list =
A workflow can also be triggered by and event which is in turn triggered by a program.
By the FM, SWE_CREATE_EVENT
Example:
w_key = 'Connie'.
w_creator-otype = 'US'.
w_creator-objid = 'SAPDEV02'.
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = 'YH_BUDDIES'
objkey = w_key
event = 'event'
creator = w_creator
* TAKE_WORKITEM_REQUESTER = ' '
* START_WITH_DELAY = ' '
* START_RECFB_SYNCHRON = ' '
* NO_COMMIT_FOR_QUEUE = ' '
* DEBUG_FLAG = ' '
* NO_LOGGING = ' '
* IDENT =
* IMPORTING
* EVENT_ID =
* TABLES
* EVENT_CONTAINER =
EXCEPTIONS
objtype_not_found = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
WRITE: / 'EVENT TRIGGERED'.
ENDIF.
COMMIT WORK.
Hope it helps you.
Regards
Indu.
Maybe you are looking for
-
My late-2009 21.5-inch iMac is freezing so much, it's basically unusable.
About 2 weeks ago, I started to see a slow decline in overall speed. Now, my iMac is so slow, and freezes up so much, that I basically can't use it. I have ran the Apple hardware test that came with my mac on a CD, checked to make sure I wasn't using
-
Hi, I work on a migration project : Sybase to Oracle 10g. There are a lot of request INSERT writed in Sybase with data too long to be insert in a table. Example : create table MyTable (txt varchar(10)) insert into MyTable values ('AAAAAAAAAAAAAAAAA')
-
Replace last comma with ' and '
Hi All, please let me know is there any simple way of replacing last comma in as string with ' and ' eg: 1. abc,xyz,wuv should be returned abc,xyz and wuv 2. abc,wuv should be returned abc and wuv 3. abc,pqr,cuq,wuv should be returned abc
-
Am a newbie ipad app developer. Chose the ipad due to the larger screen size. All I need is a few tabs. When user clicks on one of the tabs shows several UIPickerViews, some sets of check boxes (maybe organized into a UITableView), perhaps a boolean
-
Hi Experts, In my application, the user reads his inbox in the Exchange Server for a particular mail. But some of the clients have their flags set as seen on the server when they recieve mails on outlook. In this case, the particular mail is unread i