Issues with Assign activity

I am trying to assign a value(string) from an element of one variable, to an attribute of an element in another.
I then test the process and get an error on this activity. The message says:
XPath query string returns zero node.
According to BPEL4WS spec 1.1 section 14.3, The assign activity <to> part query should not return zero node.
Please check the BPEL source at line number "162" and verify the <to> part xpath query.
Any thoughts or suggestions?
Thanks,
Matthew

Matthew,
I don't know if this is the problem you're having, but I can take a guess at one possible cause: you are using a variable, or part of a variable, before it has been instantiated.
I apologise in advance for this long-winded explanation. :)
I hope you know Java because I'll use an example from that to illustrate my point. Take this (psuedocode) example where we have some code that wants to use a complex type of class Person:
class MyClass
  private class Person
    public String nameOfPerson;
    public int    age;
  private void someMethod()
    Person ppp;
    ppp.nameOfPerson = "Homer Simpson";
    ppp.age  = 38;
}Hopefully you realise that this will fail. That's because even though ppp is of type Person, you can't start using the data structures it contains because they haven't been created yet. That is, it hasn't been instantiated. Instead, the variable creation line can look like this:
Person ppp = new Person();Now memory has been set aside and the data structures are created. There are empty "slots" for name and age and you can start populating those fields.
If that makes sense to you then you should understand how that pertains to BPEL and your problem.
The thing that's going on with BPEL variables is much the same, except that they are based on XML, which adds some difficulty. In Java, a variable has just a value. e.g. ppp.nameOfPerson = "Homer Simpson". But in XML, you have an element name and an element value. The XML (again, psuedocode) equivalent might be myVar = "<nameOfPerson>Homer Simpson</nameOfPerson>". And you can't put in the "Homer Simpson" until the <nameOfPerson> slot exists.
In our BPEL solution, we do something nice for you which most people don't even realise. We initialise your variables for you. But -- and here's the catch -- not in all circumstances.
Imagine our schema is this (everything in this post is psuedocode and not meant to be exact):
<element name="Person">
  <complexType>
    <sequence>
      <element name="nameOfPerson" type="string"/>
      <element name="age" type="int"/>
    </sequence>
  </complexType>
</element>Suppose our BPEL variable is called pppB (to differentiate it from the Java example, above). In your BPEL process you essentially declare your variable of that type:
<variable name="pppB" type="Person"/>Just like in the Java example above, you can't then simply do an <assign> because the variable hasn't been initialised. Except that you can because we automatically initialise the variable for you! In every programming language a complex variable has to be instantiated or initialised before it can be used. Usually you have to do it explicitly yourself. Some, like in our case, do it for you automatically.
For example, if you want to do XML operations in Java, you have to do something like the following (and this is very psuedocode!):
Document doc = createNewDocument();
Element pppE = createNewElement();
pppE.setNodeName = "Person";
Element nameE = createNewElement();
nameE.setNodeName = "nameOfPerson";
nameE.setNodeValue = "Homer Simpson";
Element ageE = createNewElement();
ageE.setNodeName = "age";
ageE.setNodeValue = "38";
pppE.addChild(nameE);
pppE.addChild(ageE);Note that you cannot assign a value to a node until is created. Also, in general, you can't work with a node unless the parent nodes also exist. The following won't work:
Document doc = createNewDocument();
Element pppE = createNewElement();
pppE.setNodeName = "Person";
Element nameE = pppE.getChild("nameOfPerson")
nameE.setNodeValue("Homer Simpson");That's because even though the Person node was created, no child nodes were. The following would work:
Document doc = createNewDocument();
Element pppE = createNewElement();
pppE.setNodeName = "Person";
Element nameE = createNewElement();
nameE.setNodeName = "nameOfPerson";
nameE.setNodeValue = "Homer Simpson";
pppE.addChild(nameE);
Element newName = pppE.getChild("nameOfPerson");
newName.setNodeValue("Homer J. Simpson");Now returning back to BPEL, you have your variable:
<variable name="pppB" type="Person"/>Normally you could not do such an assign because the variable hasn't been initialised:
<assign name="addName">
  <copy>
    <from expression="string('Homer Simpson')"/>
    <to   variable="pppB" query="/ns1:Person/ns1:nameOfPerson"/>
  </copy>
