Custom propertie's values are not updated for workflow metadata

Hi,
I've a requirement where I need to add and update some properties. to /etc/workflow/instance/<Instancename>/data/metadata node.
I've two workflow Process steps,
Process step 1:
    Adds some properties to metadata.
Process step 2:
    Updates the propertie's values which are added in Process step 1.
But the issue is update is not working when the node is /etc/workflow/instance/<Instancename>/data/metadata.
i.e. In the step 1, Properties are added to metadata node but In the step 2 propertie's values are not updated to the same node.
Here is my process code:
=================================================
import java.util.Locale;
import java.util.StringTokenizer;
import javax.jcr.Node;
import javax.jcr.Session;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Properties;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.osgi.framework.Constants;
import javax.jcr.Value;
import com.adobe.granite.workflow.WorkflowException;
import com.adobe.granite.workflow.WorkflowSession;
import com.adobe.granite.workflow.exec.WorkItem;
import com.adobe.granite.workflow.metadata.MetaDataMap;
import com.adobe.granite.workflow.exec.WorkflowProcess;
import com.adobe.granite.workflow.model.WorkflowModel;
import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.api.resource.ResourceResolverFactory;
import org.apache.sling.jcr.resource.JcrResourceUtil;
import org.apache.sling.api.resource.PersistableValueMap;
import org.apache.sling.api.resource.PersistenceException;
import org.apache.sling.api.resource.Resource;
@Component
@Service
@Properties({
       @Property(name = Constants.SERVICE_DESCRIPTION, value = "Test"),
       @Property(name = Constants.SERVICE_VENDOR, value = "Adobe"),
       @Property(name = "process.label", value = "Test 1")})
