Handling queue through UDF

I have input as
A1
A2
A2
A3
context change
A1
A1
context change
A1
A5
I have to pick unique values from all context keeping them in same format...
Output Required
A1
A2
A3
context change
A1
context change
A1
A5
How it can be achieved through message mapping, is UDF required for this?
Thanks.
Shivanjali

What I understood from your problem is that you want to maintain the context and want to use the unique values from each context (keeping the context as it is) so for this use below UDF and let me know it works for you..
While creating UDF Select Cache : Context and give the input variable name as var1
String[] v_current = new String [var1.length];
v_current[0] = "";
for(int i = 0; i<var1.length ; i++)
      if( var1.length == 1 )
          result.addValue( var1<i> );
                      else  if( var1<i>.compareTo(v_current[0]) != 0)
          result.addValue( var1<i> );
           v_current[0] = var1<i>;

Similar Messages

  • Creating Execute Queue through WLConfig ANT tasks

    We are planning to create a new Execute Queue for a existing server in weblogic 8.1. When we create a new execute queue through the web admin console it add the following line within the Server tag in config.xml.
    <?xml version="1.0" encoding="UTF-8"?>
    <Domain Name="weblogicdomain">
    <Server ListenAddress="" ListenPort="6110" Name="servername">
    <ExecuteQueue Name="FileDownloadsExecuteQueue" ThreadCount="1"/>
    </Server>
    ....Other resources....
    </Domain>
    Now we have to create this execute queue NOT through the web admin console but through wlconfig ANT tasks. How should we create this? There are samples ANT tasks to add a resource (JDBC connection pool etc) directly within the Domain tag of the config.xml but our requirement is to add a new element (ExecuteQueue) within the existing server tag. As the server is already created we cannot create server mbean and nest it with one more create of execute queue. We have to attach the new execute queue to the current existing server.
    Can we set a new element (not a attribute) to the server by quering or any other method?
    Thanks.

    I haven't tried this with wlconfig, but I was able to accomplish it by invoking weblogic.Admin from the <java> task:
    <!-- Create the ExecuteQueue -->
    <java classname="weblogic.Admin" fork="true">
    <arg line="-url ${deploy.server.name}:${deploy.server.port}"/>
    <arg line="-username ${deploy.username}"/>
    <arg line="-password ${deploy.password}"/>
    <arg value="CREATE"/>
    <arg line="-mbean portal:Type=ExecuteQueue,Name=newRenderQueue,Server=${deploy.target}"/>
    <classpath>
    <pathelement location="${weblogic.home.dir}/server/lib/weblogic.jar"/>
    </classpath>
    </java>
    <!-- Set the ThreadCount -->
    <java classname="weblogic.Admin" fork="true">
    <arg line="-url ${deploy.server.name}:${deploy.server.port}"/>
    <arg line="-username ${deploy.username}"/>
    <arg line="-password ${deploy.password}"/>
    <arg value="SET"/>
    <arg line="-mbean portal:Type=ExecuteQueue,Name=newRenderQueue,Server=${deploy.target}"/>
    <arg line="-property ThreadCount 5"/>
    <classpath>
    <pathelement location="${weblogic.home.dir}/server/lib/weblogic.jar"/>
    </classpath>
    </java>
    Hope that helps,
    George

  • Alsb trying to reach weblogic jms queues through VIP

    Hi,
    I have jms queues created in wLS. ALSB business service which puts the message into the queue .
    ALSB and WLS are in 2 different boxes. When the end pointas follows jms://hostname:portnumber/connection factory/JNDI name is given the service is able to reach the Q.
    The problem arises when VIP is used to connect to any of the queues in the box. the jms protocol is getting converted to "t3" protocol which is not understood by VIP and hence resulting in connection timed out exception .
    Can anybody please help me to access jms queues through VIP from ALSB service .
    Thanks in Advance ,
    LKV

    the jms protocol is getting converted to "t3" protocol which is not understood by VIP and hence resulting in connection timed out exception . Virtual IP as such doesnt influence anything...what it matters is what is listening at the Virtual IP, If you have configured weblogic server listen thread at this port then it should be able to understand t3.. Weblogic server's listen thread can interpret all supported protocol's ( http, t3, iiop, ldap etc) on its listen port...
    So check at your wls side whether the server is listening at virtual ip and port. If you have firewall between alsb and wls then it could be an issue as firewalls can block certain protocols on an opened port..

  • Context Vs Queue in UDF

    Can you give an idea about Context Vs Queue in UDF????

    Hi ! Gabriel
    this indicated which values from your XML will be inserted into your funciton
    either one - value
    from one context only - context
    or all - queue
    <b>check this page to understand</b>
    <b>Working with Contexts or Queues</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/f8/2857cbc374da48993c8eb7d3c8c87a/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/f8/2857cbc374da48993c8eb7d3c8c87a/content.htm
    <b>look into this link that explains about the same.</b>
    value ---> is a value for the input parameter. It may be a single value or multiple values.
    Queue-----> it is an entire instance of XML message. That means, if you have duplicates of a node, all those contexts will be includedin Queue, which is passed to UDF.
    Context -
    > refers to a particular context of the XML message.
    Please refer to the following document which comprehensively explain differences b/w the various options with examples
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/58cd3b11571962e10000000a11402f/frameset.htm
    <b>There r 2 types of UDF - Simple and Advanced</b>- Simple UDFs uses Value, wherein we can manipulate only one value (input is one String). Therefore a single string is expected as input and the output would also b a single string.
    - Advanced UDFs uses Context or Queue, where you manipulate many values (input is an array of Strings).
    This will help u
    http://help.sap.com/saphelp_nw2004s/helpdata/en/40/7b8e40496f6f1de10000000a1550b0/content.htm
    Thanks!!
    Regards
    Abhishek

  • Recieve/Read  Messages  from JMS Queue through ALSB

    Hi,
    I have configured JMS Queue in weblogic server.
    I have created Messaging Service in ALSB which sends messages in MESSAGE QUEUE.
    Now Is it possinle to receive messages from JMS Queue by creating business service in Aqualogic Service bus???

    Hi dear,
    <br>
    I am sending Message through Serializable Object.
    <br>
    I have JMS Proxy which gets invoked when i send message to JMs Queue. JMS Proxy then calls business service.
    <br>
    <br>
    Business Service has two functions. One is taking String as input and one is taking Serializable Object as Input.
    <br>
    <br>
    public void recieveString(String str)<br>
    public void recieveObject(Trade obj)<br>
    --------------------------------------------------<br>
    Now I have configured Proxy Services' Request and Response
    Message Type as a "TEXT". and I am sending ObjectMessage here so what kind of change I require.
    <BR>
    I also want to configure my proxy so that if JMS queue recieves TextMessage then it should invoke reciveString() function and if Object Message then vice versa.....
    <BR><BR>
    But i am not able to handle object even...
    When I am sending Object Message it takes as a TextMessage.
    I am getting following exception when I am sending Object Message to JMS QUEUE. Request and Response Message types are XML Schema of that object.
    <BR>
    <BR>
    <Nov 30, 2006 4:57:19 PM IST> <Warning> <EJB> <BEA-010065>
    <BR>
    <MessageDrivenBean threw an Exception in onMessage(). The exception was: java.lang.AssertionError.<BR>
    java.lang.AssertionError at com.bea.wli.sb.transports.jms.JmsInboundMDB.onMessage(JmsInboundMDB.j
    ava:112)
    at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:42
    9)
    at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDL
    istener.java:335)
    at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:
    291)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4060)
    Truncated. see log file for complete stacktrace
    >
    Message was edited by:
    alwaysvaghu

  • Handling tab through pi 7.0

    Hello Everyone,
    I have a file to proxy scenario. The file is a hash(#) seperated .txt file. sometimes in the file, tab is coming in place of space. For example, if the value is ABC XYZ, between ABC and XYZ tab is coming in place of space. As a result, in the ECC table through proxy it is getting populated as # i.e ABC#XYZ.
    Through sap pi 7.0, i have to handle this problem. How to detect tab and replace it with space through pi 7.0 so that the value will be populated as ABC XYZ, not as ABC#XYZ.
    Please help ASAP.
    Regards,
    Ashmita

    Ashmita
    plz use Content conversion parameters:
    Tab:0X09
    Name------------------------------------------------Value
    RecordsetStructure.fieldSeparator----------'0X09'
    chk the below link(Converting File Content in a Sender Adapter)
    https://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    ...Mutti

  • How to handle Queue blockage due to application error in BPM

    Hi
    In the integration process that i have created, there is a SyncSend(calling a webservice using SOAP adapter) Step.
    Sometimes the response message from the receiver application may be a Fault message.
    Whenever a fault message is sent back to integration process in XI, the message fails and the queue is blocked.
    Bacause of this queue blockage , the next messages to be processed are getting blocked.
    How to handle this?
    Thanks
    Ram

    do you have configured the fault message mapping in the Operation Mapping? what error does the sxi_monitor display?

  • PI - monitoring queues through Mobile apps

    Dear Team,
    Currently we are on PI 7.3 version and client has come up with the expectation of exploring the possibility of PI queue monitoring through Mobile apps.
    We are going to upgrade our system to 7.4 in couple of month so any solution for ver 7.3 or 7.4 would work for us.
    I have searched sdn links but don't find convincing solution. Any suggestions/Inputs ?
    Regards,
    Deepti

    Hi Deepti,
    Have a look at cbs PI MeMo App for MobiIe Message Monitoring
    I tried that in the past and it looks great. Only limitation if I'm not mistaken: no installation on iPhone possible. Perhaps now it is possible. That one you need to check.
    Kind regards,
    Dimitri

  • Place a command in the command queue through code

    our bussiness needs require that the oracle lite server may send a command to the olite client. such a command may be an upgrade or install or exec file.
    we have a problem placing commands in the command queue of the device so that the device may later pick them up and execute them.
    if the client is not connected to the server through the specified protocol (rapi, http etc) then the command is not placed in the queue but it is marked as failed. this happens when we send commands through our code, but if we attempt to do it through the mobile manager then when the client is not connected the command is placed in the queue and when the handheld connects, it pulls the command.
    my question is how should we alter the code below so that the command (install in this example) is placed in the queue when a fail to connect happens.
    code in java:
    private void jButton12MouseClicked(java.awt.event.MouseEvent evt) {                                      
    ResourceManager rm = null;
    String url="...";
    String user="myuser";
    Command Installcmd = null;
    try {
    ResourceManager.initialize(url);
    rm = ResourceManager.getInstance();
    User usr = rm.getUser(user);
    this.Installcmd = dm.getCommand ("Install");
    for (Enumeration e = usr.getDevices(); e.hasMoreElements();) {
    Device dev = (Device)e.nextElement();
    list4.add("Device");list4.add("------------");
    list4.add("Device Name:"+dev.getName());
    list4.add("Device Type:"+dev.getType());
    list4.add("User Id:"+dev.getUserId());
    if (dev.isEnabled()) {
    DeviceCommand dc = new DeviceCommand (cmd, dev);
    dc.send (DeviceCommand.HIGH_PRIORITY,null );
    rm.commit();
    } catch (Throwable e) {
    e.printStackTrace();
    JOptionPane.showMessageDialog(null, e.getMessage(),"Error",0);} finally {
    try {if (rm != null) ResourceManager.destroy();
    our problem lies on how we place the command in the command queue of the particular device. thank you for your time and efforts

    dc.queue();
    so simple:)

  • Hyperlink query through UDF

    Hi experts,
    I d like to know if it's posiible to hyperlink a Sap B1 query through a UDF ? an if it's possible, how ?
    I have already set up the UDF but I dont know which adress I have to put in, in order to make open my query.
    Thanks in adavance for your anwer.
    Cordialement
    Sébastien TABORE

    Hi Sebastian
    If you're wanting to create a file from this query, then you could use the EFM format definition Add-on. This uses a 3 step wizard to create the file in a specified location.
    Regards
    Svend

  • Unable to send message in Service bus queue through Webrole which are connected to Azure VPN

    I have created two Azure VPN and two cloud services(deployed webrole) and one service bus queue
    First Azure VPN and cloud service(deployed webrole) is created in same affinity group.
    Second Azure VPN and cloud service is created in West US
    Service bus queue is also created in West US.
    When I send message in service bus queue from first cloud service (same affinity group) then message sends successfuly
    but when I send message in same service bus queue from second service(West US- Webrole) then unable to send message and not throwing any exception.
    I don't know, whats happening?
    Its very urgent..... client is waiting.
    Please help me... Thanks.
    hema

    Thanks for reply. Got the cause but still looking for solution.
    Actually we have created Azure VPN using Express route and
    all are configured for Private Peering.
    Try to access service bus queue from Web role which is attached to Express route network.
    I am unable to access service bus queue and send message...because cloud services deployed in virtual networks are supported over the private peering path.
    There are 3 types: public, private and default route (forced tunneling). 
    How  can be configured for all 3 which will force all traffic through the tunnel except for Azure public service?
    Do you have any idea on this scenario?
    Thanks.
    hema

  • Configuring error queue through script

    Hello,
    I have two queues where the second is the error queue for the first. I can set everything manually through console but I need to create a python script that will do it automatically.
    I looked up some information on internet and I was able to create the queues:
    <pre>
    def create_Queue( moduleName, queueName, queueJNDIName, subDeployementName):
    print "creating Queue named " + queueName
    cd( '/JMSSystemResources/' + moduleName + '/JMSResource/' + moduleName)
    theBean = cmo.lookupQueue( queueName)
    if theBean == None:
    cmo.createQueue( queueName)
    else :
    print "Queue already created ..."
    cd("/JMSSystemResources/" + moduleName + "/JMSResource/" + moduleName + "/Queues/" + queueName)
    set( "Name", queueName)
    set( "SubDeploymentName", subDeployementName)
    set( "JNDIName", queueJNDIName)
    </pre>
    but I don't know how to set up the Error Queue. I tried:
    <pre>
    prefix = "/JMSSystemResources/" + JMSModuleName + "/JMSResource/" + JMSModuleName + "/Queues/"
    cd(prefix + "first")
    set("ErrorDestination", prefix + "second")
    </pre>
    but without success. I don't know if I am trying something completely wrong or if just the name of the attribute is wrong ...

    transferModule = cmo.createJMSSystemResource('TransferModule');
    #optionally target
    #transferModule.getTargets().append(aserver);
    jmsResource = transferModule.getJMSResource();
    jmsResource.createQueue('TransferQueue');
    transferQueue = jmsResource.lookupQueue('TransferQueue');
    jmsResource.createQueue('ErrorQueue');
    errorQueue = jmsResource.lookupQueue('ErrorQueue');
    transferQueue.setJNDIName('jms/TransferQueue');
    #transferQueue.setSubDeploymentName('TransferSubDeployment');
    transferQueue.getDeliveryParamsOverrides().setRedeliveryDelay(100);
    transferQueue.getDeliveryFailureParams().setRedeliveryLimit(5);
    transferQueue.getDeliveryFailureParams().setExpirationPolicy('Redirect');
    transferQueue.getDeliveryFailureParams().setErrorDestination(errorQueue);What you also can do is configure your JMS environment using the console.
    While you are doing this, you can record your modifications.
    The record button is located in the top middle of the console.

  • Difference between Context and Queue in UDF

    hi,
    i am trying to write udf but i have doubt when do i select Contect and when do i select Queue as my udf ? How do we decide which one i select ?
    Thanks & Regards
    Naveen

    when u go 4 advanced udf functionalites u need this. for simple udf not req to play with queue nor context. the input when using a context or queue will be an array of strings but in simple udf's it is just a single string that u will be accessing. u can also check here:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/40/7b8e40496f6f1de10000000a1550b0/content.htm

  • Problem in Creation of Handling Units through HU_REPACK and HU_POST FM

    Hi Experts
            This is regarding the problem in creation of HUs with function modules HU_REPACK and HU_POST.
    I am sending two Unique Sources HUs  with single destination HU for the same material and batch into HU_REPACK  and it shows that it is successfully repacked and soon as the HU_REPACK function module passess I have called HU_POST without any parameters except messages..As the data will be picked up auomatically from the internal memory as these function module are related same function group.
      Even the HU_POST FM passes successfully and also it creates a Transfer order but the problem is that THe HU is created with the MULTIPLE LINE ITEMS for the same material and Batch which should not be done at all .
    Please find the example of the HU created in the system
        0     10020000038479     S-DISP     1     EA          S DISPNSARY
        1     0024632192 000004     810062     0.250     KG     L0533A4172     Lactose
        1     0024632192 000004     810062     24.900     KG     L0533A4172     Lactose
    Material is 810062
    Batch    is L0533A4172
    Can you please assist me how to acheive single line item HU  when we are trying to repack the data for  same material and batch as it does while you create the HU through Manual processing i.e HU02 etc

    *

  • How to Handle Queue Message with NO expiration

    I come across a situation where i need to dequeue same message multiple times and upon reaching valid condition only i can discard the message. For this situation i can create a queue that has message expiration set to NEVER. But i didn't find the way to delete the message that has expiration NEVER.
    Can anybody help me what will be the best approach to delete messages that has no expiration. My business case allow me to delete that message only after reaching a particular condition.
    Regards

    In what version?
    SELECT * FROM v$version;

Maybe you are looking for

  • How to check if a Site Column is being used before deleting

    Hi All, Before deleting a SharePoint Online site column I would like to check to see if it is being used by any list or library. I know how to do this when the site is on premise using a PowerShell script. $web = Get-SPWeb http://"sitecollectionurl"

  • Send .pdf as email attachment not under tools in 11.0.9

    The option to send .pdf as an email attachment is not under the tools menu as it has been in previous versions. Is this an option that has been removed, or is this an error in the installation?

  • OT One for the msSQL experts - getting the database to do the work

    I need a little advice on how to use either a function or stored procedure to handle some update work. Basically I am building an application where customers are assigned points values based on the products that they have bought. In the Orders table

  • Is there a way to access MY movies without having iTunes on???

    I want to watch without my laptop having to be on...purchased stuff shows up, but not my personally owned content.  Is there a way to trick itunes into thinking that my personal movies (purchased on DVD/BluRay or personal home movies) are purchased s

  • Consigment stock

    Hello, I have a question reagrding consignment in WM. Let's assume we have a production order which has a raw material in it's BOM The production order will be released and a TR will be generated, moving the stock from the warehouse towards a PSA. Th