• 1 reply
  • Latest Post - ‏2012-11-15T14:42:56Z by SystemAdmin
693 Posts

Pinned topic Creating a Java API to update the value w/n a metadata property

‏2012-09-27T13:13:58Z |
I'm looking to update the metadata of one of the metadata properties attached to the document and then fire off the custom event.

Without trying to update the property the code works fine -- just wanted to see what I was missing and is someone could give a hand -- thanks for the help in advance:

public static void getQueryANC(Domain dom, ObjectStore os) {

SearchSQL sqlANC = new SearchSQL("SELECT This, ReviewDate FROM Document WHERE Document.This INFOLDER " + " '/Guidelines/Ancillary Services Guidelines'" + " AND VersionStatus=1 AND IsCurrentVersion = TRUE AND IsReserved = false " + " AND WorkflowInProgress = 'No' " +
" AND (ReviewDate > 20120915T040000Z AND ReviewDate <= 20120922T040000Z)");

SearchScope scope = new SearchScope(os);
IndependentObjectSet set = scope.fetchObjects(sqlANC, null, null, false);

// loop through result set -- NEED TO KNOW IF THIS IS

for (Iterator i = set.iterator(); i.hasNext();)

// Get the Document - run through and for each document that got
// pulled from the query fire off the "kickoff event"

Document obj = (Document);
String AnnualReview = ""; pf = new
pf.addIncludeProperty(new FilterElement (null,
null, null, "AnnualReview", null)); props =
props.putValue(AnnualReview, "Yes");

CustomEvent evt = Factory.CustomEvent.createInstance(os,"ANCGuidelineAnnualReviewEvent");


// return customObjects;

  • SystemAdmin
    693 Posts

    Re: Creating a Java API to update the value w/n a metadata property

    Hi Ryan,

    i think that at first you must save your changes ";" and followed by raise event.
    Otherwise your event will be raised on unchanged object.