Execute workflow for a Record in MDM thorugh Webdynpro Java

Hello,
I am creating a Webdynpro Java Application to listen to the Save event on the Item Edit iview through Eventing, the application is called on that event and RecordID is fetched in the code.
Now I want to trigger the workflow for that Record being edited using the Record ID.
How can I achieve the same using the MDM Java APIs?
Any help would be highly appreciated.
Thanks.

Hello,
I am using the following code to execute the Job for the Workflow :
LaunchWorkflowJobCommand LWJC = new LaunchWorkflowJobCommand(connections);
LWJC.setSession(session);
WorkflowJobId WJID = new WorkflowJobId(wfjc.getWorkflowJobId()); // where wfjc is of Type CreateWorkflowJobCommand
LWJC.setJobId(WJID);
try
LWJC.execute();
catch (CommandException e)
e.printStackTrace();
return;
but at runtime it gives me the following exception :
com.sap.mdm.internal.protocol.manual.ServerException: Illegal value for parameter
Please help me on why this exception is occuring .
Any help would be highly appreciated.
Thanks.

Similar Messages

  • Automatic start workflow for ALL records

    Hi Experts,
    Does anyone know a way to start workflow automatically for ALL records without human interference?
    I want to start workflows every day. For instance to recalculate, re-validate, re-assign or syndicate ALL records of a table.
    Kind regards,
    Job Jansen

    Hello Job Jansen
    I suppose recalculate and validate all recodrs once a day don't make sense when that records is the same
    and records wasn't changing
    However, you can use Autolaunch = Threshold with Max Time = 24 hour(for example)
    workflow will fire when Max Time say greater then time last launched job.
    And few another ways:
    1) you can use task sheduler for launch import manager and turn autolaunch workflow when it do import
    2) turn automatic import process(MDIS) once a day and use workflow for add records
    3) developed Java application which used MDM JAVA API for start workflow
    Regards
    Kanstantsin

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

  • Build gui for existing oracle database tables with webdynpro java?

    hi
    i want to build a GUI to maintain existing oracle tables
    so far we used oracleFORMS to do so
    is there a good approach for webdynpro java? or do you recommend other sap tools?
    can we generate the gui with a wizard based on the fields in the table?
    do we have to generate sql statements or type in manually?
    regards
    joerg

    Hi Joerg,
    generally that is possible, but you'll have to implement the data access by yourself, by means of EJB or another Java persistance framework such as JDO, SQLMaps, Hibernate, whatever...
    Web Dynpro allows to build a GUI based upon a model - in this case this could be some POJOs (DTOs) representing your database tables, which are communicated to the GUI by your data access layer. Consider a model as a simple Java bean representing database data.
    This approach would require to build a data access layer which incorporates manually generated sql statements, so you'll have to have expert database and java knowledge.
    There might be other approaches, this is just to demonstrate one working possibility.
    regards,
    Christian

  • Inserting and Updating records in ORACLE using WebDynpro Java

    Hi All
    I got connected to oracle backend (using my previous thread), but now i want to insert and update the records
    i have created views  for insert and update,
    Thanks in advance
    Sushma

    Hi shusma..
    chk this link..
    <b><u>Creating Connection</u></b>
    package com.sap.xirig;
    import javax.naming.*;
    import javax.sql.*;
    import java.sql.*;
    public class DBLookup {
    String Conn_Status = "Not Connected";
    String Language_Desc = "Empty";
    String Language_Cd = "Empty";
    Connection conn;
    Context ctx;
    DataSource ds;
    //Constructor for the DBLookup object
    public DBLookup {
    try {
    ctx = new InitialContext();
    if (ctx == null) {
    throw new Exception("Boom - No Context");
    // If JDBC 2.0 connection is used please create the DataSource object as below
    // ds = (DataSource) ctx.lookup("jdbc/ORACLEDATASOURCE");
    // If JDBC 1.0 connection is used please create the DataSource object as below
    // ds = (DataSource) ctx.lookup("jdbc/notx/ORACLEDATASOURCE");
    if (ds == null) {
    throw new Exception("Boom - No dataSource");
    catch (Exception e) {
    e.printStackTrace();
    public String getLanguageDesc(String v_str) {
    Statement stmt = null;
    ResultSet rst = null;
    try {
    if (ds != null) {
    conn = ds.getConnection();
    Conn_Status = "Could not get connection to
    datasource";
    if (conn != null) {
    Conn_Status = "Got Connection " +
    conn.toString();
    stmt = conn.createStatement();
    rst = stmt.executeQuery("SELECT
    LANGUAGE_DESC FROM LANGUAGETRANSLATION WHERE LANGUAGE_CD='" + v_str +
    if (rst.next()) {
    Language_Desc = rst.getString(1);
    conn.close();
    catch (Exception e) {
    e.printStackTrace();
    finally {
    if (rst != null) {
    try {
    rst.close();
    catch (Exception e) {
    e.printStackTrace();
    if (stmt != null) {
    try {
    stmt.close();
    catch (Exception e) {
    e.printStackTrace();
    if (conn != null) {
    try {
    conn.close();
    catch (Exception e) {
    e.printStackTrace();
    return Language_Desc;
    http://e-docs.bea.com/wls/docs81/oracle/API_joci.html
    Hope this will help u..
    URs GS

  • Need help to create a new record in mdm using java webdynpro

    hi all,
    I have to develop an application to create a new record in mdm by using java WebDynpro  . Please help me what is the process that i have to follow to do this and provide me if you have any step by step guidance for this.
    thanks & regards,
    Mahi.

    Hi,
    The below link will help u to make the application in JAVA webdynpro
    The article has code to for creating records.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/803e9e80-21f4-2a10-8cbf-bcf6a8060be3
    Hope this may help u .
    Rgds
    Ankit

  • How to Create our own Custom Design for UI Elements in WebDynpro Java

    Hi Experts,
    As of now i am using the Standard design for the  UI Elements in the WebDynpro Java Applications.
    For example:
    header1,header2,monospace etc are available in design for UI Elements.
    Now i want to give my custom design to the UI Elements.
    So how can i create this. and Is it possible to create in NWDS.
    Thank You.
    DS

    Hi DS
    Eclipse Theme Editor for NetWeaver 2004
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a026b4ce-de48-2a10-7285-fb457ee6c7ed
    Eclipse Theme Editor for NetWeaver 7.0
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/136dd890-0201-0010-1b9d-bd09a0d3b1d8
    Hope this will be use ful for u
    Regards
    sriram

  • Max number of records in MDM workflow

    Hi All
    Need urgent recommendations.
    We have a scenario where we need to launch a workflow upon import of records. The challenge is source file contains 80k records and its always a FULL load( on daily basis) in MDM. Do we have any limitation in MDM workflow for the max number of records? Will there be significant performance issues if we have a workflow with such huge number of records in MDM?
    Please share your inputs.
    Thanks-Ravi

    Hi Ravi,
    Yes it can cause performance overhead and you will also have to optimise MDIS parametrs for this.
    Regarding WF i think normally it is 100 records per WF.I think you can set a particular threshold for records after which the WF will autolaunch.
    It is difficult to say what optimum number of records should be fed in Max Records per WF so I would suggest having a test run of including 100/1000 records per WF.Import Manager guide say there are several performance implications of importing records in a WF,so it is better to try for different ranges.
    Thanks,
    Ravi

  • MDM Workflow for Exceptions

    I have read about the Checkout/Workflow config for imported MDM records, but I cannot find an answer to the following query. 
    Can I create an MDM workflow when MDIS import files fail (go to Exception directory)?  I would like to notify a user that there is an import exception and tell them some details about why it failed.
    Thanks,
    Keith

    Hi Keith
    this is not possible using MDM workflow for the reasons rightly explained above.
    Instead the users can see the import logs and find out which records failed to import. if you are importing manually without MDIS.
    for more details on error handling for records failed to import using MDIS refer to the link below:
    Re: Records goin to exception folder with "Ready to Import" status
    best regards
    Ravi

  • Workflow for Maintenance of records

    What is the best practice for MDM workflows for Product Master data maintenance?  This is specifically about manual vs automatic workflow trigger. 
    Automatic Trigger - As and when record change, workflow trigger.  No Need for people to go manually and initiate the workflow.  Easy for user(s) to maintain.  But with this, we will loose the functionality (Compare from original Records) as records change happen before trigger.   We never know what changes made in user friendly manner.
    Manual Trigger - Item needs to be attached manually to maintenance workflow.  User needs to know about this step and have this additional work.  This will not work, if somebody is changing record on portal.  But this way, we will use the functionality for (Compare from original records) as record change happen after workflow trigger. 
    Any suggestion?

    Hi Rt,
    If you compare Automatic Importing to Manual importing.
    Automatic will be the prefered option as any business process will prefer Automation over manual due to serveral reasons some of them being lesser manual error,Less time better efficiency etc.
    If you have a set of say 1 million records and in a delta import process say 10000 records gets changed.If you wish to run a maintainence workflow on these 10000 records mnaully will be a hectic and tedious task.
    On the other hand if you have set the trigger to automatic trigger action for record update.Automatically these updated records will move to the workflow.
    If you really wnat to keep a track of the updated records you can try using one of the below strategies:
    - Enable change tracking wherein you will be able to view the old value and new valueof the changed records.
    Kindly refer the below link:
    http://help.sap.com/saphelp_mdm550/helpdata/en/45/c7b20339ee570ae10000000a114a6b/frameset.htm (change tracker)
    http://help.sap.com/saphelp_mdm550/helpdata/en/45/c87d0243e56f75e10000000a1553f6/frameset.htm (Change Tracker Configuration)
    - Use a time stamp field which will get updated everytime a records gets modified for a particular field.
    Hope It Helped
    Thanks & Regards
    Simona Pinto

  • How to create a workflow for e-mail adrress entered in a particular record?

    HI Experts,
    I have to create a workflow in which a mail is triggered to the e-mail ID entered for the record type "Complaint".
    Like, if there is a field called as "E-mail ID of customer" in the Complaint page layout and the user creates a complaint and a workflow is created for WNRS the mail should be triggered to the e-mail address which is mentioned in the field "E-mail ID of customer".
    I have tried by using Relative user on record but there is no Option to select that kiind of a field.
    If any one can help.
    Thanks in anicipation.

    You need to choose "Specific Email Address" and over there you can select the field from the Complaint.
    Regards, Tim

  • Workflow rules doesn't work for existing record!!?!?!?

    Hi all,
    I've created one workflow rule to update value from one filed to another. Here is my expression:
    [<QuickSearch1>] <> [<plStatus_ITAG>]
    and my action is
    field name = "*Status" (QuickSearch1)
    Value = <plStatus_ITAG>
    and I tick on the Overwrite the existing value
    This is work for new record, but for the existing one the field value doesn't chnage. Any suggestion??
    Thanks
    Note

    The syntax should be: PRE('< QuickSearch1>') <> [<QuickSearch1>] for the condition.

  • Workflow for record type = User

    Hi All,
    I would like to create an WF for record type = 'User' that will update one 'User' object field based on the value entered in other 'User' object field.
    Simple to do for any record type except 'User' which is not an option in the Workflow Rule New record type LOV, any ideas for an workaround here?
    10x,
    AlexD.

    Hi Alex, unfortunately I have no answer, but I´m looking for something similar. I want to link object fields of the user´s direct manager to the appropriate object fields of the user. I don´t wanna save the values via a workflow, as the value should be dynamic if it changes in the user profile of the manager.
    If this could be combined with a dynamic user layout for the administrator it would enable perfect user management. Does anyone have an idea? Many thanks, Joerg

  • How to generate the User-Input XML Body for executing workflows via REST APIs: The Solution

    I see that executing a workflow via REST APIs requires lot of work to be done just to prepare the right User-input XML body. Any mistake and you have some major debugging to do. Larger the number of User-Inputs, the bigger is the problem.Life is so much easier at the WFA GUI with Display names and tooltip help for User Inputs which are very easy for reading and providing the right values. I don't have any such privileges when manually preparing the User-Input XML body.It’s been asked numerous times how to provide User-Input values for type table, or Query (Multi-Select) etc. These are complex User-Input types and has lots of scope for user mistakes.I can have User-input dependency at WFA GUI which allows me to make the right selection, but while preparing my XML body I need to take care of it myself.An operator is allowed to execute workflows, but the same Display names which help him make the right user-inputs, makes it impossible for him to prepare the user-input body xml. Display names can't be used in in XML body and he can't know the exact parameter names by looking at the Display names. So he need to always contact the Admins/Architects for this. And Architects/Admins can't be expected to keep providing User-Input XML body to operators every operator. How about if I could enter all the User-Input values in my workflow execution at WFA GUI, I can do a preview which passed to my satisfaction and then I can magically get the XML body for it which I can use to execute my workflow from REST APIs from any client. It could be so very much easy for me than building my User-Input XML body manually. This is exactly what I'm going to give you right now. You open the WFA in browser, Go to your workflow, Start execution, you input values from GUI reading carefully the display names, preview it to your satisfaction and then get the XML body. Assume your workflow is called “Workflow to Print a given Message”. It’s a simple workflow with only 1 user-input Displayed as "Message to Print" Prerequisites:  The following are the one-time prerequisites. You need PowerShell 3.0 on your WFA server.Import the attached Generate_Workflow_User_Input_Body_in_XML.dar in your WFA. It’s our magical command called "Generate Workflow User Input Body in XML"Add credentials of a WFA Admin/Architect in you WFA itself with Name/IP: localhostMatch: ExactType: OtherName/IP: localhostUsername: <WFA Admin/Architect Username>Password: <User Password>   Steps: Suppose you have a workflow called "Workflow to Print a given Message". You want to execute it from REST apis and need to prepare the user input XML body.  Select this workflow and clone it. The workflow clone is the exact copy of your original workflow word by word, input-by-input. It will open in Edit mode with name "Workflow to Print a given Message - copy".Add the command "Generate Workflow User Input Body in XML" at the beginning of your workflow. This is a must. This command need to be the first command in your cloned workflow.This command requires no input. So for its Parameters just press okay and save the workflow.You are done.Now Execute the clone workflow. You'll see all the user-inputs available to you. Make your choices as you wish. Preview it to confirm that planning is passed and u have no errors.Execute it now.You'll see that the our magical command "Generate Workflow User Input Body in XML" has failed in our clone workflow execution. Don't worry, its fate was decided to be so. But it didn't fail before giving me what I really wanted. i.e. my XML body for my real workflow. It displayed it in the GUI as well as saved it in your WFA server @ C:\temp\<workflow_name_dd_MM_yyyy_hh_mm_ss_.xmlIt also deleted all the reservations of this particular failed job. So NO major residue left to be cleaned.To summarize: Clone Your workflow and Add the command "Generate Workflow User Input Body in XML" as your first command.    Start Execution, provide your User-inputs and preview it. Be satisfied and Press Okay.   Now Execute it.  After a few scconds this cloned workflow will fail with Error "All done. The Workflow will fail now."     See the command execution logs for this command. You'll see the User-Input XML body. It has also saved the XML file at C:\temp in your WFA server.   Have fun. sinhaa  

    Providing a new version 1.1.0 of the command "WFA Schedular" Changes made: Added conditional String Representation based on the Scheduling parameter provided. Provided check for the right number of parameters passed into the command.Added a new parameter "Expiry Date" to automatically stop the recurring execution upon expiry.Check for Posh3.0 version in code.Have Fun!! sinhaa Below example for:Schedule a workflow for recurring execution every alternate day i.e. once in 2 days at 10:30 PM starting 06-Jul-2015 (Today's date is 02-Jul-2015) . The recurring workflow execution  should expire on 31-Dec-2015 and stop.  

  • Req. Sample code for the Updation of Master record in MDM using Java API..

    Hi All,
    Can anyone provide me the same code for Updation of master record in MDM using Java API ??

    Hi SakthiNarayananD,
    You can additionally go through the following links to work with MDM and Java API:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2d18d355-0601-0010-fdbb-d8b143420f49  (Java API)
    http://help.sap.com/javadocs/MDM/SP05/(Java api programs)
    https://help.sap.com/javadocs/MDM/current/index.html  (java api codes)
    http://help.sap.com/javadocs/MDM/SP06P2/index.html (Java Docs for SP06)
    Reg: Using JAVA API - Search
    Re: Retrieving Drop Down List Value using JAVA API - Lookup values
    How to retreive records from Lookuptable of type flat - Lookup Values
    Reg: MDM with webdynpro - READ,INSERT,MODIFY
    Hope It Helped
    Thanks & Regards
    Simona Pinto

Maybe you are looking for

  • How to include WS-Security Header in the WSDL

    hi how to include WS-Security Header which have username and password as i had seen the below link it deals with just hello world which is not using any Services(DBAdapter) is it possible to use DBAdapter as the steps present in the below link how to

  • Music files from flash drive to new itunes

    ive been slowly transfering music from my old PC to a music library on my MBP.  the weird thing is that on a fair number of folders, when they transfer, some songs seem to get left behind and not copied.  i'll have an album with 11 tracks, and move i

  • Balance in posting currency

    Hi experts! Do you know any report that can show the GL balance in posting currency? I know that from report RFBILA00 I can get a GL balance for different currency but all the information is converted according to the selected currency. The purpose i

  • Sleep indicator stopped working

    Hi, I noticed recently that the sleep indicator on my mb 13" 2.0 has stopped working. I was wondering if anyone had any ideas on how I might get it working again.

  • Column numbers in SQL Developer

    This may seem picky; but I find it frustrating to get error messages of the form error in line 35 column 83 and then not have a convenient way other than counting to find line 35 and column 83. Is there a way to jump to the error point? If not, is th