Runtime Process Initiation using GP API

Hi,
I am trying to implement sample application like time-off process.
i create websynpro callable objects, create request, display request, approve request, complete request.
my problem, how can i assign users to a role processor dynamically?
where should i write the code?
Regards
Naga

Hi Naga,
this might give you a good starting point:
<a href="http://help.sap.com/saphelp_nw70/helpdata/en/43/fcdf77fc6510b3e10000000a11466f/frameset.htm">Starting and Terminating Processes Using the GP API</a>
Have a look at step 7 of the procedure, where dynamic assignment of users is explained.
Regards,
Petja

Similar Messages

  • Getting completed process details using BPM API

    Hi Experts,
    is there any way to get the completed process details using BPM API or Analytics API for a specific process definition (in 7.31 SP10)?
    my observations:
    1. using getRunningProcessInstances(process_def_id) of ProcessInstanceManager, I can fetch running process instances.
    but I need completed process instances.
    Thanks in advance.
    Best Regards
    -Trim

    seems no way

  • Get current Action in a GP process in using GP API

    I want to get the current Action or all list of action in a GP process in a web dynpro callable object.
    Can anyone help me.

    Hi !
    there is a method on the super class of your pageflow named getCurrentActionName(). This method may only be called during an action invocation. Best way to remember this is probably implementing the before action storing the current action name somewhere, as in the sample code below.
    protected synchronized void beforeAction() throws Exception
    this.currentAction = super.getCurrentActionName();
    this action name is probably stored some other places to by the workshop framework, however I am not able to find it somewhere else than in the currentActionName() method.
    - Anders Mathisen

  • I have been able to open PDF docs using C# API Process.Start("Full_path_To_the_PDF_File") in windows 7 or windows 8 with all previous versions of Acrobat32 reader.

    I have been able to open PDF docs using C# API Process.Start("Full_path_To_the_PDF_File") in windows 7 or windows 8 with all previous versions of Acrobat32 reader.
    However, with v11.0, the same command, in Windows 8, it does not open the PDF document. I can see the Acrobat(32) started in the task manager, but the document does open. Not sure how I can troble shoot this problem. Any help would be appreciated.

    I haven't use the C# API but I imagine it is the same as C ShellExecute. Which in turn is the same thing (in essence) as double clicking in Windows Explorer.
    So... does Adobe Reader run normally on this machine?
    And does it start and open if you double click on a PDF file?

  • Start GP Process using GP APIs

    Hello,
    I am using GP APIs to start my process programatically in webdynpro.
    When I test it in Web Service navigator I get PortalRuntimeException.
    The exception occurs when execute
         IGPContextManager gpCtxManager = GPContextFactory.getContextManager();
    I have used the following code to start the GP Process:
    IGPProcessInstance procInstance;
    try {
         userFactory = UMFactory.getUserFactory();
         IUser user = userFactory.getUserByLogonID(user);
         IGPContextManager gpCtxManager = GPContextFactory.getContextManager();
         IGPUserContext userContext = gpCtxManager.createUserContext(user);
         IGPProcess process =
              GPProcessFactory.getDesigntimeManager().getActiveTemplate(
              processTemplateId, userContext);
         IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
         IGPProcessRoleInstanceList roles =
              rtm.createProcessRoleInstanceList();
         IGPStructure processParams =
              GPStructureFactory.getStructure(process.getInputParameters());
         processParams.setAttributeValue(
              requestIdParam,
              req_id);
         IGPRuntimeManager gpRuntimeManager =
              GPProcessFactory.getRuntimeManager();
         procInstance =
              gpRuntimeManager.startProcess(
                   process,
                   processName,
                   processDescr,
                   user,
                   roles,
                   processParams,
                   user
         } catch (Exception e) {
              return e.getMessage();
    Any help would be highly appreciated..
    Thanks and regards,
    Lyudmila

    Hi,
    Hope this code will help you,
         String ProcessID = "<Process ID>";
         IUser adminUser = null;
         IUser userRequesterUser = null;
         try {
           adminUser = UMFactory.getUserFactory().getUserByLogonID("<User Id of Process Admin>");
           userRequesterUser = UMFactory.getUserFactory().getUserByLogonID(RequesterUID);
              IGPUserContext userContext = GPContextFactory.getContextManager().createUserContext(adminUser);
              IGPProcess process = GPProcessFactory.getDesigntimeManager().getActiveTemplate(
                                            ProcessID, userContext);
              IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
              IGPProcessRoleInstanceList roles = rtm.createProcessRoleInstanceList();
              int rolenum = process.getRoleInfoCount();
              String strRoleName = "";
              // iterate over the required roles
              for (int i = 0; i < rolenum; i++) {
                   // create a new role instance by specifying the role's unique name
                   IGPProcessRoleInstance roleInstance = roles. createProcessRoleInstance(process.getRoleInfo(i).getRoleName());
                   strRoleName = process.getRoleInfo(i).getRoleName();
                   if(strRoleName.startsWith("role.")) {
                        roleInstance.addUser(adminUser);
                   Collection users = roleInstance.getUserAsCollection();
                   IUser usr = null;
                   Iterator ietr = users.iterator();
                   while(ietr.hasNext()) {
                        usr = (IUser)ietr.next();
                   roles.addProcessRoleInstance(roleInstance);
              //add values to the input parameters of the process
              IGPStructure params = GPStructureFactory.getStructure(process.getInputParameters());
              params.setAttributeValue("<Attribute Name>",<attribute value>);
                //initiate the process template by passing the process template
                IGPProcessInstance prInstance = rtm.startProcess(process,"<Process Name>",
                                "This process has been started using the GP public API", userRequesterUser,roles,params,userRequesterUser);
           } catch (GPInvocationException e12) {
    //            wdComponentAPI.getMessageManager().reportSuccess("Invok ERR " + e12.getMessage());
                // TODO Auto-generated catch block
                e12.printStackTrace();
           } catch (GPEngineException e2) {
                wdComponentAPI.getMessageManager().reportException("Invok ERR 2 - " + e2.getMessage(),true);
                // TODO Auto-generated catch block
                e2.printStackTrace();
           } catch (Exception e2) {
                wdComponentAPI.getMessageManager().reportException("Invok ERR 3 - " + e2.getMessage(),true);
                // TODO Auto-generated catch block
                e2.printStackTrace();
    Regards,
    Niraj

  • Start GP Process through Webdynpro using GP APIs

    Hello,
    I am using GP APIs to start my process programatically in webdynpro using the link :
    http://help.sap.com/SAPHELP_NW70EHP1/helpdata/EN/33/198141f906040de10000000a1550b0/frameset.htm
    The first screen is a Webdynpro For Java Callable Object which has a Submit button ...on the click of this button i have written the code to start the process.....the process is getting started alright which i checked in NWA -> Guided Procedures -> Process Instance...but then it does not move to the next screen.....but just stays there........the structure params i am sending as blank since my process does not expose any input parameters.(as specified in the Library)....
    Any help would be highly appreciated...
    Regards,
    Anil

    Hi,
    Try this code:
    //@@begin startProcess()
         wdContext.currentContextElement().setProcessID("/Process ID of GP process/");
         IUser adminUser = null;
         IUser userRequesterUser = null;
         try {
              IWDClientUser clientUser = null;
              try {
                   clientUser = WDClientUser.getCurrentUser();
              } catch (WDUMException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              IUser user = clientUser.getSAPUser();
              String loginUser = user.getUniqueName();
              adminUser = UMFactory.getUserFactory().getUserByLogonID(/*Owner of process */);
              userRequesterUser = UMFactory.getUserFactory().getUserByLogonID(loginUser);
         } catch (UMException e1) {
              wdComponentAPI.getMessageManager().reportException("UME ERR " + e1.getMessage(),true);
              // TODO Auto-generated catch block
              e1.printStackTrace();
         try {
              IGPUserContext userContext = GPContextFactory.getContextManager().createUserContext(adminUser);
              IGPProcess process = GPProcessFactory.getDesigntimeManager().getActiveTemplate(wdContext.currentContextElement().getProcessID(), userContext);
              IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
              IGPProcessRoleInstanceList roles = rtm.createProcessRoleInstanceList();
              int rolenum = process.getRoleInfoCount();
              String strRoleName = "";
              IGPStructure userStruct = null;
              // iterate over the required roles
              for (int i = 0; i < rolenum; i++) {
                   // create a new role instance by specifying the role's unique name
                   IGPProcessRoleInstance roleInstance = roles.createProcessRoleInstance(process.getRoleInfo(i).getRoleName());
                   strRoleName = process.getRoleInfo(i).getRoleName();
    //               wdComponentAPI.getMessageManager().reportSuccess("Roles - " + process.getRoleInfo(i).getRoleName());
                   // add a user to the role instance
                   if (strRoleName.startsWith("Requester")) {
                        roleInstance.addUser(userRequesterUser);
                   } else if (strRoleName.startsWith("role.")) {
                        roleInstance.addUser(adminUser);
                   Collection users = roleInstance.getUserAsCollection();
                   IUser usr = null;
                   Iterator ietr = users.iterator();
                   while (ietr.hasNext()) {
                        usr = (IUser) ietr.next();
                   roles.addProcessRoleInstance(roleInstance);
              //add values to the input parameters of the process
              IGPStructure params = GPStructureFactory.getStructure(process.getInputParameters());
              params.setAttributeValue("/*Parameter Group Name of Process /", /Value to be passed*/);
              IGPProcessInstance prInstance = rtm.startProcess(process, "/Name of Process/", "This process has been started using the GP public API", userRequesterUser, roles, params, userRequesterUser);
         catch (ConnectionException e) {
               //TODO Auto-generated catch block
              e.printStackTrace();
         } catch (CommandException e) {
               //TODO Auto-generated catch block
              e.printStackTrace();
         } catch (GPInvocationException e12) {
              wdComponentAPI.getMessageManager().reportException("Invok ERR " + e12.getMessage(),true);
               //TODO Auto-generated catch block
              e12.printStackTrace();
         } catch (GPEngineException e2) {
              wdComponentAPI.getMessageManager().reportException("Invok ERR 2 " + e2.getMessage(),true);
               //TODO Auto-generated catch block
              e2.printStackTrace();
    //@@end
    Regards,
    Niraj
    Edited by: Niraj Kumar on Dec 4, 2009 8:32 AM

  • MIME content conversion failed error while processing "550 5.6.0" NDR using EWS API

    While trying to process journal report having "550 5.6.0" NDR with the following content using EWS API
    *Delivery has failed to these recipients or groups:
    [email protected] ([email protected])
    The email system had a problem processing this message. It won't try to deliver this message again.
    [email protected] ([email protected])
    The email system had a problem processing this message. It won't try to deliver this message again.
    [email protected] ([email protected])
    The email system had a problem processing this message. It won't try to deliver this message again.
    Diagnostic information for administrators:
    Generating server: ALMPR02MB001.namprd05.prod.outlook.com
    [email protected]
    Remote Server returned '550 5.6.0 M2MCVT.StorageError; storage error in content conversion'
    [email protected]
    Remote Server returned '550 5.6.0 M2MCVT.StorageError; storage error in content conversion'
    [email protected]
    Remote Server returned '550 5.6.0 M2MCVT.StorageError; storage error in content conversion'
    Original message headers:
    Received: from ALMPR02MB001.namprd05.prod.outlook.com ((11.255.110.102)) by
    ALMPR02MB001.namprd05.prod.outlook.com ((11.255.110.102)) with
    ShadowRedundancy id 15.0.851.11; Fri, 24 Jan 2014 12:20:42 +0000
    Received: from AN2PR05MB011.namprd05.prod.outlook.com (10.255.202.146) by
    ALMPR02MB001.namprd05.prod.outlook.com (11.255.110.102) with Microsoft SMTP
    Server (TLS) id 15.0.851.11; Wed, 22 Jan 2014 19:25:20 +0000
    Received: from AN1PR05MB018.namprd05.prod.outlook.com ([159.254.10.28]) by
    AN1PR05MB018.namprd05.prod.outlook.com ([159.254.10.28]) with mapi id
    15.00.0851.011; Wed, 22 Jan 2014 19:25:19 +0000
    Content-Type: application/ms-tnef; name="winmail.dat"
    Content-Transfer-Encoding: binary
    From: "Aron,Shakton"
    To: "[email protected]" ,
    "[email protected]" , "[email protected]"
    Subject: Updated: Drive # 3
    Thread-Topic: Updated: Drive # 3
    Thread-Index: AQHPF6evINDh6QBmQ0OJyeaK0OyWzQ==
    Date: Wed, 22 Jan 2014 19:25:18 +0000
    Message-ID: <[email protected]ok.com>
    Accept-Language: en-US
    Content-Language: en-US
    X-MS-Has-Attach: yes
    X-MS-TNEF-Correlator: <[email protected]ok.com>
    MIME-Version: 1.0
    X-Originating-IP: [::]
    Return-Path: [email protected]
    X-Forefront-PRVS: 01018CB5B3
    X-Forefront-Antispam-Report:
    SFV:NSPM;SFS:(10019001)(6009001)(199002)(189002)(377454003)(2656002)(81816001)(81686001)(54316002)(49866001)(63696002)(65816001)(16799955002)(74876001)(47976001)(77982001)(81342001)(79102001)(94316002)(76576001)(56776001)(47736001)(50986001)(85852003)(54356001)(77096001)(74316001)(53806001)(69226001)(80976001)(4396001)(51856001)(83322001)(93136001)(85306002)(46102001)(19580395003)(74662001)(15975445006)(74706001)(15202345003)(76786001)(59766001)(83072002)(81542001)(76176001)(76796001)(87936001)(87266001)(92566001)(2201001)(47446002)(93516002)(33646001)(90146001)(31966008)(56816005)(74366001)(86362001)(24736002)(3826001);DIR:OUT;SFP:1102;SCL:1;SRVR:ALMPR02MB001;H:AN2PR05MB011.namprd05.prod.outlook.com;CLIP:::;FPR:;RD:InfoNoRecords;A:0;MX:1;LANG:en;*
    I am getting the following error.
    ERROR Message: MIME content conversion failed.
    Stack Trace : at Microsoft.Exchange.WebServices.Data.ServiceResponse.InternalThrowIfNecessary()
    at Microsoft.Exchange.WebServices.Data.ExchangeService.InternalGetAttachments(IEnumerable`1 attachments, Nullable`1 bodyType, IEnumerable`1 additionalProperties, ServiceErrorHandling errorHandling)
    at Microsoft.Exchange.WebServices.Data.ExchangeService.GetAttachment(Attachment attachment, Nullable`1 bodyType, IEnumerable`1 additionalProperties)
    Has anyone faced this issue? how s/he got past this?
    Regards
    Call
    Send SMS
    Add to Skype
    You'll need Skype CreditFree via Skype

    Mokchhya-
    I responded to your
    StackOverflow post as well, but I'll respond here as well.
    Are you using Exchange Server 2010 SP3 RU2? If not, that might fix the issue. Another poster ran into a similar error and they were also sending an email with an attachment:
    http://social.technet.microsoft.com/Forums/en-US/fd7ef80e-f80b-47ed-883b-a34511c6233c/a-storage-transient-failure-has-occurred-during-content-conversion?forum=exchangesvrsecuremessaginglegacy.
    The support page related to the fix is here:
    http://support.microsoft.com/kb/2863310.
    -Mimi

  • Problem Sending mails in a loop using JavaMail API

    Hello All,
    I am sending emails in a loop(one after the other) using JavaMail API,but the problem is, if the first two,three email addresses in the loop are Valid it sends the Email Properly, but if the Fourth or so is Invalid Address it throws an Exception....
    "javax.mail.SendFailedException: Sending failed;"
    nested exception is:
    javax.mail.SendFailedException: Invalid Addresses;
    nested exception is:
    javax.mail.SendFailedException: 450 <[email protected]>:Recipient address rejected: Domain not found......
    So if i want to send hundereds of emails and if one of the Emails inbetween is Invalid the process Stops at that point and i could not send the other emails in the Loop......
    How Could i Trap the exception thrown and handle it in such a way, so that the loops continues ..
    Is there something with the SMTP Server....?
    The code which i am using is as follows....
    <Code>...
    try {
    InitialContext ic = new InitialContext();
    Session session = (Session) ic.lookup(JNDINames.MAIL_SESSION);
    if (Debug.debuggingOn)
    session.setDebug(true);
    // construct the message
    MimeMessage msg = new MimeMessage(session);
    msg.setFrom(new InternetAddress(eMess.getEmailSender()));
    String to = "";
    msg.setRecipients(Message.RecipientType.TO,
    InternetAddress.parse(to, false));
    msg.setRecipients(Message.RecipientType.BCC,
    InternetAddress.parse(eMess.getEmailReceiver(), false));
    msg.setSubject(eMess.getSubject());
    msg.setContent(eMess.getHtmlContents(),"text/plain");
    msg.saveChanges();                
    Transport.send(msg);
    } catch (Exception e) {
    Debug.print("createAndSendMail exception : " + e);
    throw new MailerAppException("Failure while sending mail");
    </Code>....
    Please give me any suggestions regarding it....and guide me accordingly..
    Thanks a million in advance...
    Regards
    Sam

    How about something like the code attached here. Be aware it is lifted and edited out of an app we have here so it may require changing to get it to work. If it don't work - don't come asking for help as this is only a rough example of one way of doing it. RTFM - that's how we worked it out!
    SH
    try {
    Transport.send(msg);
    // If we get to here then the mail went OK so update all the records in the email as sent
    System.out.println("Email sent OK");
    catch (MessagingException mex) {
    System.out.println("Message error");
    Exception ex = mex;
    do {
    if (ex instanceof SendFailedException) {
    if (ex.getMessage().startsWith("Sending failed")) {
    // Ignore this message as we want to know the real reason for failure
    // If we get an Invalid Address error or a Message partially delivered message process the message
    if (ex.getMessage().startsWith("Message partially delivered")
    || ex.getMessage().startsWith("Invalid Addresses")) {
    // This message is of interest as we need to process the actual individual addresses
    System.out.println(ex.getMessage().substring(0, ex.getMessage().indexOf(";")));
    // Now get the addresses from the SendFailedException
    SendFailedException sfex = (SendFailedException) ex;
    Address[] invalid = sfex.getInvalidAddresses();
    if (invalid != null) {
    System.out.println("Invalid Addresse(s) found -");
    if (invalid.length > 0) {
    for (int x = 0; x < invalid.length; x++) {
    System.out.println(invalid[x].toString().trim());
    Address[] validUnsent = sfex.getValidUnsentAddresses();
    if (validUnsent != null) {
    System.out.println("Valid Unsent Addresses found -");
    if (validUnsent.length > 0) {
    for (int x = 0; x < validUnsent.length; x++) {
    System.out.println(validUnsent[x].toString().trim());
    Address[] validSent = sfex.getValidSentAddresses();
    if (validSent != null) {
    System.out.println("Valid Sent Addresses found -");
    if (validSent.length > 0) {
    for (int x = 0; x < validSent.length; x++) {
    System.out.println(validSent[x].toString().trim());
    if (ex instanceof MessagingException)
    ex = ((MessagingException) ex).getNextException();
    else {
    // This is a general catch all and we should assume that no messages went and should stop
    System.out.println(ex.toString());
    throw ex;
    } while (ex != null);

  • How do I troubleshoot installation/distribution of a LabVIEW .exe which processes data using Matlab when it works on some computers but not others?

    I've been given the unenviable task of troubleshooting and installing/distributing software written by a former co-worker. I've modified the LabVIEW code and built an .exe file. I've successfully installed the Labview .exe file on several computers, but it won't work on some others. What's more baffling is that I installed it successfully on one computer, uninstalled it, and tried reinstalling it with no success. In fact, it's a new error (Dr. Watson for Windows NT application error). It doesn't help that I have different versions of LabVIEW and Matlab on the target computers. Some have LabVIEW 5.1, some
    have 5.0, and some don't have it at all. Some have Matlab 5.2, some have 5.3 (R11) and some have 6.0 (R12). It's also not clear to me where the Matlab m files should be located. I'm not sure if it's a LabVIEW Runtime Engine problem, or if it's a Matlab problem. I've also wondered how LabVIEW and Matlab talk to each other. When LabVIEW calls Matlab, it seems that Matlab is running in the background. In other words, clicking on the Matlab Command Window and typing "whos" or any other command/variable doesn't work.

    Jay del Rosario wrote:
    >
    > How do I troubleshoot installation/distribution of a LabVIEW .exe
    > which processes data using Matlab when it works on some computers but
    > not others?
    Poke around zone.ni.com and
    http://digital.natinst.com/public.nsf/$$Search/ .
    Good luck, Mark

  • Need help in developing a webdynpro application using UWL API

    Hi developers,
    Iam developing a new WebDynpro application for UWL using UWL API.the functionality is to dispaly the summary of UWL like number of unread items, total items.
    Iam getting the problem while deploying the application, iam getting warning while deployed the application.
    I have given all possible ways mentioned in the below forum link
    Re: Accessing PortalRuntime at runtime?
    The exact problem is coming at reference file.
    Please giude me how to move forward.
    1. Below is the error when given "tckmcbc.uwl~api" in the service entry
    deployed with warning :
    Finished with warnings: development
    Caught exception during application startup from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Error occurred while starting application local/UWLCountDemo and wait. Reason: Clusterwide exception: server ID 21763550:com.sap.engine.services.deploy.container.DeploymentException: Clusterwide exception: Failed to prepare application local/UWLCountDemo for startup. Reason=Clusterwide exception: Failed to start dependent service ''tckmcbc.uwl~api'' of application ''local/UWLCountDemo''. Status of dependent component: STATUS_MISSING. Hint: Is the component deployed correctly on the engine?
    2.Below is the error  when i gave PORTAL:sap.com/tckmcbc.uwl~api in the sharing refernce entry
    Finished with warnings: development
    Caught exception during application startup from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Error occurred while starting application local/UWLCountDemo and wait. Reason: Clusterwide exception: server ID 21763550:com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Application local/UWLCountDemo cannot be started. Reason: it has hard reference to resource tckmcbc.uwl~api with type application, which is not active on the server.
    Thanks in Advance
    Sekhar.
    Edited by: sekhar c on Mar 21, 2009 11:24 AM

    Please see Kenichi Unnai in his blog "How to use UWL API for NetWeaver BPM Tasks"
    How to use UWL API for NetWeaver BPM Tasks
    The .sca-file can be found on the sap service marketplace, afterwards you need to import the .sca-file, add the SC to your "MyComponents" and then you can select your necessary DC's.

  • Custom report  using KM API Error

    Hi All,
    I have to create a report using KM API. i got the custom report using KM API from sdn and I imported into my NWDS. While i compile it, it is giving me this error.
    "The project cannot be build because the classpath for com.sap.netweaver.bc.rf.common.exception.ResourceException is not found."
    I have imported all the required jar files.
    How can i rectify this error?  Could anyone help me out in this issue?
    Regards,
    Divya

    Hi Divya,
    > I have imported all the required jar files
    First, I don't know what you mean with "imported" - in any case, you should <i>not</i> put the JARs into your project but just reference these.
    Also, obviously you have <i>not</i> referenced <i>all the required jar files</i>; ResourceException is part of bc.rf.common_api.jar, which is part of portal application com.sap.netweaver.bc.rf, at least for NW2004s.
    Please use the ClassLocator tool (search the WebLogs for this term to get some initial instruction) to avoid such questions in the future. It will make your life much easier.
    Hope it helps
    Detlev

  • How to find bpel instance in 11g based on the index values using Java APIs

    Hi ,
    In SOA10G we had option to find the instances based on the index value using Java APIs like below.
    WhereCondition criteria= new WhereCondition(SQLDefs.CX_index_1 + " = ?");
    criteria.setString(1, "indexValue");
    Locator mLoc = getLocator();
    IInstanceHandle[] foundInstances = mLoc.listInstancesByIndex(criteria);
    Please tell me how to achieve the same functionality in SOA 11G using Java APIs
    Regards,
    Saba

    I have multiple bpel in my composite. I checked in ci_indexes table and it shows the instance number of the bpel process. But the em console is showing only the composite instance number. when I opened composite instance, I could see all the bpel process with instance number in the audit trail. How can I find the the actual composite instance number that I should search for in the em console ???

  • How to Ship Partial Quantities using an API - Oracle Order Management

    Hi,
    In Order Management I need to ship the Internal Sales Order Lines partially using an API.
    I have done full shipping but if I trying the partially shipping it is also shipping fully.
    I am unable to find the problem. Is there any set up missed?
    How to do partial shipping.
    I am giving the some part of the code please look into it and suggest me.
    ----**************************UPDATEING SHIPIN ATTR ***************************-------------
    I_changed_attributes (X_count).delivery_detail_id := cos.delivery_detail_id;
    I_changed_attributes (X_count).shipped_quantity := cos.shipped_quantity;
    X_ship_date := cos.act_shipped_date;
    X_slaes_order := cos.sales_order;
    X_org_id := cos.org_id;
    wsh_delivery_details_pub.update_shipping_attributes ( p_api_version_number => 1.0
    ,p_init_msg_list => I_init_msg_list
    ,p_commit => I_commit
    ,x_return_status => O_return_status
    ,x_msg_count => O_msg_count
    ,x_msg_data => O_msg_data
    ,p_changed_attributes => I_changed_attributes
    ,p_source_code => I_source_code
    ----***************************SHIP CONFIRM API ***************************-------------
    I_action_code := 'CONFIRM';
    I_sc_action_flag := 'B'; --'S'; -- Ship entered quantity. 'B' - Ship Entered Quantities, Backorder Unspecified
    --'T' - Ship Entered Quantities, Stage Unspecified'A' - Ship All'C' - Completely Backordered
    I_sc_intransit_flag := 'Y';
    --In transit flag is set to 'Y' closes the pickup stop and sets the delivery in transit.
    I_sc_close_trip_flag := 'Y'; -- Close the trip after ship confirm
    I_sc_trip_ship_method := X_ship_method_code; -- The ship method code
    I_sc_defer_interface_flag := 'Y';
    I_sc_stage_del_flag := 'Y';
    I_sc_create_bol_flag := 'N';
    I_wv_override_flag := 'N';
    -- API Call for Ship Confirmation
    fnd_file.put_line(fnd_file.log,'Calling WSH_DELIVERIES_PUB to Perform Ship Confirmation');
    fnd_file.put_line(fnd_file.log,'=============================================');
    wsh_deliveries_pub.delivery_action ( p_api_version_number => 1.0
    , p_init_msg_list => I_init_msg_list
    , x_return_status => O_return_status
    , x_msg_count => O_msg_count
    , x_msg_data => O_msg_data
    , p_action_code => I_action_code
    -- , p_delivery_id => cos.delivery_id
    , p_delivery_name => G_delivery_name
    , p_sc_action_flag => I_sc_action_flag
    , p_sc_intransit_flag => I_sc_intransit_flag
    , p_sc_close_trip_flag => I_sc_close_trip_flag
    , p_sc_create_bol_flag => I_sc_create_bol_flag
    , p_sc_stage_del_flag => I_sc_stage_del_flag
    , p_sc_trip_ship_method => I_sc_trip_ship_method
    , p_sc_actual_dep_date => X_ship_date --P_act_shipped_dt
    , p_sc_defer_interface_flag => I_sc_defer_interface_flag
    , p_wv_override_flag => I_wv_override_flag
    , x_trip_id => O_trip_id
    , x_trip_name => O_trip_name
    ----***********************************************************************--------------------

    Hi Shesh,
    Thanks you for your replay.
    I am tried Shipping transaction screen but here the ware house is WMS enabled I tried Oracle Mobile Terminal application to do this, but it is not accepting the partial shipping. May be some set up required or the process will be differ.
    I will try your suggested API's .
    Regards,
    Prasanna
    Edited by: 843676 on Apr 23, 2012 10:31 PM
    I am not able to do the Partial Shipment or Backorder as mentioned above API's, but it is split the lines and all the lines are in same state (Awaiting Shipping)
    Edited by: 843676 on Apr 24, 2012 2:45 AM

  • Help needed in using JMX APIs

    Hi
    My requirement is to retrieve the JNDI Names of the JMSConnectionFactory and the JMSQueue using the Connection factory or Queue name. In short im trying out a feasibility of reading the JNDI values for queues from weblogic config.xml instead of reading them from a properties file.
    I developed a sample code using JMX APIs that will fetch the JNDI names of all the JMS destinations available for a particluar JMSServer.
    But is there any way to retrieve the JNDI names based on the queue names .. in general i will give queue name as input and i want the queue's JNDI name as output.
    My sample code is :
    import java.util.Iterator;
    import java.util.Set;
    import javax.management.ObjectName;
    import javax.management.QueryExp;
    import javax.management.Attribute;
    import javax.naming.Context;
    import weblogic.jndi.Environment;
    import weblogic.management.MBeanHome;
    import weblogic.management.RemoteMBeanServer;
    import weblogic.management.WebLogicObjectName;
    import weblogic.management.configuration.JMSQueueMBean;
    import weblogic.management.configuration.JMSServerMBean;
    import weblogic.management.configuration.JMSConnectionFactoryMBean;
    import weblogic.management.configuration.JMSDestinationMBean;
    import weblogic.management.runtime.JMSServerRuntimeMBean;
    import weblogic.management.configuration.JMSDestinationMBean;
    public class JMSAddQueue {// The name of the WebLogic domain, please change this to match the //// name of your installation specific domain name                  
    private static String weblogicDomain = "conciergetestdomain";// The name of the WebLogic server, please change this to match the //// name of your installation specific server name
    public static void main(String[] args) {
         try
              Environment env = new Environment(); 
              env.setProviderUrl("t3://localhost:7001");  
              env.setSecurityPrincipal("system");  
              env.setSecurityCredentials("weblogic");  
              Context ctx = env.getInitialContext();  
              MBeanHome home = (MBeanHome) ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);  
              ctx.close();  
      JMSServerMBean cf = (JMSServerMBean)home.findOrCreateAdminMBean("TESTSERVER","JMSServer", weblogicDomain);
    JMSDestinationMBean[] jdb = cf.getDestinations();
    System.out.println("** The JNDI name is : "+jdb[0].getJNDIName());
    catch (Exception e) {
    e.printStackTrace();
    }Is there any way to retrieve the JNDI names using the queue names ?
    Thanks
    Arun B

    I will send up an alert for you, Colin. Even though I use iTunes for Mac, troubleshooting it isn't my forté.

  • Add attachments using workflow api throwing error

    Hi,
    I am getting the following error when i am trying to add attachments using worklist API.
         Missing class: invokeBPEL.MetaData
         Dependent class: com.evermind.io.ClassLoaderObjectInputStream
         Loader: oc4j:10.1.3
         Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar
         Configuration: <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar
    This load was initiated at hw_services.root:0.0.0 using the Class.forName() method.
    The missing class is not available from any code-source or loader in the system.
         at oracle.classloader.PolicyClassLoader.handleClassNotFound (PolicyClassLoader.java:2068) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@10469011]
         at oracle.classloader.PolicyClassLoader.internalLoadClass (PolicyClassLoader.java:1679) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@10469011]
         at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1635) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@10469011]
         at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1620) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@10469011]
         at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:319) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.lang.Class.forName0 (Native method) [unknown, by unknown]
         at java.lang.Class.forName (Class.java:242) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at com.evermind.io.ClassLoaderObjectInputStream.resolveClass (ClassLoaderObjectInputStream.java:33) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at java.io.ObjectInputStream.readNonProxyDesc (ObjectInputStream.java:1538) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.io.ObjectInputStream.readClassDesc (ObjectInputStream.java:1460) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.io.ObjectInputStream.readOrdinaryObject (ObjectInputStream.java:1693) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.io.ObjectInputStream.readObject0 (ObjectInputStream.java:1299) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.io.ObjectInputStream.readObject (ObjectInputStream.java:339) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at com.evermind.server.rmi.RMIProtocol$Version.unmarshallParameterDirectly (RMIProtocol.java:402) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIProtocol$Version_1_0.unmarshallParameter (RMIProtocol.java:471) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIProtocol.readObject (RMIProtocol.java:80) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIProtocol.readValue (RMIProtocol.java:161) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.ServerRmiMessageHandler.handleMethodInvocation (ServerRmiMessageHandler.java:514) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.ServerRmiMessageHandler.handleOrmiRequest (ServerRmiMessageHandler.java:272) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.ServerRmiMessageHandler.dispatchRequest (ServerRmiMessageHandler.java:241) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIServerConnection.processReceivedCommand (RMIServerConnection.java:176) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIConnection.handleCommand (RMIConnection.java:152) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands (RMIConnection.java:127) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIServerConnection.listenForOrmiCommands (RMIServerConnection.java:390) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIConnection.run (RMIConnection.java:107) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run (ReleasableResourcePooledExecutor.java:303) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at java.lang.Thread.run (Thread.java:595) [jre bootstrap, by jre.bootstrap:1.5.0_06]
    Exception in thread "main"
    This is the code i used
         String userId = "oc4jadmin";
         String password = "welcome1";
         String sTaskId = "";
         IWorkflowServiceClient wfSvcClient = WorkflowServiceClientFactory.getWorkflowServiceClient(WorkflowServiceClientFactory.REMOTE_CLIENT);
         System.out.println("Before getting TaskService");
         ITaskQueryService querySvc = wfSvcClient.getTaskQueryService();
         System.out.println("After getting TaskService");
         IWorkflowContext wfCtx = querySvc.authenticate(userId,password,"jazn.com",null);
         System.out.println("Last out");
         Predicate pred = new Predicate(TableConstants.WFTASK_STATE_COLUMN,Predicate.OP_EQ,IWorkflowConstants.TASK_STATE_ASSIGNED);
         List queryColumns = new ArrayList();
         queryColumns.add("TITLE");
         queryColumns.add("PRIORITY");
         queryColumns.add("STATE");
         queryColumns.add("TASKID");
         queryColumns.add("TASKNUMBER");
         List tasks = querySvc.queryTasks(wfCtx,
                   queryColumns,
                   null, //Do not query addtional info
                   ITaskQueryService.ASSIGNMENT_FILTER_MY_AND_GROUP,
                   null, //No keywords
                   pred, //No custom predicate
                   null, //No special ordering
                   0, //Do not page the query result
                   0);
         System.out.println("Task Size !!" +tasks.size());
         if (tasks != null)
         String[] taskList = new String[tasks.size()];
         for (int i=0; i< tasks.size(); i++)
         Task t = (Task)tasks.get(i);
         taskList[i] = t.getSystemAttributes().getTaskId();
         System.out.println("Found task: "+taskList);
         sTaskId = taskList[i];
         else
         System.out.println("Did not find any tasks");
         Task task = querySvc.getTaskDetailsById(wfCtx, sTaskId);
         //Add Attachments
         FileInputStream fs = new FileInputStream("D:/Test.txt");
         ITaskService itask = wfSvcClient.getTaskService();
         MetaData mdata = new MetaData();
         mdata.setMimeType("text/html");
         mdata.setContent("D:/Test.txt");
         mdata.setInputStream(fs);
         mdata.setName("Test Document");
         itask.addAttachment(wfCtx, sTaskId, mdata);
         if (task != null)
         System.out.println("Completing task: "+task.getTitle());
         wfSvcClient.getTaskService().updateTaskOutcome(wfCtx, task, "APPROVE");
    Kindly let me know how to solve this issue.
    Thanks,
    Gomathi

    hi,
    Actually i have used AttachmentType..MetaData is the class which i created for implementing AttachmentType as it is Interface Class. Here is the code of MetaData class.
    public class MetaData implements AttachmentType,java.io.Serializable{
         public String getBoundary() {
              // TODO Auto-generated method stub
              return null;
         public String getContent() {
              // TODO Auto-generated method stub
              return null;
         public InputStream getInputStream() {
              // TODO Auto-generated method stub
              return null;
         public String getMimeType() {
              // TODO Auto-generated method stub
              return null;
         public String getName() {
              // TODO Auto-generated method stub
              return null;
         public String getSystemVersionFlag() {
              // TODO Auto-generated method stub
              return null;
         public String getTaskId() {
              // TODO Auto-generated method stub
              return null;
         public String getURI() {
              // TODO Auto-generated method stub
              return null;
         public String getUpdatedBy() {
              // TODO Auto-generated method stub
              return null;
         public int getVersion() {
              // TODO Auto-generated method stub
              return 0;
         public void setBoundary(String arg0) {
              // TODO Auto-generated method stub
         public void setContent(String arg0) {
              String cont = null;
              cont = arg0;
         public void setInputStream(InputStream arg0) {
              InputStream sStream = null;
              sStream = arg0;
         public void setMimeType(String arg0) {
              String mime = null;
              mime = arg0;
         public void setName(String arg0) {
              String sname = null;
              sname = arg0;
         public void setSystemVersionFlag(String arg0) {
              // TODO Auto-generated method stub
         public void setTaskId(String arg0) {
              // TODO Auto-generated method stub
         public void setURI(String arg0) {
              // TODO Auto-generated method stub
         public void setUpdatedBy(String arg0) {
              // TODO Auto-generated method stub
         public void setVersion(int arg0) {
              // TODO Auto-generated method stub
    kindly tell me how can i solve this issue.
    Thanks,
    Gomathi
    Edited by: user647559 on Sep 23, 2008 10:05 PM

Maybe you are looking for