</assign>Except that with our solution you can because we are nice and do the initialisation for you automatically. People don't realise this and take it for granted, which leads to the problem you are having.
However we don't always instantiate the variable for you. And one time we don't is when a variable is passed in. Suppose the BPEL process took a Person element as it's input:
<variable name="inputVariable" messageType="ns1:PersonMessage"/>and PersonMessage resolved to a Person element.
Now suppose you invoke the BPEL process with the following:
<Person>
  <nameOfPerson>Homer Simpson</nameOfPerson>
</Person>(Assuming that the <age> element is optional, as defined in the schema.)
Now your BPEL process is started and inputVariable looks like this, as expected:
<Person>
  <nameOfPerson>Homer Simpson</nameOfPerson>
</Person>So if you then try to do an <assign> and set the age like this:
<assign name="addName">
  <copy>
    <from expression="string('38')"/>
    <to   variable="inputVariable" query="/ns1:Person/ns1:age"/>
  </copy>
</assign>you're going to get an error because that element does not exist. There is nowhere to put the value for age because the node for age doesn't exist! To be more precise, the query "/ns1:Person/ns1:age" returns null because there is no such element. This results in your error:
The assign activity <to> part query should not return zero node.
A zero node is like saying null here.
This is what I meant above when I said XML is different from "normal" variables that we're used to. You have to have both a node and a value, whereas a variable in Java, say, only has a value.
The solution to this is add the node first, then assign the value. We have a nice way that lets you do that with an append. In the BPEL designer you create an <assign>, then instead of a copy rule, which is what we use most of the time, you use an append. The code will look like this:
<assign name="addAgeElement">
  <bpelx:append>
    <bpelx:from>
      <ns1:age></ns1:age>
    </bpelx:from>
  <bpelx:to variable="inputVariable" part="payload" query="/ns1:Person"/>
</assign>The part between <bpelx:from> and </bpelx:from> is the XML you want to append. The query attribute in <bpelx:to> is where you want that XML to go. Once you've done that, you can now go and do your normal assign and set the age:
<assign name="addName">
  <copy>
    <from expression="string('38')"/>
    <to   variable="inputVariable" query="/ns1:Person/ns1:age"/>
  </copy>
</assign>I hope that makes sense. The code in this post is not accurate, just pseudocode to make the point.
Regards,
Robin.

