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

Similar Messages

  • 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.

  • 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]

  • 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

  • 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
    rose

    Hi 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

  • 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

  • How to trigger a workflow in webdynpro programs

    Hi Experts,
    I am new to SRM Workflow, and I need to trigger a workflow in my webdynpro programs.
    But I don't know how to achieve it.
    I am using SAP SRM 7.0, so I want to use Process Controlled workflow.
    Any suggestions would be greatly appreciated.
    Thanks and Regards
    Wei

    Hi, thank you for the attention, and my requirement is as below.
    1. Creating a web dynpro program
    2. User can execute the program and input data on it. Such as Expense application, Leave application...
    3. When the user click the "Apply" button on the form, the application should be sent to the boss for approval.
    *** I want to trigger a workflow when the user click the "apply" button.***
    I have achieved the similar functions in SAP ERP systems, by generating Events in my custom programs.
    But I don't konw how to do it in SRM 7.0.
    Or it is impossible to achieve it, under Process Controlled workflow architecture.
    Thanks and Regards
    Wei

  • Call MDM Workflow for Item Record

    Hello,
    We are implementing MDM 7.1 on Portal and want to trigger MDM Workflow through Webdynpro Java when a user edits a record for Item and clicks on 'Save'. I have captured the 'Post Save Event' in Webdynpro Java and received the Record Id of the Item being edited.
    Now I want to execute the Workflow based on the RecordID. Can somebody send me the code for the same for connecting to the MDM Repository and starting the workflow for the Item record.
    Any help would be highly appreciated.
    Thanks

    Hi,
    Please refer the SAP MDM Portal Content Development Guide - http://help.sap.com/saphelp_mdm550/helpdata/en/45/c87d0243e56f75e10000000a1553f6/frameset.htm
    You can check the section - Connecting with the repository using System Object.
    If you are using MDM workflow on Portal then refer this guide -
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/902a77c2-9bf7-2c10-7f83-df61e131e770
    Thanks,
    Shambhu.

  • How to work with a workflow in Webdynpro

    Hi Team,
           I am new to webdynpro ABAP, i have a scenario
    I have a work flow id with me, i want to start this workflow from a webdynpro application,
    1. wedynpro application contains a list of inputs and user1 inputs this data that i have stored node, So node contains full data.
    2. Now i have a workflow id, i want to pass this node data to this workflow on a button click
        I have the button action, what code is required to pass this?
             (I sow few FMs in fourms but i dont know how exactly i can use it)
    3. When the approver gets the workitem, he should be able to approve,reject or send backToAuthor option he will get
         how to read this data back to approver screen for the approver to take correct action ?
    Please help me with some code sample, i sow few things but i am not sure about the parameters which required for this.
    Thanks,
       PP

    Hi,
    1)  In order to trigger the workflow from webdynpro and pass the list of inputs and your workitem id  , i will suggest you to go for    a   business object.
    2) If you have a business object than you can just trigger the workflow through the event (provided your workflow should be an event trigger workflow). As well as you can pass your parameters through it.
    3) In order to trigger the workflow through your business object event u can use the following function module.
    in the below code:-
    it_container- contains the parameter u want to pass like workitem id in your case.
    ZPOC_LEAVE- is my business object.
    OPTIONAL- is my event which will trigger the workflow.
    ty_object_key:- structure type of key fields of business object.
    Note:-you have to define these values as per your business object.
    * Trigger the event ZPOC_leave-CREATE to start the workflow
      DATA: it_container TYPE TABLE OF swr_cont,
                 is_container LIKE LINE OF it_container.
      DATA: g_return_code TYPE sy-subrc,
                 glf_event_id TYPE swr_struct-event_id.
      DATA : ls_objkey TYPE ty_objkey.
      DATA : ls_objtype TYPE swr_struct-object_typ VALUE 'ZPOC_LEAVE'.
      DATA : ls_objectkey TYPE swr_struct-object_key.
      DATA : ls_event TYPE swr_struct-event VALUE 'OPTIONAL'.
    CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
        EXPORTING
          object_type             = ls_objtype
          object_key              = ls_objectkey
          event                   = ls_event
          commit_work             = 'X'
          event_language          = sy-langu
          language                = sy-langu
          user                    = sy-uname
    *   IFS_XML_CONTAINER       =
       IMPORTING
         return_code             = g_return_code
         event_id                = glf_event_id
       TABLES
         input_container         = it_container
    *   MESSAGE_LINES           =
    *   MESSAGE_STRUCT          =
    4) You also need to define the parameter(workitem id in your case) under the parameter option of your event in your business object. (you can use the transaction SWO1 for business objects).
    5) Now in swdd transaction in the basic data u can mention your start event.
    This should be enough to trigger your workflow  and pass your workitem id to it.
    Thanks and regards,
    Mayank Gupta
    Edited by: Mayank Gupta on Feb 4, 2011 5:52 AM

  • How to integrate SAP HR Workflows with Webdynpro ?

    Hello All,
    Could you please drop some hints for the below points please ?
    How do we trigger SAP workflow from Webdynpro DC? Usually if its a RFC we import RFC through Model and trigger the RFC. Can that be done only through Adobe forms? If yes,how do we trigger work flow through Adobe Forms?
    Many Thanks,
    Dhanya

    Hi, Dhanya
      Of course via RFC! Usually these workflow related RFMs are called WAPI
    (Workflow API).
      Please refer to this thread.
      Workflow and Trigger Event
      And Adobe forms is not relevant to SAP workflow at all. Usually, Adobe forms
    + workflow scenarios are achieved via the above workflow APIs.
      Best Regards.
      Sejoon

  • How to Trigger a Workflow from ABAP Webdynpro

    Hi All Gurus,
    I have the following urgent requirement, my client is implementing HR and there is a requirement, where is a ABAP Webdynpro component in which we have integrated a Adobe Interactive Form. When the user calls this from through Portal and fills out the relevant data and submits it, a Workflow in the backend ECC system should lauch,
    I am not familiar with, this concept although I have worked in Workflow this is the first time I am interfacind with ABAP Webdynpro and Adobe Interactive From.
    Can you please let me know in steps what needs to be done to make the workflow trigger for my scenario and also the specific settings to be done in the bacckend.
    Regards,
    Pratima Jain

    Hi,
    If you are using HCM Processes and Forms, the Workflow and form are not directly related, thats true.
    But the method in the task calls the corresponding webdynpro application which responds to the action triggered by the user in turn to trigger the workflow and update the data in the HR Master Data.
    There are 3 layers  1. UI (webdynpro which launches Adobe Interactive form based on ISR Framework)
    2. Workflow
    3. Backend framework (used for retrieving F4 helps, default values, save data in the infotypes).
    for more documentation, please refer it on help.sap.com.
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/82/b6b94278560c31e10000000a1550b0/content.htm
    hope this helps.
    Best Regards,
    Saujanya.

  • 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,
    Kiran

    Hello 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

  • Mdm workflow through sap r/3

    hello experts
    I have a scenario to trigger a workflow in SAP R/3 from MDM
    Objects need to be created in SAP for this
    I found this in a pdf file
    "A pre-requisite for connecting SAP Business Workflow to MDM is to build a BOR Object which represents the products in MDM. But how does this BOR Object really communicate with MDM?
    Using MDM ABAP API – Creating an ABAP code which communicates with MDM via MDM ABAP API (available as of MDM 5.5 SP3). Using the ABAP API directly from the Workflow environment simplifies integration between SAP Business Workflow and MDM, but makes integration to other systems more difficult as ABAP is not the greatest environment with regards to openness."
    How do I go about it ? Where is this API and how do I use it ?

    this is the link to the pdf
    Workflow for SAP NetWeaver MDM – How, Why and What to Choose
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60559952-ff62-2910-49a5-b4fb8e94f167
    i need to implement 'SAP Business Workflow' from page 6 in the above pdf
    we are using MDM 5.5 SP04

  • MDM Workflow and LDAP

    Hi Junta,
    We are on MDM 5.5 SP5 Patch2. Our MDM server is connected to LDAP for Authentication and Role to User assignment is stored in LDAP.
    Problem 1. Check in/ Chek out is not working in the repository. I think this is a known problem and rectified in SP6. Correct me if I am wrong.
    Problem2. I have created workflow. I am trying to assign a role to one of the step. This workflow checks out the record and pushes it to steps. When I trigger the workflow on a record, this gives me error saying that,  a preluanched job could not be initiated. Is this because of the problem 1.
    How does workflow resolves the users from the role to send the tasks to? Does it talk to LDAP and finds the assignments? Or it expects the assignments to be local on MDM repository.
    After LDAP connection and restart of the MDM server, I lost all my users in the assignment list when I try to assign the user to the step instead of role. Any comments / solution.
    Thanks,
    Amber

    Hi,
    I think your issue is item visibility in Search UI. What can you see in search UI? Can you see Category and Supplier?
    If approval is not required, you do not need to create any workflow.
    I have done 3 customer projects but none of them use item approval because items are validated by Excel Macro when they get data from supplier.
    http://help.sap.com/saphelp_srm70/helpdata/EN/45/e9d8ef302704aae10000000a114a6b/frameset.htm
    http://help.sap.com/saphelp_srm70/helpdata/EN/45/efc5a9348a3112e10000000a1553f7/frameset.htm
    Regards,
    Masa

  • WORKFLOW IN WEBDYNPRO

    Hello Experts ,
              how to call / trigger workflow in web dynpro application ? if possible provide some example ?
    Thanks  ,
    Rushikesh

    Hi,
    Starting a workflow from WebDynpro is no different than starting it from anywhere else.
    Best practice is to raise a triggering event for your workflow via the function module SAP_WAPI_CREATE_EVENT (or SAP_WAPI_CREATE_EVENT_EXTENDED for OO events)
    good luck
    Paul

Maybe you are looking for

  • How to use my time capsule with windows vista

    i have a 2tb time capsule iphone 3gs appple tv and a ipad 2 the wife and kids have iphone 3gs and 4 and id like to set up a home network for us all to use and share music and photos is this possible

  • Creation of 250+ custom UDFs in OIM 11gR2

    We are working on a IAM implementation using OIM 11g R2. Our requirement is to add 250+ custom UDF attributes in user profile. We already have 100 UDFs and planning to create additional 150 UDFs. Could you please let us know if anyone of you have com

  • Export and Import of master repository - error snpuser not found

    We had installed ODI on a windows server and created physicla and logical topologies etc and developed some models and projects. But we had sone all of this while still pointing to the demo master repository using the HypersonicSQL. This means we alw

  • File Attachment in a Email.... problem with file path

    Hi experts I am trying to implement something similar to any email program. A user can send email to a user along with attachments. I am encountering the following problems: 1) in IE, the file path is set correctly, but in mozilla only the file name

  • Writing smartform output into application server.

    Hi, i have a smartform output having logo and other details. After this i am converting the smartform output to PDF file and i tried write into application server using Open Dataset, Close Dataset. The thing is i am unable to see the output in pdf fi