1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!
  1. padmaja.x.reddy

    padmaja.x.reddy Active Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    55
    Hi,

    I am trying to update metadata from a java class using CIS API. Below is the i have written. This class is called through stellent service. in stellent service class I am perorming ABC task once the task is completed then the servic should update a custom metadata.


    --------------------------------------------------------------------------------
    URL xmlRes = new File("D:/orcle/ucm/server/classes/helloworld/adapterconfig.xml").toURI().toURL();

    String adapXML = xmlRes.toExternalForm();


    //Initializing server type and pointing to adapterconfig.xml
    Properties properties = new Properties();


    properties.setProperty(ICISApplication.PROPERTY_CONFIG_TYPE, "server");
    properties.setProperty(ICISApplication.PROPERTY_CONFIG_SERVER_ADAPTER_CONFIG, xmlRes.toExternalForm());
    properties.setProperty(ICISApplication.PROPERTY_CONFIG_SERVER_TYPE, "standalone");
    application = CISApplicationFactory.initialize(properties);

    // create context

    ISCSContext context = application.getUCPMAPI().getActiveAPI()._createSCSContext();
    context.setUser("sysadmin");
    context.setAdapterName("myadapter");
    context.setIdcUser("sysadmin");



    ISCSDocumentUpdateAPI documentUpdate = (ISCSDocumentUpdateAPI)application.getUCPMAPI().getActiveAPI().getDocumentUpdateAPI();
    ISCSContent content = (ISCSContent)application.getUCPMAPI().createObject(ISCSContent.class);
    //documentInfoAPI.


    content.setProperty("xArchiveNumber","45678" );


    documentUpdate.updateInfo(context, content);



    --------------------------------------------------------------------------------

    after the last statement I am getting this error: com.stellent.cis.client.command.CommandException: System code execution error.

    Please help I need to resolve this issue ASAP.

    Thanks in advance.