public class Test1 implements WorkflowProcess
    @Reference
    private ResourceResolverFactory resourceResolverFactory;
          public void execute(WorkItem workItem, WorkflowSession wfsession, MetaDataMap metadata)
                              throws WorkflowException {
                    System.out.println("Testing");
        try{
            ResourceResolver resolver;
            resolver = resourceResolverFactory.getAdministrativeResourceResolver(null);
            String instancePath = workItem.getWorkflow().getId();
            Node instanceNode=null;
            Session jcrSession = wfsession.adaptTo(Session.class);
           String payload = (String) workItem.getWorkflowData().getPayload();
           //instanceNode=JcrResourceUtil.createPath(payload+"/jcr:content", "nt:resource","nt:resource", jcrSession, true);
                              instanceNode=JcrResourceUtil.createPath(instancePath+"/data/metaData", "nt:resource","nt:resource", jcrSession, true);
                              System.out.println("Test: instance PAth:"+instanceNode.getPath());
            Resource resource = resolver.getResource(instanceNode.getPath());
                if(resource != null)
                    PersistableValueMap valueMap= resource.adaptTo(PersistableValueMap.class);
                    valueMap.put("name", "Rajesh");
                    valueMap.put("id", "A002");
                    valueMap.put("designation","SE");
                    valueMap.save();
                    System.out.println("Name:"+valueMap.get("name"));
                    System.out.println("Id:"+valueMap.get("id"));
            jcrSession.save();
            resolver.close();
        }catch(Exception e)
            System.out.println("Exception:"+e.getMessage());
===================
The code works fine when the node is payload/jcr:content.
Note : Process 1 and Process 2 code is same expect the values I'm passing to the PersistableValueMap.
Any pointers would be more helpful..
Thanks
Siva

Is there anything wrong in my code/ it's a bug..  
Thanks
Siva

Similar Messages

  • Excise values are not updating in factory sales

    Dear SCN's,
    I'm facing an issue while doing factory sales, while creating sales order and billing I'm using J1IIN for excise invoice and then updating in J1I5 transaction but the values are not updating in table J_2IRG1BAL. Can anyone suggest what to do in order to get the values updated in table.
    Thanks & Regards,
    Kumar

    The following note explains how you need to update J_2IRG1BAL table.
    Note 951955 - CIN: General clarifications for RG1 goods
    Have a look at this.
    G. Lakshmipathi

  • Report Painter values are not populating for a particular cost center

    Report Painter(GR55) values are not populating for a particular cost center for the months of April 1 2011 where as for May onwards values are displaying correctly..We have check the transaction code KSB1 for this cost center there are some values posted for the period of April..
    Can any one help me to find out where exactly the issue is and how to resolve the same..

    Please check your variables in your report.

  • KSPP -Scheduled Activity are not updated for last 2 periods

    Hi All,
    When we run KSPP by using LTP, noticed that for one cost center and activity type the plan scheduled Acivities are not updated for last 2 period's.(shows Zero)
    Do we miss any thing.
    Regards,
    Raj

    Hi,
    It can be due to the sales demand you have uploaded and the Lead time in the material master
    because of the that, the demand gets shifted before (say, Dec demand gets shifted for manufacturing in October) and the activity qty in the last month comes zero
    So, upload 14 months demand where 13 and 14th month is the same as 12th month... Most of the companies do this way
    Ajay M

  • KP06 Plan Values are not updating in Cost center  report

    Hi,
    I have configured KP06 and uploaded through excel,It is getting uploaded successfully.
    But after uploading planned values are not updating in the S_ ALR_87013611 Report.
    What could be the reason.kindly give me some inputs regarding this.
    Thanks
    Supriya

    Hi Supriya,
    After uploading the entries have you saved or have you verified with excel values.
    Please check.
    Sateesh

  • Lov Values are not showing for Discoverer Reports in Application

    Hi,
    I developed some discoverer reports, those reports having parameters with LOV. Those LOV values are showing in Discoverer Desktop, but after registering those reports in Oracle applications those LOV values are not showing. Pls let me know how resolve this issue.
    Regards,
    Hanimi.

    Hi,
    Also it is necessary to know how the LOVs are defined. Are they based on Application flexvalues for example? In which case it may be that you have not got your NLS language parameters set correctly when connecting from Applications.
    Rod West

  • Editable alv using OO ALV(newly edited row values are not updating )

    Hi friends,
    i am facing a problem. i am displaying an output alv  using OO ALV.
    i am creating a new row and validating the newly created row values and changing if it is not according to the criteria. but the newly edited values are not capturing in method
    pr_data_changed->mt_inserted_rows as it contains values only entries entered for the first time .
    i am not getting the newly edited values in it.
    please do the needful.
    Thanks and Regards,
    srinivas

    Hi!
    to rectify the problem in the Code.....
    You can Go through this program....for changed values....
    https://wiki.sdn.sap.com/wiki/x/AwBIBQ
    Regards.

  • Excise values are not updating in billing

    hi all,
    In RG23D register BED, AED, ECS values are showing correctly, but in order (VA02) or in billing (VF01) excise values are not showing. So, what could be the reason and what need to be checked?
    thanks.

    Hi MBS,
    yes im doing depot process.
    I maintained routine 356, and statistical
    and i checked pricing procedure analysis tab, where all conditions are activated.
    but still values are not fetching or shoeing in billing.
    any other solutions.....
    thanks.

  • AUC Settlement - values are not updated in all depreciation areas

    Dear Friends,
    I got a problem with Asset AUC settlement.
    We have created a AUC, while creating asset master, we mistakenly deactivated one of depreciation area(area 70). After few days my user run settlement (in the year 2014). When user run settlement all values move to new asset except depreciation area 70 because in AUC asset area 70 is deactivated. But in new asset area 70 is required.
    Now user realised it, is there any way to enter values in area 70, becuase we are using parellel ledger concept, area 70 is assigned ot one ledger when user run GL balances system showing differences in balances.
    Please help me to solve this issue.
    Thanks
    Sudheer

    Hi Sudheer,
    This t.code will activate the dep.areas for all existing assets. If you want to activate for specific assets, then it is not possible. Alternatively, you select the check box "Leave values initial" and run the program. Here the check box will not update any values for the new dep.area for the existing assets. After that create a custom transaction type and limit the transactions for the new dep.area, after that do posting for the asset which you want postings.
    Regards,
    Mukthar

  • Some key figure are not update for movement type 101

    Dear All,
    I have done load for Inventory and now i am finding that for some material the with movement type 101 the key figures are not getting populated, for these materials the values in characteristics is getting populated fine.
    I have loaded the data according to stranded procedure in "How to Load...."
    I have checked the values of material in R3 and it is there.
    Example of the record::
    Material    Plant Movement type  Calender Day    quanity Base Unit
    10101      01       350                     01.02.2006     20             KG
    10101        01       101                     05.07.2006                      KG
    10101         01      101                      10.07.2006                      KG
    The Quantity is not appearing in second and third record.

    Hi,
    Please check whether you have set  ''Rule groups''  at transfermation level . There you can set the conditions like materials having movement type X can be updated to one Key Figure and material having movement type Y can be updated to another Key figure.
    Please check whether you have set this option at transfermation level.
    For example, may be in your case materials from different plants are updating to different key figure.
    Thanks,
    Edited by: kavitha nagandla on Feb 17, 2010 7:19 AM

  • Asset values are not updating in ledgers

    Dear Experts,
    Currently for company code 1000, system calculating depreciation   properly and posting,
    If there is a change in depreciation % rate, user can able to change the depreciation % in Dep key and successfully posting while running the depreciation run.
    Accordingly to the asset dep calculation, retirements, transfers, partial retirements etc there were no issue and everything is working fine for company code 1000.
    Only thing is those values not updating L5 ledger.
    Regards
    Venkat

    http://scn.sap.com/message/13115490#13115490
    Refer to the above Thread
    3. SPRO-Financial Accounting (New)-Financial Accounting Global Settings (New)-Ledgers-Ledger-Define Ledger Group
    We have one ledger group, We one leading ledger (OL) and 3 non leading ledger L5 _US GAAP Ledger, L6_IFRS Ledger, L7 _Fiscal year Jan – Dec Ledger and
    We have created one ledger group and selected the ledger group and clicked the ledger assignment
    Representative Ledger in Group ticked only for the OL ledger, we have to maintain Representative Ledger in Group tick for the remaining non ledger
    Also?
    Regards,
    Venkataswamy

  • Values are not matching for inventory report

    Hi all,
    we are running the report stock over view, in that there is a key figure total stock which is having the non cumulative option
    inflow and outflow
    data has been loaded correctly but when we are executing the report it is giving the values cumulatively
    that means
    report containing material, plant and calmonth
    we have the data loading from october onwords
    suppose total stock is
    10.2007= 10ST
    11.2007=20ST
    12.2007= 50 ST
    it is giving the output
    10.2007 = 10ST
    11.2007 = 30ST
    12.2007 = 80ST
    it is cumulating the values
    TOTAL STOCK is the business content object which is having the options
    aggregation = sum
    exception aggregation = Last Value.
    can any one helps me on this issue.
    Thanks & Regards,
    Suresh.

    HI,
    Thanks for your reply,
    we are not done any compression on the requests, but now deltas are running
    is this is the problem cause for the report
    if it is the problem hw we can resove it
    can you please reply
    Thanks & Regards
    Suresh

  • Query Values are not updated.

    Hello All,
    While refreshing the query on the cube 0IC_C03, i am not getting the correct values in the query,  Cube 0IC_C03 values and query values are differ.
    when i Tested inthe RSRV test it shows
    "<b>Dimension key 398 missing in dimension table /BI0/D0IC_C03P</b> "
    if any one knows plz guide me.
    Regards
    Chintaps

    Hello,
    I did not find DIM ID in DImension table. and
    when i checked Masterdata consistency check at RSRV level it gives-
    There is a inconsisitency in masterdata for 0MATERIAL.
    Characters not allowed characteristic values(characteristic 0MATERIAL)
    Value in SID table 000001000001/ correct value 000000000001000001/ SID in SID table 41037
    Value in SID table 000001000002/ correct value 000000000001000002/ SID in SID table 41038
    Value in SID table 000001000003/ correct value 000000000001000003/ SID in SID table 41039
    Value in SID table 000001000004/ correct value 000000000001000004/ SID in SID table 41040
    Value in SID table 000001000005/ correct value 000000000001000005/ SID in SID table 41041
    Value in SID table 000001000006/ correct value 000000000001000006/ SID in SID table 41042
    Value in SID table 000001000007/ correct value 000000000001000007/ SID in SID table 41043
    Value in SID table 000001000008/ correct value 000000000001000008/ SID in SID table 41044
    Value in SID table 000001000009/ correct value 000000000001000009/ SID in SID table 41045
    Value in SID table 000001000010/ correct value 000000000001000010/ SID in SID table 41046
    and i checked the program RSDMD_CHECKPRG_ALL for the 0MATERIAL
    Characteristic 0MATERIAL: 288 values from table /BI0/TMATERIAL do not exist in table /BI0/SMATERIAL.
    and  gives me a message Some versions are incorrect.     
    if anyone have an idea , please suggest me.
    Regards
    Chintaps

  • Firefox asks me to update to 5.0, but I have rolled back to 4 because Google Toolbar and McAffee, among others are not updated for 5.0. When will the add-ons be updated?

    The update for 5.0 came so quickly, that a very large number of the add-ons and extensions I use to keep it safe and operate the way I am used to are not working, the MOST important of these being Google Toolbar and McAfee site advisor. I am already using Chrome for work due to the known issues FireFox has with the Google Toolbar in 4.0, and although I am a HUGE fan of Firefox, this latest update that seems rushed just to meet a deadline set may be the straw the broke the Firefox's back!! Let me know what I can expect going forward

    '''The Google Toolbar is no longer supported by Google in Firefox 5 and up''', you may be able to get what you want from it for a limited time, the directions to install the Google Toolbar were posted before Google actually announced dropping support.
    *Enable Google Toolbar in Firefox 5<br>http://googlesystem.blogspot.com/2011/06/enable-google-toolbar-in-firefox-5.html
    *the-edmeister posted a brief evaluation of the situation<br>https://support.mozilla.com/en-US/questions/841736
    Since you are or were working on Google Chrome, you already have a good idea of how you can use your browser without the Google Toolbar.
    In any case you can find several alternative solutions, and you can start working on them now, see
    * "'''Using Google Toolbar features without toolbars'''" <br>http://kb.mozillazine.org/Using_Google_Toolbar_features_without_toolbars

  • Values are not updated in Assets if posted via Purchase order

    Hello Gurus,
    I have done all the customization relaed to Asset Accounting. When I am trying to procure Assets through Purchase order it is updating quantity but not updating values. Can any one give me some suggestion on this.
    Regards,
    Pawan Kumar

    Hi,
    Please check the account assignment category in OME9. Check Category A. GR Receipt will on the basis of non valuated. Just do MIRO. I think your value will be updated.
    Regards,
    Jigar

Maybe you are looking for