Similar Messages

  • Everyone having issues with i4s:Activation issues,dropped calls,no SMS,no Network...read this for a temp fix!

    All,
    for all the users out there that have issues with thier new i4s having:
    dropped calls
    no SMS
    no Network
    Activation Issues
    MultiSIM issues
    etc.
    You guys must DISABLE your SIM PIN!
    I know this is not the best thing to do, but until Apple fixes this, this is the only solution right now!
    -> Settings
    ->Phone
    -> Disable SIM PIN
    ...done...
    Cheers

    Truth of the matter is ATT was not ready for this. I was ready to turn in my 3G
    and go back to my old iPhone when a tech rep at Apple told me to turn off
    3G. I went from full bars at home to only one when 3G was on and all of my
    calls were getting dropped. After the rep told me this I replied, "excuse me?
    You mean the reason I bought the new iPhone, so I can talk and email at the
    same time on the 3G network, is not even doable yet?" He replied that they've
    been telling customers to turn off the 3G and then the phone would work fine -
    which it did. Now I just keep it on the edge network and hope that one day the
    3G network will be up to speed and I live in LA! So give it a shot and turn off 3G.
    Thanks ATT!

  • Issues with hangman activity in captivate 7

    Hi,
    I am using the hangman activity in some of my projects. There are two issues being faced:
    When I test the published file in scormcloud, it works fine. The screen automatically progresses to the next slide once the learner completes the activity (I am using IE or firefox browser). However, when my client tests it, they get stuck after this activity, because the slide doesn't progress (they're testing on Chrome browser). Is this a browser issue?
    Secondly, for the learner to move from one question to another after completing it, the button label reads 'Retry', which is not correct because you want them to continue and not retry a word. Is there a way to customize the button labels for these new interactions?
    Your advise would be highly appreciated!
    Divya

    Divya, I have had similar problems with the puzzle widget. In the end we cannot make learner tools that only work on certain browsers. Users use different browsers. And that is that.
    Adobe did not round off these widget tools properly. I actually wonder how they passed any form of QA.
    I have not specifically used the hangman widget yet, However, when a learner does not complete the puzzle widget in time, it just hangs (freezes) right there! So I added a "continue" button that actually runs the slide again (so widget runs again) and allows the learner to try again. In the same way you could just add a continue button when and where your require it. You might have to use some advanced action to co-ordinate the lot.
    If you have not worked with advanced actions before, now is the time to learn. Drink a Red Bull (It is not really bad for you) and watch the series of videos that explain advanced actions on YouTube. You will need the Red Bull to maintain focus . Just make enough time available and be patient. You will get it right.  It will help you overcome many of the Captivate problems.

  • Issue with the activation of transfer rules

    Hi,
    I am working with the datasource 0PRODUCT_TEXT, and I am trying to install transfer rules from BI Content and unable to get the active version.
    But the transfer rules are showing inactive and the error is as follows.
    Error generating program
    Message no. RSAR245
    Diagnosis
    An error occurred during program generation:
    Template:   RSTMPL80
    Error code: 6
    Row:        47
    Message:    Statement concluding with "...LIKE" ended unexpect
    Procedure
    Correct the template to remove the problem
    Please help me in this issue.
    Thanks in advance,
    Rama Murthy.

    Try to run RSActivate* all transfer rule program that will activate the inactive transfer rules. Don't forget to replicate the datasource once again before you run the program.
    thanks.
    Wond

  • Issue with FlowN activity distinct variables

    Hi Everybody,
    I have a FlowN activity, inside it I want to get values by calling a procedure.
    My plsql procedure takes 2 arguments and returns a name.
    arg 1 = my process input value (common for all branches created in FlowN)
    arg 2 = FlowN_1_Variable (flowN index value)
    The branches get create on FlowN, depends on my process i/o value. (Eg: process input = 3 , 3 branches get created in FlowN)
    1st branch ---> arg 1 = 3 (my process input), arg 2 = 1 (FlowN_1_Variable)
    2nd branch ---> arg 1 = 3 , arg 2 = 2
    3rd branch ---> arg 1 = 3 , arg 2 = 3
    Inside each branch I'm invoking (Invoke activity) my pl/sql procedure by passing 2 arguments (mentioned above) @ run-time, the issue is here
    all branches take the first branch values as arguments, like
    1st branch ---> arg 1 = 3 (my process input), arg 2 = 1 (FlowN_1_Variable)
    2nd branch ---> arg 1 = 3 , arg 2 = 1 but it supposed to get arg2 as 2
    3rd branch ---> arg 1 = 3 , arg 2 = 1 it supposed to get arg2 as 3
    This is issue only with Invoke actiivty,however if I print the values before or after the Invoke activity, the values are correct as I expected(different values are coming).
    I'm passing the values to FlowN thro' local variable inside my the scope.
    Please guide me.
    Thanks
    Viki

    Hi Marc,
    Thanks dude for your help.
    I got the flowN activity works for me with your help.
    Thanks
    Viki

  • BAPI_ACC_DOCUMENT_POST Issue with assigning Cost Objects

    Hi Forums,
    I am passing only the order number to this BAPI I am getting the following error.
    Account 654080 requires an assignment to a CO object
    I am passing the order number to this and should populate enough information to fill in the data?
    any ideas?

    Issue was in the code: I was not assigning the order id correctly

  • Issue with warehouse activity monitor LL01

    In LL01 I can see some stock in interim storage with message "Interim storage stock, without movement".Pls suggest how can I clear them?
    Note : Many TO`s are cleared in LU02.

    Hi,
    Check on it:-
    Re: Problem with LL01-Warehouse Activity Monitor
    LL01
    pherasath

  • Issues with assignment

    I have a process that invokes a service that contains a complex type with 3 elements, 2 of type long and one of type string. I deployed it and it worked fine as a standalone process.
    I then created another process that invokes another service that contains the same complex type as that in the first service (i.e. 3 elements, 2 of type long and one of type string). Having done that I invoked the first service in my process. I assigned value to the complex type via the Xpath query. When I run it and debug it in the first service it showed that the assignment had been done correctly to each of the element of the complex type. However, when I queried them it seemed that all the elements are null.
    If however, I were to assign value to each of the elements of the complex type as opposed to just the complex type then it worked fine.
    Can you please advice on what I am doing incorrectly?
    Thank you in advance.

    Could you please post the definition of your types and the snippet of code of the assign that will help us understand what might be causing the problem.
    Are you elements namespace qualified? if so are you setting the namespace prefixes correctly in the XPATH expressions?
    Thank you,
    Edwin

  • Issue with linking Activity to predecessor Document Line Item

    Hi,
    We are trying to create an Activity and programatically link it to the line item of the predecessor Document ( Complaint transaction). The predecessor document number and line item should show up in the 'Relationships' tab of the activity. When this is done manually, it automatically generates a link in the document flow at Header level linking the Activity to the Header of the Complaint.
    However, we are unable to generate this link programatically and we are either able to link the document only to the Complaint Header, or if we link to Item, it does not show the apropriate link in Doc flow of the Activity. Also, the Activity does not show up in the Tasks tab at Item level of Complaint - which happens when we save the data manually.
    Any clues regarding what can be done to link document at Item level will be highly appreciated!
    Thanks,
    Ipshita

    Ipshita,
    If you are using the FM BAPI_ACTIVITYCRM_CREATEMULTI to create the Activity, then pass the Guid to the Doc flow parameter. The sample code to add the doc_flow is as below:
    Document flow-Opportunity
          gs_docflow_bapi-ref_guid   = gs_activity_bapi-guid.
          gs_docflow_bapi-objkey_a   = gc_op_guid.
          gs_docflow_bapi-objtype_a  = c_obj_typ1.                      "'BUS2000111'. (say Opportunity)
          gs_docflow_bapi-objkey_b   = gs_activity_bapi-guid.
          gs_docflow_bapi-reltype    = c_vona.                          "'VONA'.
          gs_docflow_bapi-ref_kind   = c_ref_kind.                      "'A'.
          gs_docflow_bapi-brel_kind  = c_rel_kind.                      "'A'.
    APPEND gs_docflow_bapi TO gt_docflow_bapi.
    Create Activity
            CALL FUNCTION 'BAPI_ACTIVITYCRM_CREATEMULTI'
              TABLES
                header          = gt_activity_bapi
                headerx         = gt_activity_bapix
                document_flow   = gt_docflow_bapi
                created_process = gt_created_process
                return          = gt_return2.
    Commit Work
              CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                EXPORTING
                  wait = 'X'.
    Hope this works for you.
    Regards,
    Shyamak

  • Proformance issue with 'sid generation on activation'

    Hi Gurus,
    In our BW(NW 2004) system we are using Cognos as reporting tool, due to process chain failure at DSO level we unchecked 'sid generation on activation' and chain running successfully after that.
    unchecking will be a performance issue due to generating sid's at run time as per SAP.
    My question is as i am using Cognos in place of BEX. what are the possiblities of effecting the performance and alll?
    Please provide your valuable suggestions.
    Thanks in Advance,
    Suresh.

    Hi Suresh,
    Irrespective of what is the reporting front end you use, if you use this DSO for reporting it would generate the SID values at the runtime which will have huge impact on reporting performance. Just removing the SID generation option would temporarily fix the load issue, with quick activation of DSO but it will affect the most important area reporting performance.
    Try to solve the issue with SID generation error while activating at the BW side which could be because of the special character issues and once you fix that your process chains would load fine with a far better performance while reporting on this DSO.
    Regards,
    Mani

  • IPhone 4S with IOS8 with re-activation issue.

    I've restored and loaded 4S with IOS8. When I try to reactivate it, I'm told that the AppleID my iPhone is linked to isn't the one that was used to set it up.  I also tried my backup email, in case I used that as an AppleID.  That doesn't work either.  Anybody?

    Hi craig101,
    Based on your description (unable to activate your iPhone with your current Apple ID after upgrading to iOS 8), it sounds like you may be having issues with the Activation Lock function of Find My iPhone. You may find the information listed in the following article helpful:
    Find My iPhone Activation Lock - Apple Support
    Regards,
    - Brenden

  • SAP BI 7.0 Transport issue with HR Structural Authorization DSO

    Hi,
    I am trying to transport HR Structural Authorization DSO Objects in  BI 7.0  from Dev to QA system. The Data sources are 0PA_DS02 and 0PA_DS03. ( I am sure that there are lots of changes in Authrorization concept in BI 7.0),.
    1. Please suggest me if I need to make any changes and tests before moving these authorization objects to QA system.
    2. Also, do I need to take any pre-cautions while activating business content objects 0TCTAUTH  and 0TCTAUTH_T (Datasources look like are from 3.x) as I am getting issue with the activation of the transfer structure for these objects?
    Thanks a lot for your valuable inputs.
    Regards
    Paramesh
    Edited by: paramesh kumar on May 5, 2009 12:45 AM

    Hi Paramesh.
    You can use the DSOs 0PA_DS02 and 0PA_DS03 in BI7.0 as well. You just need to use the new generation of analysis authorizations in transaction RSECADMIN.
    You can use 0TCTAUTH and 0TCTAUTH_T in BI7.0, however we have experienced som problems with the 0TCTAUTH_T extractor, which dumped because of a poorly designed SELECT statement that was unable to cope with 10000 records. We have replaced it with a generic data source that uses table RSECTEXT directly.
    Regards,
    Lars

  • Issues with ldap_add via LDAP Interface on WS 2008 R2 from WGM for mounts

    Important Setup Information:
    Active Directory domain on Windows Server 2008 R2
    Extended AD Schema to include apple-* attributes
    Mac OS X Snow Leopard Server 10.6.2 bound to Active Directory
    Connected to Active Directory Forest in Workgroup Manager with Domain Admin / Schema Admin credentials.
    The Issue:
    When attempting to configure a Home path using an SMB URL using the following attributes:
    Mac OS X Server/Share Point URL:
    smb://gio-storage-01.giodivine.com/Users
    Path to Home Folder:
    user 01
    Full Path:
    /Network/Servers/gio-storage-01.giodivine.com/Users/user01
    I receive the following error:
    *Not authorized.*
    This action failed because you are not authorized to perform the operation.
    I checked the console, and found the following (completely useless) error:
    Got unexpected error of type eDSPermissionError (-14120) on line 574 of /SourceCache/WorkgroupManager/WorkgroupManager -361.2.1/Plugins/UserAccounts/UserVolumesPluginView.mm
    I enabled diagnostic logging of the LDAP Interface on the Active Directory server and acquired the following error attributed to the "permissions" issue that Workgroup Manager emits:
    Internal event: Function ldap_add entered
    Internal Event: The LDAP server returned an error.
    Additional Data
    Error value:
    00000057: LdapErr: DSID-0C090C30, comment: Error in attribute conversion operation, data 0, v1db0
    So; it would appear that there is some issue with the Active Directory schema extensions, or that the UserVolumesPluginView module is not referencing the schema correctly. My expectation would be that an apple-mount object be created to describe the mount point in /Network/Servers and that the unixHomeDirectory attribute on the User object would be set to the newly created map point.
    The latter occurs, i.e. the unixHomeDirectory attribute is set to:
    /Network/Servers/gio-storage-01.giodivine.com/Users/user01
    The map point is never created in Active Directory, however. It did create a new container in AD at the root, i.e. cn=Mac OS X,dc=giodivine,dc=com, but nothing is ever created there.
    I have attempted to completely remove all of the extended schema changes, re-compare an OD master against the AD PDC, recreate the schema changes LDF, and re-apply the changes to no avail.
    Any information as to how I can find out exactly what call to ldap_add is being made so that I can somehow track down the faulty schema extension attribute would be helpful. Are there ways to enable verbose diagnostic logging of Workgroup Manager and it's accompanying modules?
    Thanks in advance!
    Deavon M. McCaffery
    <Edited by Host>

    Hi Scot,
    Sometimes a third party backup application will change the default VSS provider adding VSS writers which causes Windows Server Backup using an incorrect component in doing backup, that's why I suggest to delete it for a test. Anyway you can reinstall it
    after testing.
    And as you said a high-load CPU could also be the cause of the issue so you may need to first rule hardware effective out.
    If issue still exists, please try the steps below as well:
    1. Please check DCOM Server Process Launcher service is started.
    2. If not, try to change RPC service to run as SYSTEM account. To do this please modify the following key:
    Note: Backup the key before edit incase it cause any issue.
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\RpcSs\
    Find "ObjectName" and change the value to LocalSystem.
    Reboot to see if DCOM back to work and if Windows Server Backup starts working. If not, please provide the result if there is any new error occurs.
    If DCOM still not work, please compare the content of the following key with a working server:
    HKEY_LOCAL_MACHINE\Software\Microsoft\OLE
    Edit if there is any difference and make sure you created a backup of the key before editing. 
    If you have any feedback on our support, please send to [email protected]

  • ISSUES WITH sunZFS 7420

    Hi ,
    We have a sun storage zfs 7420 with many servers connected to it....
    they are connected to storage via SAN Switches on a active -passive cluster. The stroage controllers is also set to active - passive.
    THe storage is for the DB on ASM on SUN SPARC t4-2 model.
    Few servers have no issues in accessing the storage but many of the tehm are very slow in accessing the storage. The servers that share one LUN doesnt have any issue but the servers accessing with other LUNS have connectivity issue....
    ANy clue..much appreciated

    We also have issues with 7420 active/passive. Sometimes its okay but then very slow. The slowdowns/hangs correspond with big spikes in memory fragmentation according to analytics (~70G of 128 total per head) We are on the 2011.4.24.4 release, and it looks like the 24.3 release was supposed to fix these issues, im assuming these releases are cumulative but dont know for sure.
    Might want to pull up an analytics for memory->kernel memory lost to fragmentation and see if you are seein ghte same thing.

  • I tried to restore my iphone but it show this massage we're sorry we are unable to continue with your activation at this time

    I tried to restore my iphone last night but it show this massage we're sorry we are unable to continue with your activation at this time on my itunes. As i wanted to get back all my apps and info to the iphone, but no i couldnt, because of this massege. is there anything tht i can do?

    Hey algouhi!
    Here is an article that can help you troubleshoot this issue with iPhone activation:
    iPhone: Troubleshooting activation issues
    http://support.apple.com/kb/ts3424
    Thanks for coming to the Apple Support Communities!
    Regards,
    Braden

Maybe you are looking for