Jython code to add migratable target

Hi,
I am trying to add migrable target using following wslt jython commands:
edit();
startEdit();
cd('/');
jmsnode = cd('JMSServers/jmsnode1BL');
cd('/');
target = cd('MigratableTargets/ejbnode1_migratable');
cd('/');
jmsnode.addTarget(target);
save();
stopEdit('y');
Above code throws following exception:
Traceback (innermost last):
  File "<string>", line 1, in ?
  File "<iostream>", line 388, in save
  File "<iostream>", line 520, in raiseWLSTException
WLSTException: Error occurred while performing save : Save failed: There are some invalid changes which need to be resolved. : weblogic.descriptor.DescriptorValidateException: The following failures occurred:
-- Since the JMS server jmsnode1BL or SAF agent is targeted to a migratable target, it cannot use the default store
How to set custom persistent store for a migratable target using python code ?
Could anyone please help ?
PS: Creation of JMS servers is done using JMX, but only addtarget is done python code.
Thanks,
Amal

Hi,
       First of all think about a simple design of creating two different flows with the help of infosurce. In transformation, give constant value to ZTYPE with different infosource and load the data. If that is not what you want(as i havent got your requirement properly, you can try the below thing.
It is not possible with only start routine. I think you will need to create an expert routine here. The code will be as below.
LOOP AT SOURCE PACKAGE into SOURCE_FIELDS.
   ASSIGN all source fields to RESULT_FIELDS.
   and add RESULT_FIELDS-<ZTYPE> = "INTERNAL"
   APPEND RESULT_FIELDS to RESULT_PACKAGE.
    Again assign all source fields to RESULT_FIELDS.
  and add RESULT_FIELDS-<ZTYPE> =  "EXTERNAL"
   APPEND RESULT_FIELD-<ZTYPE> = "INTERNAL".
ENDLOOP.
I hope this logic will help you.
Regards,
Harpal.

Similar Messages

  • Wlst migratable target creation

    I've been trying to dynamically add candidate servers within a wlst script. Here is what I have so far wondering how I can generate the jarray based on number of managed JMVs.
    migratableTargets = migratableTargetList.split(',')
    mgdNames = mgdNameList.split(',')
    # Migratable target function
    def createMigratableTarget(mtnFnc,cnFnc,mnFnc):
    cd('/')
    cmo.createMigratableTarget(mtnFnc)
    cd('/MigratableTargets/'+mtnFnc)
    cmo.setCluster(getMBean('/Clusters/'+cnFnc))
    cmo.setUserPreferredServer(getMBean('/Servers/'+mnFnc))
    cmo.setMigrationPolicy('manual')
    # Set servers for migratble target
    cd('/MigratableTargets/'+mtnFnc)
    *set('ConstrainedCandidateServers',jarray.array([ObjectName('com.bea:Name='+mgdNames[0]+',Type=Server'), ObjectName('com.bea:Name='+mgdNames[1]+',Type=Server')], ObjectName))*
    # Create a migratable target for each JVM
    count = 1
    while count <= int(clusterNodes):
    createMigratableTarget(migratableTargets[(count-1)],clusterName,mgdNames[(count-1)])
    count += 1
    The props file I'm loading:
    clusterNodes=2
    clusterName=jms_dv1
    mgdNameList=jms_dv1_01,jms_dv1_02
    migratableTargetList=ensMigratableTarget_01,ensMigratableTarget_02
    So in this example the script works fine but lets say I had a 4 node cluster I would need to come back to this script to edit the line in bold for each node and I really don't want to do that. My thought path right now is how to do this with python but maybe I can use different wlst to do what I'm after. I'm still digging in and might figure it out but figured I'd ask around.
    Thanks

    Hi..
    Domain name..
    cd('/')
    set('Name', domain_name) - where domain_name is a variable containing what you want to call the domain.
    domain location..
    writeDomain(domain_home) - where domain home is the root of where the domain will be located..
    there's lots of examples of wlst scripting, just a case of finding them..

  • Mix jython code with sql

    Hi,
    I have just read the following sentence in the odi jyhon reference:
    "Oracle Data Integrator users may write procedures or knowledge modules using Jython, and may mix Jython code with SQL, PL/SQL, OS Calls, etc."
    Does anyone of you know how jython can be mixed with SQL in a knowledge module? I just know how to embed java code with the <% %> tag. But how about jython (e.g. when used in a knowledge module task with technology = "Oracle"?
    I appreciate your help.
    best regards,
    Hans

    So Firstly I have never done this in KM but it works well in Procedure so I think it would work in a KM but I'm not sure.
    So I will show you an exemple which will be easyer than lot of explanation.
    This exemple is a step of a procedure which is supposed to send an email if there is an error in an execution.
    This Step retrieve informations about the execution as the error message or the execution context...
    In the Target Command :
    Technology= Jython
    I have :
    EmailBody = EmailBody + r'''<TR><TD><CENTER>#NO</CENTER></TD><TD>#SESS_NAME</TD><TD>#STEP_NAME
    </TD><TD>#CONTEXT</TD><TD>#DEBUT</TD><TD>#MSG</TD></TR>'''
    Contexte = '#CONTEXT'.
    --> the #variable are the informations that I will extract in the source.
    In the Source Command :
    Technology = Oracle .
    SELECT L.SESS_NO || ' / ' || L.NNO "NO", STEP_NAME, SESS_NAME, SS.CONTEXT_CODE "CONTEXT", L.STEP_BEG "DEBUT", X.TXT "MSG", L.step_rc "RC"
    FROM <%=snpRef.getObjectName("L", "SNP_STEP_LOG", "D")%> L,
    <%=snpRef.getObjectName("L", "SNP_SESS_STEP", "D")%> SS,
    <%=snpRef.getObjectName("L", "SNP_SESSION", "D")%> S,
    <%=snpRef.getObjectName("L", "SNP_EXP_TXT", "D")%> X
    WHERE L.SESS_NO = <%=snpRef.getSession("SESS_NO")%> AND
    L.SESS_NO = SS.SESS_NO AND L.NNO = SS.NNO AND S.SESS_NO = L.SESS_NO AND
    STEP_STATUS = 'E' and L.I_TXT_STEP_MESS=X.I_TXT and X.TXT_ORD=0
    And with this the Jython keep the information of the Query...
    So I would like to apologize cause in my last post I have inversed the Target and the Source... Sorry. Hope that your problem didn't come from here...
    Evidently you will have SQL as Source and Jython as Target...

  • Error while executing BBP_UPDATE_PORG Tr Code with ADD Option

    Hi All,
    I changed the Back end Vendor Master Data - Purchasing View (Example Accounting Number) and run the BBPUPDVD Tr code in SRM. The Business Partner (Vendor) data is updated correctly in SRM System from Back End System.
    We have set of purchasing organisations like one local (SRM) Purchasing Organisation and respective Back end Purchasing Organisation (account number). When ever I run BBPUPDVD, the SRM system updates the backend vendor master data  with back end purchasing organisation into SRM Standard tables. Then I am running BBP_UPDATE_PORG Tr code to have updated data into SRM Local Purchasing Organisation. I am receiving error message.
    Example Scenario:
    step 1: Present values in Vendor Master Vendor Number 100250, Purchaing Organisation : 1010 A/c Number: 100250-1010
    and I changed the account number as 10025o-test for vendor 100250 and pur organisation 1010.
    step 2: I run the BBPUPDVD in SRM System.
    Step 3: I checked the values in BBPMAININT - vendor data (for backend vendor number 100250 and backend pur organisation - 1010). The SRM system replicates the values correct.
    Step 4: I executed BBP_UPDATE_PORG and replaced the local (SRM) business partner (for local vendor number - 100250 and local purchasing organisation) - REPLACE Option. Then SRM replaces the SRM Business Partner (local) Data with Back end Vendor Master Data and also Back End vendor master data is deleted in SRM System. Now I have updated business partner details in SRM System as SRM Local an no SRM Back End Vendor Master Data in SRM System. This step is working fine.
    Step 5: One more time I am executing BBP_UPDATE_PORG Tr code with Add option to have SRM Back End Details (in SRM System) from SRM Local Details (SRM System). Then the system is error message in SM13 Tr code.
    Kind Note: There is no SRM Back End Vendor details in SRM System which I want to have with the help of executing BBP_UPDATE_PORG Tr code with Add option.
    For analysis I went to ST22 (dump Analysis), the SRM gave an error message like:
    Runtime Error          DYNPRO_SEND_IN_BACKGROUND
    Date and Time          09/15/2008 10:56:58
    ShrtText
         Screen output without connection to user.
    What happened?
         Error in ABAP application program.
         The current ABAP program "SAPLBBP_PARTNER_MAINT" had to be terminated because
          one of the
         statements could not be executed.
         This is probably due to an error in the ABAP program.
    Information on where terminated
        The termination occurred in the ABAP program "SAPLBBP_PARTNER_MAINT" in      "BBP_PORG_INSERT".
        The main program was "RSM13000 ".
        The termination occurred in line 59 of the source code of the (Include)      program "LBBP_PARTNER_MAINTU11"
        of the source code of program "LBBP_PARTNER_MAINTU11" (when calling the editor      590).
        The program "SAPLBBP_PARTNER_MAINT" was started in the update system.
       56
       57 * update database
       58   IF NOT LT_FRG0060_NEW[] IS INITIAL.
    >>>>>     INSERT BBPM_BUT_FRG0060 FROM TABLE LT_FRG0060_NEW.
       60   ENDIF.
       61
       62   IF NOT LT_FRG0061_NEW[] IS INITIAL.
       63     INSERT BBPM_BUT_FRG0061 FROM TABLE LT_FRG0061_NEW.
       64   ENDIF.
    Kindly guide me or provide solution.
    We are in SRM 4.0 and ECC 5.0.
    Thanks a lot in advance.
    Regards,
    Sudarsan
    Edited by: KOYYA SUDARSANA NAIDU on Sep 15, 2008 9:09 PM
    Edited by: KOYYA SUDARSANA NAIDU on Sep 17, 2008 8:46 PM

    Hi All,
    I changed the Back end Vendor Master Data - Purchasing View (Example Accounting Number) and run the BBPUPDVD Tr code in SRM. The Business Partner (Vendor) data is updated correctly in SRM System from Back End System.
    We have set of purchasing organisations like one local (SRM) Purchasing Organisation and respective Back end Purchasing Organisation (account number). When ever I run BBPUPDVD, the SRM system updates the backend vendor master data  with back end purchasing organisation into SRM Standard tables. Then I am running BBP_UPDATE_PORG Tr code to have updated data into SRM Local Purchasing Organisation. I am receiving error message.
    Example Scenario:
    step 1: Present values in Vendor Master Vendor Number 100250, Purchaing Organisation : 1010 A/c Number: 100250-1010
    and I changed the account number as 10025o-test for vendor 100250 and pur organisation 1010.
    step 2: I run the BBPUPDVD in SRM System.
    Step 3: I checked the values in BBPMAININT - vendor data (for backend vendor number 100250 and backend pur organisation - 1010). The SRM system replicates the values correct.
    Step 4: I executed BBP_UPDATE_PORG and replaced the local (SRM) business partner (for local vendor number - 100250 and local purchasing organisation) - REPLACE Option. Then SRM replaces the SRM Business Partner (local) Data with Back end Vendor Master Data and also Back End vendor master data is deleted in SRM System. Now I have updated business partner details in SRM System as SRM Local an no SRM Back End Vendor Master Data in SRM System. This step is working fine.
    Step 5: One more time I am executing BBP_UPDATE_PORG Tr code with Add option to have SRM Back End Details (in SRM System) from SRM Local Details (SRM System). Then the system is error message in SM13 Tr code.
    Kind Note: There is no SRM Back End Vendor details in SRM System which I want to have with the help of executing BBP_UPDATE_PORG Tr code with Add option.
    For analysis I went to ST22 (dump Analysis), the SRM gave an error message like:
    Runtime Error          DYNPRO_SEND_IN_BACKGROUND
    Date and Time          09/15/2008 10:56:58
    ShrtText
         Screen output without connection to user.
    What happened?
         Error in ABAP application program.
         The current ABAP program "SAPLBBP_PARTNER_MAINT" had to be terminated because
          one of the
         statements could not be executed.
         This is probably due to an error in the ABAP program.
    Information on where terminated
        The termination occurred in the ABAP program "SAPLBBP_PARTNER_MAINT" in      "BBP_PORG_INSERT".
        The main program was "RSM13000 ".
        The termination occurred in line 59 of the source code of the (Include)      program "LBBP_PARTNER_MAINTU11"
        of the source code of program "LBBP_PARTNER_MAINTU11" (when calling the editor      590).
        The program "SAPLBBP_PARTNER_MAINT" was started in the update system.
       56
       57 * update database
       58   IF NOT LT_FRG0060_NEW[] IS INITIAL.
    >>>>>     INSERT BBPM_BUT_FRG0060 FROM TABLE LT_FRG0060_NEW.
       60   ENDIF.
       61
       62   IF NOT LT_FRG0061_NEW[] IS INITIAL.
       63     INSERT BBPM_BUT_FRG0061 FROM TABLE LT_FRG0061_NEW.
       64   ENDIF.
    Kindly guide me or provide solution.
    We are in SRM 4.0 and ECC 5.0.
    Thanks a lot in advance.
    Regards,
    Sudarsan
    Edited by: KOYYA SUDARSANA NAIDU on Sep 15, 2008 9:09 PM
    Edited by: KOYYA SUDARSANA NAIDU on Sep 17, 2008 8:46 PM

  • Is it possible to add a target amount to a query

    If I have a number being disagregated by Cost Center is it possible to add a target amount on a cost center level? I know we could add an attribute to Cost Center that hold a value for this target, but that could not be used in calculations or be shown in chart compared to the actuals. Does this have to be added to the cube as a Key Figure or is there an easier way?

    Hi.
    You can use IP module to enter/update target KF.
    Regards.

  • OSB: cluster creation script fails to delete migratable targets

    Hi,
    I am working on a wslt script which creates an OSB domain with a cluster with one admin server and two managed servers. In this script, after adding the OSB required templates, I would like to delete the migratable targets created by the template. I do this like this:
    cut
    def deleteResources(mbeanType):
         log ('Deleting resources of type %s' % mbeanType)
         cd('/')
         mbeans = get(mbeanType+'s')
         for mbean in mbeans:
              log ('\tDeleting %s' % mbean.name)
              cd('/')
              delete(mbean.name, mbeanType)
    def deleteTemplateGeneratedResources():
         deleteResources('JMSServer')
         deleteResources('SAFAgent')
         deleteResources('FileStore')
         deleteResources('JMSSystemResource')
         deleteResources('JDBCSystemResource')
         deleteResources('MigratableTarget')
    deleteTemplateGeneratedResources()
    cut
    This goes through but when I save the domain (updateDomain()) the migratable targets still exist! I tried it manually on this domain after I do the delete() the migratable targets disapper (ls('/MigratableTarget') fails saying there is no MigratableTarget). However, after I do an updateDomain() the migratable targets remain. How can I get rid of them? Why don't they get removed?
    Regards
    Dimo

    I tried deleting and creating them anew but it then messes up the configuration of the migratable targets. What seems to work now is to delete them, create new ones with DIFFERENT names and then updateDomain(). In this case the old ones get really deleted. Really messy stuff.

  • AS3 code to add buffer to .flv

    In AS2, there was a parameter to add buffering to an .flv. In
    AS3 it appears Adobe has decided to remove that parameter. Is there
    a line of code to add buffering to an .flv when .flv component is
    dragged to stage - not added to stage with AS3? I like the new AS3
    .swf controllers and prefer not to revert back to AS2.

    quote:
    Specifically, if I have a Symbol in the Library named
    "mySymbol", how do I add it to my DispalyObjectContainer (i.e.
    MovieClip)?
    Something like this:
    var ms:mySymbol = new mySymbol();
    disp.addChild(ms);

  • Migratable targets for singleton implementations

    Hi,
    I require some help regarding the use of migratable targets with singleton implementations
    We have a WebLogic 11g environment comprising several managed servers in a cluster. Migratable Targets are also been defined for JMS and JTA services.
    The deployment includes two EARs which may only be deployed to a single server at any one time. The first EAR contains JARs, a WAR and a RAR. The second contains JARs and EJBs. We wish to implement a fail-over solution for these "singleton" EARs on the cluster so that everything would get migrated to another server in the cluster if the initial pinned server fails.
    We had hoped to use the same mechanism as for JMS and JTA services whereby the EARs would simply assigned to a migratable target (with a defined user preferred server and constraint candidate servers). However from reading the documentation and trying out some deployments this scenario does not seem to be supported by WebLogic. For example, a migratable target may not be given as a target during EAR deployment.
    The only option for the singleton services seems to be inheriting from the SingletonService and deploying this to preferred- and candiates servers but this would mean changing quite a few services and we are not sure how to manage the "singleton" RAR.
    Does Weblogic 11g offer a way to deploy a complete EAR to a deployable target? If not, could you please suggest an alternative way of implementing a fail-over solution for our EARs.
    Thanks in advance for your help.
    Regards. Ian.

    I tried deleting and creating them anew but it then messes up the configuration of the migratable targets. What seems to work now is to delete them, create new ones with DIFFERENT names and then updateDomain(). In this case the old ones get really deleted. Really messy stuff.

  • ODI Var not being substituted in Jython code

    Hi all,
    I have an option VAR in a interface which value is a variable #A_VAR1
    Within a KM, the jython code has the line
    x = r"<%s=snpRef.getOption("VAR")%>"
    My Interface is raising an error. I can see in Operator .... x=r"#PROJECT.A_VAR1"
    If I put in the option the explicit value is working fine.
    How can we get the var value from Jython?
    Thanks

    Hi,
    Have a look at the below thread,
    Re: ODI 11g | Passing ODI variable value to procedure option
    Thanks,
    Guru

  • CRM 2013: Format and C# code to add attachment

    I have created a very simple custom entity. I want to be able to add attachment to this entity record. Now I have 2 questions
    1) What kind of field should I create and  how do make it available in the entity form.
    2) What would be the simplest C# code to add attachment to a entity record
    Hasibur Rahman

    Hi Hasibur,
    1. To enable notes section in your entity form, have a look at the below given link for a step by step tutorial.
    http://www.powerobjects.com/2012/03/06/a-tip-for-notes-when-you-create-a-new-entity-in-dynamics-crm/
    2. To add attachment to a crm record using C# follow the below link:-
    https://msdn.microsoft.com/en-us/library/gg328429.aspx?f=255&MSPPError=-2147217396
       Let me know if you facing any issues.
       Hope this helps!!!
    Thanks,
    Prasad
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

  • Add host target after deleting it in OEM 12c

    I am running OEM 12.1.0.3.  I have deleted a host target on the console and now I want to add it back.  If I go to "Add Target" -> "Add Target Manually" -> "Add Host Target", it will prompt for installation of agent on that host.  I do not want to go through that process since agent is already installed and running on the host.  I also tried "auto discovery result" but the host isn't listed there even though the agent is a managed target in OEM.  Is there a easy way to add the host back?  Thanks.

    Hi Team,
    You can follow the below steps to re-add the host target
    1. Start the agent by issuing following command:
    <AGENT_INSTANCE_HOME>/bin/emctl start agent
    2. Issue following command:
    <AGENT_INSTANCE_HOME>/bin/emctl config agent addinternaltargets
    3. Secure the agent by issuing following command:
    <AGENT_INSTANCE_HOME>/bin/emctl secure agent
    4. Do the following steps to show the status of host and agent as up:
    <AGENT_INSTANCE_HOME>/bin/emctl stop agent
    <AGENT_INSTANCE_HOME>/bin/emctl clearstate agent
    <AGENT_INSTANCE_HOME>/bin/emctl start agent
    Once done, the host and agent status would be shown as up.
    5. Do a resync of agent as per below steps
    1. Login to 12C console
    2. Navigate to Setup --> Manage Cloud Control --> Agents (for 12.1.0.2 OEM)
        Navigate to Setup --> Agents (for 12.1.0.1 OEM)
    3. Click on the problematic agent
    4. Click on drop down menu "Agent" and Choose "Resynchronization" in the menu list.
    5. Choose the option to "Unblock agent on successful completion of agent resynchronization." and Click on Continue
    6. The resynchronization operation is submitted as a job
    7. Check the job's status of the resynchronization operation by clicking on the job name's link.
    Regards,
    Rahul

  • Re : T-Code for sales representative Target

    Hi
           I want to know from which T-Code we can set Target for the sales persons.
    thanks
    Anto

    hello friend.
    did you mean sales targets for the sales personnel?  i am not aware of any standard functionality in ERP, but you can try planning by doing MC93 (sales against plan). 
    if this is too tedious, a simpler approach would be to assign the sales personnel to the sales transaction (through assignment to customer).  you can then generate a sales report based on the sales personnel and compare the figures to a structure of sales quota.
    regards.

  • How do I acquire the activation code to add my iPad to view it on Apple TV?

    How do I acquire the activation code to add my iPad to view it on Apple TV?

    on the same network no code is required
    ipad2 and later is required
    and Apple TV 2g and later is required
    read more here
    iOS: Use AirPlay Mirroring

  • Using jython code in ODI

    Hi,
    I have made one simple jython code in odi procedure which will read the script file from one location and if there is some error in the script then that error will be displayed in the odi operator.
    This work has been done in place of using ODI os command which can call the script from a particular location but cannot revert back with the error in ODI operator.It only shows odi os command return 1.
    here is the code:
    Step 1 in odi procedure--
    import os
    from subprocess import Popen
    from subprocess import PIPE
    ScriptFile = '<%=odiRef.getOption("ScriptFile")%>'.strip()
    if (ScriptFile == "") or (os.path.isfile(ScriptFile) == 0):
    raise IOError("The script file " + ScriptFile + " does not exist.")
    Step 2:
    args = [ScriptFile]
    #raise IOError(args)
    process = Popen(args, stdout=PIPE, stderr=PIPE)
    output, oerr = process.communicate()
    if (process.returncode != 0):
    stdOutString = str(output)
    stdErrorString = str(oerr)
    raise IOError([stdOutString,stdErrorString])
    else:
    pass
    Here the ScriptFile is the option set in procedure where i am passing the script file location.

    Yes it was done through that.
    One more question is to how we can pass the parameters to this script ?
    I need to pass some parameters which will be internally used in the script.

  • [svn:osmf:] 9866: Adding '@throws' clauses to ILayoutRenderer add/ remove target methods, and adding a 'targets(target:ILayoutTarget)' method that allows checking addition/removal validity up front.

    Revision: 9866
    Author:   [email protected]
    Date:     2009-09-01 00:56:48 -0700 (Tue, 01 Sep 2009)
    Log Message:
    Adding '@throws' clauses to ILayoutRenderer add/remove target methods, and adding a 'targets(target:ILayoutTarget)' method that allows checking addition/removal validity up front.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/openvideoplayer/layout/ILayoutRenderer.as
        osmf/trunk/framework/MediaFramework/org/openvideoplayer/layout/LayoutRendererBase.as

Maybe you are looking for